A message with details about the error that occurred.
* @public
*/
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "CFNRegistryException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _CFNRegistryException.prototype);
this.Message = opts.Message;
}
};
var TypeNotFoundException = class _TypeNotFoundException extends CloudFormationServiceException {
static {
__name(this, "TypeNotFoundException");
}
name = "TypeNotFoundException";
$fault = "client";
/**
* A message with details about the error that occurred.
* @public
*/
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "TypeNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TypeNotFoundException.prototype);
this.Message = opts.Message;
}
};
var AlreadyExistsException = class _AlreadyExistsException extends CloudFormationServiceException {
static {
__name(this, "AlreadyExistsException");
}
name = "AlreadyExistsException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "AlreadyExistsException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _AlreadyExistsException.prototype);
this.Message = opts.Message;
}
};
var AttributeChangeType = {
Add: "Add",
Modify: "Modify",
Remove: "Remove"
};
var TypeConfigurationNotFoundException = class _TypeConfigurationNotFoundException extends CloudFormationServiceException {
static {
__name(this, "TypeConfigurationNotFoundException");
}
name = "TypeConfigurationNotFoundException";
$fault = "client";
/**
* A message with details about the error that occurred.
* @public
*/
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "TypeConfigurationNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TypeConfigurationNotFoundException.prototype);
this.Message = opts.Message;
}
};
var CallAs = {
DELEGATED_ADMIN: "DELEGATED_ADMIN",
SELF: "SELF"
};
var TokenAlreadyExistsException = class _TokenAlreadyExistsException extends CloudFormationServiceException {
static {
__name(this, "TokenAlreadyExistsException");
}
name = "TokenAlreadyExistsException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "TokenAlreadyExistsException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TokenAlreadyExistsException.prototype);
this.Message = opts.Message;
}
};
var Capability = {
CAPABILITY_AUTO_EXPAND: "CAPABILITY_AUTO_EXPAND",
CAPABILITY_IAM: "CAPABILITY_IAM",
CAPABILITY_NAMED_IAM: "CAPABILITY_NAMED_IAM"
};
var Category = {
ACTIVATED: "ACTIVATED",
AWS_TYPES: "AWS_TYPES",
REGISTERED: "REGISTERED",
THIRD_PARTY: "THIRD_PARTY"
};
var ChangeAction = {
Add: "Add",
Dynamic: "Dynamic",
Import: "Import",
Modify: "Modify",
Remove: "Remove"
};
var ChangeSource = {
Automatic: "Automatic",
DirectModification: "DirectModification",
ParameterReference: "ParameterReference",
ResourceAttribute: "ResourceAttribute",
ResourceReference: "ResourceReference"
};
var EvaluationType = {
Dynamic: "Dynamic",
Static: "Static"
};
var ResourceAttribute = {
CreationPolicy: "CreationPolicy",
DeletionPolicy: "DeletionPolicy",
Metadata: "Metadata",
Properties: "Properties",
Tags: "Tags",
UpdatePolicy: "UpdatePolicy",
UpdateReplacePolicy: "UpdateReplacePolicy"
};
var RequiresRecreation = {
Always: "Always",
Conditionally: "Conditionally",
Never: "Never"
};
var PolicyAction = {
Delete: "Delete",
ReplaceAndDelete: "ReplaceAndDelete",
ReplaceAndRetain: "ReplaceAndRetain",
ReplaceAndSnapshot: "ReplaceAndSnapshot",
Retain: "Retain",
Snapshot: "Snapshot"
};
var Replacement = {
Conditional: "Conditional",
False: "False",
True: "True"
};
var ChangeType = {
Resource: "Resource"
};
var HookFailureMode = {
FAIL: "FAIL",
WARN: "WARN"
};
var HookInvocationPoint = {
PRE_PROVISION: "PRE_PROVISION"
};
var HookTargetType = {
RESOURCE: "RESOURCE"
};
var ChangeSetHooksStatus = {
PLANNED: "PLANNED",
PLANNING: "PLANNING",
UNAVAILABLE: "UNAVAILABLE"
};
var ChangeSetNotFoundException = class _ChangeSetNotFoundException extends CloudFormationServiceException {
static {
__name(this, "ChangeSetNotFoundException");
}
name = "ChangeSetNotFoundException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "ChangeSetNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ChangeSetNotFoundException.prototype);
this.Message = opts.Message;
}
};
var ChangeSetStatus = {
CREATE_COMPLETE: "CREATE_COMPLETE",
CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS",
CREATE_PENDING: "CREATE_PENDING",
DELETE_COMPLETE: "DELETE_COMPLETE",
DELETE_FAILED: "DELETE_FAILED",
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
DELETE_PENDING: "DELETE_PENDING",
FAILED: "FAILED"
};
var ExecutionStatus = {
AVAILABLE: "AVAILABLE",
EXECUTE_COMPLETE: "EXECUTE_COMPLETE",
EXECUTE_FAILED: "EXECUTE_FAILED",
EXECUTE_IN_PROGRESS: "EXECUTE_IN_PROGRESS",
OBSOLETE: "OBSOLETE",
UNAVAILABLE: "UNAVAILABLE"
};
var ChangeSetType = {
CREATE: "CREATE",
IMPORT: "IMPORT",
UPDATE: "UPDATE"
};
var OnStackFailure = {
DELETE: "DELETE",
DO_NOTHING: "DO_NOTHING",
ROLLBACK: "ROLLBACK"
};
var InsufficientCapabilitiesException = class _InsufficientCapabilitiesException extends CloudFormationServiceException {
static {
__name(this, "InsufficientCapabilitiesException");
}
name = "InsufficientCapabilitiesException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "InsufficientCapabilitiesException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InsufficientCapabilitiesException.prototype);
this.Message = opts.Message;
}
};
var LimitExceededException = class _LimitExceededException extends CloudFormationServiceException {
static {
__name(this, "LimitExceededException");
}
name = "LimitExceededException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "LimitExceededException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _LimitExceededException.prototype);
this.Message = opts.Message;
}
};
var ConcurrentResourcesLimitExceededException = class _ConcurrentResourcesLimitExceededException extends CloudFormationServiceException {
static {
__name(this, "ConcurrentResourcesLimitExceededException");
}
name = "ConcurrentResourcesLimitExceededException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "ConcurrentResourcesLimitExceededException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ConcurrentResourcesLimitExceededException.prototype);
this.Message = opts.Message;
}
};
var GeneratedTemplateDeletionPolicy = {
DELETE: "DELETE",
RETAIN: "RETAIN"
};
var GeneratedTemplateUpdateReplacePolicy = {
DELETE: "DELETE",
RETAIN: "RETAIN"
};
var OnFailure = {
DELETE: "DELETE",
DO_NOTHING: "DO_NOTHING",
ROLLBACK: "ROLLBACK"
};
var ConcurrencyMode = {
SOFT_FAILURE_TOLERANCE: "SOFT_FAILURE_TOLERANCE",
STRICT_FAILURE_TOLERANCE: "STRICT_FAILURE_TOLERANCE"
};
var RegionConcurrencyType = {
PARALLEL: "PARALLEL",
SEQUENTIAL: "SEQUENTIAL"
};
var OperationIdAlreadyExistsException = class _OperationIdAlreadyExistsException extends CloudFormationServiceException {
static {
__name(this, "OperationIdAlreadyExistsException");
}
name = "OperationIdAlreadyExistsException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "OperationIdAlreadyExistsException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _OperationIdAlreadyExistsException.prototype);
this.Message = opts.Message;
}
};
var OperationInProgressException = class _OperationInProgressException extends CloudFormationServiceException {
static {
__name(this, "OperationInProgressException");
}
name = "OperationInProgressException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "OperationInProgressException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _OperationInProgressException.prototype);
this.Message = opts.Message;
}
};
var StackSetNotFoundException = class _StackSetNotFoundException extends CloudFormationServiceException {
static {
__name(this, "StackSetNotFoundException");
}
name = "StackSetNotFoundException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "StackSetNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _StackSetNotFoundException.prototype);
this.Message = opts.Message;
}
};
var StaleRequestException = class _StaleRequestException extends CloudFormationServiceException {
static {
__name(this, "StaleRequestException");
}
name = "StaleRequestException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "StaleRequestException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _StaleRequestException.prototype);
this.Message = opts.Message;
}
};
var CreatedButModifiedException = class _CreatedButModifiedException extends CloudFormationServiceException {
static {
__name(this, "CreatedButModifiedException");
}
name = "CreatedButModifiedException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "CreatedButModifiedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _CreatedButModifiedException.prototype);
this.Message = opts.Message;
}
};
var PermissionModels = {
SELF_MANAGED: "SELF_MANAGED",
SERVICE_MANAGED: "SERVICE_MANAGED"
};
var NameAlreadyExistsException = class _NameAlreadyExistsException extends CloudFormationServiceException {
static {
__name(this, "NameAlreadyExistsException");
}
name = "NameAlreadyExistsException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "NameAlreadyExistsException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _NameAlreadyExistsException.prototype);
this.Message = opts.Message;
}
};
var InvalidChangeSetStatusException = class _InvalidChangeSetStatusException extends CloudFormationServiceException {
static {
__name(this, "InvalidChangeSetStatusException");
}
name = "InvalidChangeSetStatusException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidChangeSetStatusException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidChangeSetStatusException.prototype);
this.Message = opts.Message;
}
};
var GeneratedTemplateNotFoundException = class _GeneratedTemplateNotFoundException extends CloudFormationServiceException {
static {
__name(this, "GeneratedTemplateNotFoundException");
}
name = "GeneratedTemplateNotFoundException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "GeneratedTemplateNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _GeneratedTemplateNotFoundException.prototype);
this.Message = opts.Message;
}
};
var DeletionMode = {
FORCE_DELETE_STACK: "FORCE_DELETE_STACK",
STANDARD: "STANDARD"
};
var StackSetNotEmptyException = class _StackSetNotEmptyException extends CloudFormationServiceException {
static {
__name(this, "StackSetNotEmptyException");
}
name = "StackSetNotEmptyException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "StackSetNotEmptyException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _StackSetNotEmptyException.prototype);
this.Message = opts.Message;
}
};
var RegistryType = {
HOOK: "HOOK",
MODULE: "MODULE",
RESOURCE: "RESOURCE"
};
var GeneratedTemplateResourceStatus = {
COMPLETE: "COMPLETE",
FAILED: "FAILED",
IN_PROGRESS: "IN_PROGRESS",
PENDING: "PENDING"
};
var WarningType = {
MUTUALLY_EXCLUSIVE_PROPERTIES: "MUTUALLY_EXCLUSIVE_PROPERTIES",
MUTUALLY_EXCLUSIVE_TYPES: "MUTUALLY_EXCLUSIVE_TYPES",
UNSUPPORTED_PROPERTIES: "UNSUPPORTED_PROPERTIES"
};
var GeneratedTemplateStatus = {
COMPLETE: "COMPLETE",
CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS",
CREATE_PENDING: "CREATE_PENDING",
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
DELETE_PENDING: "DELETE_PENDING",
FAILED: "FAILED",
UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS",
UPDATE_PENDING: "UPDATE_PENDING"
};
var OrganizationStatus = {
DISABLED: "DISABLED",
DISABLED_PERMANENTLY: "DISABLED_PERMANENTLY",
ENABLED: "ENABLED"
};
var IdentityProvider = {
AWS_Marketplace: "AWS_Marketplace",
Bitbucket: "Bitbucket",
GitHub: "GitHub"
};
var PublisherStatus = {
UNVERIFIED: "UNVERIFIED",
VERIFIED: "VERIFIED"
};
var ResourceScanStatus = {
COMPLETE: "COMPLETE",
EXPIRED: "EXPIRED",
FAILED: "FAILED",
IN_PROGRESS: "IN_PROGRESS"
};
var ResourceScanNotFoundException = class _ResourceScanNotFoundException extends CloudFormationServiceException {
static {
__name(this, "ResourceScanNotFoundException");
}
name = "ResourceScanNotFoundException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceScanNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceScanNotFoundException.prototype);
this.Message = opts.Message;
}
};
var StackDriftDetectionStatus = {
DETECTION_COMPLETE: "DETECTION_COMPLETE",
DETECTION_FAILED: "DETECTION_FAILED",
DETECTION_IN_PROGRESS: "DETECTION_IN_PROGRESS"
};
var StackDriftStatus = {
DRIFTED: "DRIFTED",
IN_SYNC: "IN_SYNC",
NOT_CHECKED: "NOT_CHECKED",
UNKNOWN: "UNKNOWN"
};
var DetailedStatus = {
CONFIGURATION_COMPLETE: "CONFIGURATION_COMPLETE",
VALIDATION_FAILED: "VALIDATION_FAILED"
};
var HookStatus = {
HOOK_COMPLETE_FAILED: "HOOK_COMPLETE_FAILED",
HOOK_COMPLETE_SUCCEEDED: "HOOK_COMPLETE_SUCCEEDED",
HOOK_FAILED: "HOOK_FAILED",
HOOK_IN_PROGRESS: "HOOK_IN_PROGRESS"
};
var ResourceStatus = {
CREATE_COMPLETE: "CREATE_COMPLETE",
CREATE_FAILED: "CREATE_FAILED",
CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS",
DELETE_COMPLETE: "DELETE_COMPLETE",
DELETE_FAILED: "DELETE_FAILED",
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
DELETE_SKIPPED: "DELETE_SKIPPED",
EXPORT_COMPLETE: "EXPORT_COMPLETE",
EXPORT_FAILED: "EXPORT_FAILED",
EXPORT_IN_PROGRESS: "EXPORT_IN_PROGRESS",
EXPORT_ROLLBACK_COMPLETE: "EXPORT_ROLLBACK_COMPLETE",
EXPORT_ROLLBACK_FAILED: "EXPORT_ROLLBACK_FAILED",
EXPORT_ROLLBACK_IN_PROGRESS: "EXPORT_ROLLBACK_IN_PROGRESS",
IMPORT_COMPLETE: "IMPORT_COMPLETE",
IMPORT_FAILED: "IMPORT_FAILED",
IMPORT_IN_PROGRESS: "IMPORT_IN_PROGRESS",
IMPORT_ROLLBACK_COMPLETE: "IMPORT_ROLLBACK_COMPLETE",
IMPORT_ROLLBACK_FAILED: "IMPORT_ROLLBACK_FAILED",
IMPORT_ROLLBACK_IN_PROGRESS: "IMPORT_ROLLBACK_IN_PROGRESS",
ROLLBACK_COMPLETE: "ROLLBACK_COMPLETE",
ROLLBACK_FAILED: "ROLLBACK_FAILED",
ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS",
UPDATE_COMPLETE: "UPDATE_COMPLETE",
UPDATE_FAILED: "UPDATE_FAILED",
UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS",
UPDATE_ROLLBACK_COMPLETE: "UPDATE_ROLLBACK_COMPLETE",
UPDATE_ROLLBACK_FAILED: "UPDATE_ROLLBACK_FAILED",
UPDATE_ROLLBACK_IN_PROGRESS: "UPDATE_ROLLBACK_IN_PROGRESS"
};
var StackInstanceDetailedStatus = {
CANCELLED: "CANCELLED",
FAILED: "FAILED",
FAILED_IMPORT: "FAILED_IMPORT",
INOPERABLE: "INOPERABLE",
PENDING: "PENDING",
RUNNING: "RUNNING",
SKIPPED_SUSPENDED_ACCOUNT: "SKIPPED_SUSPENDED_ACCOUNT",
SUCCEEDED: "SUCCEEDED"
};
var StackInstanceStatus = {
CURRENT: "CURRENT",
INOPERABLE: "INOPERABLE",
OUTDATED: "OUTDATED"
};
var StackInstanceNotFoundException = class _StackInstanceNotFoundException extends CloudFormationServiceException {
static {
__name(this, "StackInstanceNotFoundException");
}
name = "StackInstanceNotFoundException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "StackInstanceNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _StackInstanceNotFoundException.prototype);
this.Message = opts.Message;
}
};
var StackRefactorExecutionStatus = {
AVAILABLE: "AVAILABLE",
EXECUTE_COMPLETE: "EXECUTE_COMPLETE",
EXECUTE_FAILED: "EXECUTE_FAILED",
EXECUTE_IN_PROGRESS: "EXECUTE_IN_PROGRESS",
OBSOLETE: "OBSOLETE",
ROLLBACK_COMPLETE: "ROLLBACK_COMPLETE",
ROLLBACK_FAILED: "ROLLBACK_FAILED",
ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS",
UNAVAILABLE: "UNAVAILABLE"
};
var StackRefactorStatus = {
CREATE_COMPLETE: "CREATE_COMPLETE",
CREATE_FAILED: "CREATE_FAILED",
CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS",
DELETE_COMPLETE: "DELETE_COMPLETE",
DELETE_FAILED: "DELETE_FAILED",
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS"
};
var StackRefactorNotFoundException = class _StackRefactorNotFoundException extends CloudFormationServiceException {
static {
__name(this, "StackRefactorNotFoundException");
}
name = "StackRefactorNotFoundException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "StackRefactorNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _StackRefactorNotFoundException.prototype);
this.Message = opts.Message;
}
};
var StackResourceDriftStatus = {
DELETED: "DELETED",
IN_SYNC: "IN_SYNC",
MODIFIED: "MODIFIED",
NOT_CHECKED: "NOT_CHECKED"
};
var DifferenceType = {
ADD: "ADD",
NOT_EQUAL: "NOT_EQUAL",
REMOVE: "REMOVE"
};
var StackStatus = {
CREATE_COMPLETE: "CREATE_COMPLETE",
CREATE_FAILED: "CREATE_FAILED",
CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS",
DELETE_COMPLETE: "DELETE_COMPLETE",
DELETE_FAILED: "DELETE_FAILED",
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
IMPORT_COMPLETE: "IMPORT_COMPLETE",
IMPORT_IN_PROGRESS: "IMPORT_IN_PROGRESS",
IMPORT_ROLLBACK_COMPLETE: "IMPORT_ROLLBACK_COMPLETE",
IMPORT_ROLLBACK_FAILED: "IMPORT_ROLLBACK_FAILED",
IMPORT_ROLLBACK_IN_PROGRESS: "IMPORT_ROLLBACK_IN_PROGRESS",
REVIEW_IN_PROGRESS: "REVIEW_IN_PROGRESS",
ROLLBACK_COMPLETE: "ROLLBACK_COMPLETE",
ROLLBACK_FAILED: "ROLLBACK_FAILED",
ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS",
UPDATE_COMPLETE: "UPDATE_COMPLETE",
UPDATE_COMPLETE_CLEANUP_IN_PROGRESS: "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS",
UPDATE_FAILED: "UPDATE_FAILED",
UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS",
UPDATE_ROLLBACK_COMPLETE: "UPDATE_ROLLBACK_COMPLETE",
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS: "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS",
UPDATE_ROLLBACK_FAILED: "UPDATE_ROLLBACK_FAILED",
UPDATE_ROLLBACK_IN_PROGRESS: "UPDATE_ROLLBACK_IN_PROGRESS"
};
var StackSetDriftDetectionStatus = {
COMPLETED: "COMPLETED",
FAILED: "FAILED",
IN_PROGRESS: "IN_PROGRESS",
PARTIAL_SUCCESS: "PARTIAL_SUCCESS",
STOPPED: "STOPPED"
};
var StackSetDriftStatus = {
DRIFTED: "DRIFTED",
IN_SYNC: "IN_SYNC",
NOT_CHECKED: "NOT_CHECKED"
};
var StackSetStatus = {
ACTIVE: "ACTIVE",
DELETED: "DELETED"
};
var StackSetOperationAction = {
CREATE: "CREATE",
DELETE: "DELETE",
DETECT_DRIFT: "DETECT_DRIFT",
UPDATE: "UPDATE"
};
var StackSetOperationStatus = {
FAILED: "FAILED",
QUEUED: "QUEUED",
RUNNING: "RUNNING",
STOPPED: "STOPPED",
STOPPING: "STOPPING",
SUCCEEDED: "SUCCEEDED"
};
var DeprecatedStatus = {
DEPRECATED: "DEPRECATED",
LIVE: "LIVE"
};
var ProvisioningType = {
FULLY_MUTABLE: "FULLY_MUTABLE",
IMMUTABLE: "IMMUTABLE",
NON_PROVISIONABLE: "NON_PROVISIONABLE"
};
var TypeTestsStatus = {
FAILED: "FAILED",
IN_PROGRESS: "IN_PROGRESS",
NOT_TESTED: "NOT_TESTED",
PASSED: "PASSED"
};
var Visibility = {
PRIVATE: "PRIVATE",
PUBLIC: "PUBLIC"
};
var RegistrationStatus = {
COMPLETE: "COMPLETE",
FAILED: "FAILED",
IN_PROGRESS: "IN_PROGRESS"
};
var TemplateFormat = {
JSON: "JSON",
YAML: "YAML"
};
var TemplateStage = {
Original: "Original",
Processed: "Processed"
};
var StackNotFoundException = class _StackNotFoundException extends CloudFormationServiceException {
static {
__name(this, "StackNotFoundException");
}
name = "StackNotFoundException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "StackNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _StackNotFoundException.prototype);
this.Message = opts.Message;
}
};
var HookResultNotFoundException = class _HookResultNotFoundException extends CloudFormationServiceException {
static {
__name(this, "HookResultNotFoundException");
}
name = "HookResultNotFoundException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "HookResultNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _HookResultNotFoundException.prototype);
this.Message = opts.Message;
}
};
var ListHookResultsTargetType = {
CHANGE_SET: "CHANGE_SET",
CLOUD_CONTROL: "CLOUD_CONTROL",
RESOURCE: "RESOURCE",
STACK: "STACK"
};
var ResourceScanInProgressException = class _ResourceScanInProgressException extends CloudFormationServiceException {
static {
__name(this, "ResourceScanInProgressException");
}
name = "ResourceScanInProgressException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceScanInProgressException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceScanInProgressException.prototype);
this.Message = opts.Message;
}
};
var ScanType = {
FULL: "FULL",
PARTIAL: "PARTIAL"
};
var StackInstanceFilterName = {
DETAILED_STATUS: "DETAILED_STATUS",
DRIFT_STATUS: "DRIFT_STATUS",
LAST_OPERATION_ID: "LAST_OPERATION_ID"
};
var StackRefactorActionType = {
CREATE: "CREATE",
MOVE: "MOVE"
};
var StackRefactorDetection = {
AUTO: "AUTO",
MANUAL: "MANUAL"
};
var StackRefactorActionEntity = {
RESOURCE: "RESOURCE",
STACK: "STACK"
};
var OperationResultFilterName = {
OPERATION_RESULT_STATUS: "OPERATION_RESULT_STATUS"
};
var StackSetOperationResultStatus = {
CANCELLED: "CANCELLED",
FAILED: "FAILED",
PENDING: "PENDING",
RUNNING: "RUNNING",
SUCCEEDED: "SUCCEEDED"
};
// src/models/models_1.ts
var InvalidStateTransitionException = class _InvalidStateTransitionException extends CloudFormationServiceException {
static {
__name(this, "InvalidStateTransitionException");
}
name = "InvalidStateTransitionException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidStateTransitionException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidStateTransitionException.prototype);
this.Message = opts.Message;
}
};
var OperationStatusCheckFailedException = class _OperationStatusCheckFailedException extends CloudFormationServiceException {
static {
__name(this, "OperationStatusCheckFailedException");
}
name = "OperationStatusCheckFailedException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "OperationStatusCheckFailedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _OperationStatusCheckFailedException.prototype);
this.Message = opts.Message;
}
};
var OperationStatus = {
FAILED: "FAILED",
IN_PROGRESS: "IN_PROGRESS",
PENDING: "PENDING",
SUCCESS: "SUCCESS"
};
var HandlerErrorCode = {
AccessDenied: "AccessDenied",
AlreadyExists: "AlreadyExists",
GeneralServiceException: "GeneralServiceException",
HandlerInternalFailure: "HandlerInternalFailure",
InternalFailure: "InternalFailure",
InvalidCredentials: "InvalidCredentials",
InvalidRequest: "InvalidRequest",
InvalidTypeConfiguration: "InvalidTypeConfiguration",
NetworkFailure: "NetworkFailure",
NonCompliant: "NonCompliant",
NotFound: "NotFound",
NotUpdatable: "NotUpdatable",
ResourceConflict: "ResourceConflict",
ServiceInternalError: "ServiceInternalError",
ServiceLimitExceeded: "ServiceLimitExceeded",
ServiceTimeout: "NotStabilized",
Throttling: "Throttling",
Unknown: "Unknown",
UnsupportedTarget: "UnsupportedTarget"
};
var ResourceSignalStatus = {
FAILURE: "FAILURE",
SUCCESS: "SUCCESS"
};
var ResourceScanLimitExceededException = class _ResourceScanLimitExceededException extends CloudFormationServiceException {
static {
__name(this, "ResourceScanLimitExceededException");
}
name = "ResourceScanLimitExceededException";
$fault = "client";
Message;
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceScanLimitExceededException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceScanLimitExceededException.prototype);
this.Message = opts.Message;
}
};
// src/protocols/Aws_query.ts
var se_ActivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ActivateOrganizationsAccessInput(input, context),
[_A]: _AOA,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ActivateOrganizationsAccessCommand");
var se_ActivateTypeCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ActivateTypeInput(input, context),
[_A]: _AT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ActivateTypeCommand");
var se_BatchDescribeTypeConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_BatchDescribeTypeConfigurationsInput(input, context),
[_A]: _BDTC,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_BatchDescribeTypeConfigurationsCommand");
var se_CancelUpdateStackCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_CancelUpdateStackInput(input, context),
[_A]: _CUS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CancelUpdateStackCommand");
var se_ContinueUpdateRollbackCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ContinueUpdateRollbackInput(input, context),
[_A]: _CUR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ContinueUpdateRollbackCommand");
var se_CreateChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_CreateChangeSetInput(input, context),
[_A]: _CCS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateChangeSetCommand");
var se_CreateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_CreateGeneratedTemplateInput(input, context),
[_A]: _CGT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateGeneratedTemplateCommand");
var se_CreateStackCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_CreateStackInput(input, context),
[_A]: _CS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateStackCommand");
var se_CreateStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_CreateStackInstancesInput(input, context),
[_A]: _CSI,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateStackInstancesCommand");
var se_CreateStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_CreateStackRefactorInput(input, context),
[_A]: _CSR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateStackRefactorCommand");
var se_CreateStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_CreateStackSetInput(input, context),
[_A]: _CSS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateStackSetCommand");
var se_DeactivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DeactivateOrganizationsAccessInput(input, context),
[_A]: _DOA,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeactivateOrganizationsAccessCommand");
var se_DeactivateTypeCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DeactivateTypeInput(input, context),
[_A]: _DT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeactivateTypeCommand");
var se_DeleteChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DeleteChangeSetInput(input, context),
[_A]: _DCS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteChangeSetCommand");
var se_DeleteGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DeleteGeneratedTemplateInput(input, context),
[_A]: _DGT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteGeneratedTemplateCommand");
var se_DeleteStackCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DeleteStackInput(input, context),
[_A]: _DS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteStackCommand");
var se_DeleteStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DeleteStackInstancesInput(input, context),
[_A]: _DSI,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteStackInstancesCommand");
var se_DeleteStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DeleteStackSetInput(input, context),
[_A]: _DSS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteStackSetCommand");
var se_DeregisterTypeCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DeregisterTypeInput(input, context),
[_A]: _DTe,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeregisterTypeCommand");
var se_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeAccountLimitsInput(input, context),
[_A]: _DAL,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeAccountLimitsCommand");
var se_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeChangeSetInput(input, context),
[_A]: _DCSe,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeChangeSetCommand");
var se_DescribeChangeSetHooksCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeChangeSetHooksInput(input, context),
[_A]: _DCSH,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeChangeSetHooksCommand");
var se_DescribeGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeGeneratedTemplateInput(input, context),
[_A]: _DGTe,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeGeneratedTemplateCommand");
var se_DescribeOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeOrganizationsAccessInput(input, context),
[_A]: _DOAe,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeOrganizationsAccessCommand");
var se_DescribePublisherCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribePublisherInput(input, context),
[_A]: _DP,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribePublisherCommand");
var se_DescribeResourceScanCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeResourceScanInput(input, context),
[_A]: _DRS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeResourceScanCommand");
var se_DescribeStackDriftDetectionStatusCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStackDriftDetectionStatusInput(input, context),
[_A]: _DSDDS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStackDriftDetectionStatusCommand");
var se_DescribeStackEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStackEventsInput(input, context),
[_A]: _DSE,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStackEventsCommand");
var se_DescribeStackInstanceCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStackInstanceInput(input, context),
[_A]: _DSIe,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStackInstanceCommand");
var se_DescribeStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStackRefactorInput(input, context),
[_A]: _DSR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStackRefactorCommand");
var se_DescribeStackResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStackResourceInput(input, context),
[_A]: _DSRe,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStackResourceCommand");
var se_DescribeStackResourceDriftsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStackResourceDriftsInput(input, context),
[_A]: _DSRD,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStackResourceDriftsCommand");
var se_DescribeStackResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStackResourcesInput(input, context),
[_A]: _DSRes,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStackResourcesCommand");
var se_DescribeStacksCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStacksInput(input, context),
[_A]: _DSe,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStacksCommand");
var se_DescribeStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStackSetInput(input, context),
[_A]: _DSSe,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStackSetCommand");
var se_DescribeStackSetOperationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeStackSetOperationInput(input, context),
[_A]: _DSSO,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeStackSetOperationCommand");
var se_DescribeTypeCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeTypeInput(input, context),
[_A]: _DTes,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeTypeCommand");
var se_DescribeTypeRegistrationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DescribeTypeRegistrationInput(input, context),
[_A]: _DTR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeTypeRegistrationCommand");
var se_DetectStackDriftCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DetectStackDriftInput(input, context),
[_A]: _DSD,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DetectStackDriftCommand");
var se_DetectStackResourceDriftCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DetectStackResourceDriftInput(input, context),
[_A]: _DSRDe,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DetectStackResourceDriftCommand");
var se_DetectStackSetDriftCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_DetectStackSetDriftInput(input, context),
[_A]: _DSSD,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DetectStackSetDriftCommand");
var se_EstimateTemplateCostCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_EstimateTemplateCostInput(input, context),
[_A]: _ETC,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_EstimateTemplateCostCommand");
var se_ExecuteChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ExecuteChangeSetInput(input, context),
[_A]: _ECS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ExecuteChangeSetCommand");
var se_ExecuteStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ExecuteStackRefactorInput(input, context),
[_A]: _ESR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ExecuteStackRefactorCommand");
var se_GetGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_GetGeneratedTemplateInput(input, context),
[_A]: _GGT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetGeneratedTemplateCommand");
var se_GetStackPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_GetStackPolicyInput(input, context),
[_A]: _GSP,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetStackPolicyCommand");
var se_GetTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_GetTemplateInput(input, context),
[_A]: _GT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetTemplateCommand");
var se_GetTemplateSummaryCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_GetTemplateSummaryInput(input, context),
[_A]: _GTS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetTemplateSummaryCommand");
var se_ImportStacksToStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ImportStacksToStackSetInput(input, context),
[_A]: _ISTSS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ImportStacksToStackSetCommand");
var se_ListChangeSetsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListChangeSetsInput(input, context),
[_A]: _LCS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListChangeSetsCommand");
var se_ListExportsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListExportsInput(input, context),
[_A]: _LE,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListExportsCommand");
var se_ListGeneratedTemplatesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListGeneratedTemplatesInput(input, context),
[_A]: _LGT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListGeneratedTemplatesCommand");
var se_ListHookResultsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListHookResultsInput(input, context),
[_A]: _LHR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListHookResultsCommand");
var se_ListImportsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListImportsInput(input, context),
[_A]: _LI,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListImportsCommand");
var se_ListResourceScanRelatedResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListResourceScanRelatedResourcesInput(input, context),
[_A]: _LRSRR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListResourceScanRelatedResourcesCommand");
var se_ListResourceScanResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListResourceScanResourcesInput(input, context),
[_A]: _LRSR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListResourceScanResourcesCommand");
var se_ListResourceScansCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListResourceScansInput(input, context),
[_A]: _LRS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListResourceScansCommand");
var se_ListStackInstanceResourceDriftsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStackInstanceResourceDriftsInput(input, context),
[_A]: _LSIRD,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStackInstanceResourceDriftsCommand");
var se_ListStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStackInstancesInput(input, context),
[_A]: _LSI,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStackInstancesCommand");
var se_ListStackRefactorActionsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStackRefactorActionsInput(input, context),
[_A]: _LSRA,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStackRefactorActionsCommand");
var se_ListStackRefactorsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStackRefactorsInput(input, context),
[_A]: _LSR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStackRefactorsCommand");
var se_ListStackResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStackResourcesInput(input, context),
[_A]: _LSRi,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStackResourcesCommand");
var se_ListStacksCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStacksInput(input, context),
[_A]: _LS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStacksCommand");
var se_ListStackSetAutoDeploymentTargetsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStackSetAutoDeploymentTargetsInput(input, context),
[_A]: _LSSADT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStackSetAutoDeploymentTargetsCommand");
var se_ListStackSetOperationResultsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStackSetOperationResultsInput(input, context),
[_A]: _LSSOR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStackSetOperationResultsCommand");
var se_ListStackSetOperationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStackSetOperationsInput(input, context),
[_A]: _LSSO,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStackSetOperationsCommand");
var se_ListStackSetsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListStackSetsInput(input, context),
[_A]: _LSS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListStackSetsCommand");
var se_ListTypeRegistrationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListTypeRegistrationsInput(input, context),
[_A]: _LTR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListTypeRegistrationsCommand");
var se_ListTypesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListTypesInput(input, context),
[_A]: _LT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListTypesCommand");
var se_ListTypeVersionsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ListTypeVersionsInput(input, context),
[_A]: _LTV,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListTypeVersionsCommand");
var se_PublishTypeCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_PublishTypeInput(input, context),
[_A]: _PT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PublishTypeCommand");
var se_RecordHandlerProgressCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_RecordHandlerProgressInput(input, context),
[_A]: _RHP,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_RecordHandlerProgressCommand");
var se_RegisterPublisherCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_RegisterPublisherInput(input, context),
[_A]: _RP,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_RegisterPublisherCommand");
var se_RegisterTypeCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_RegisterTypeInput(input, context),
[_A]: _RT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_RegisterTypeCommand");
var se_RollbackStackCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_RollbackStackInput(input, context),
[_A]: _RS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_RollbackStackCommand");
var se_SetStackPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_SetStackPolicyInput(input, context),
[_A]: _SSP,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_SetStackPolicyCommand");
var se_SetTypeConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_SetTypeConfigurationInput(input, context),
[_A]: _STC,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_SetTypeConfigurationCommand");
var se_SetTypeDefaultVersionCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_SetTypeDefaultVersionInput(input, context),
[_A]: _STDV,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_SetTypeDefaultVersionCommand");
var se_SignalResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_SignalResourceInput(input, context),
[_A]: _SR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_SignalResourceCommand");
var se_StartResourceScanCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_StartResourceScanInput(input, context),
[_A]: _SRS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_StartResourceScanCommand");
var se_StopStackSetOperationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_StopStackSetOperationInput(input, context),
[_A]: _SSSO,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_StopStackSetOperationCommand");
var se_TestTypeCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_TestTypeInput(input, context),
[_A]: _TT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_TestTypeCommand");
var se_UpdateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_UpdateGeneratedTemplateInput(input, context),
[_A]: _UGT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UpdateGeneratedTemplateCommand");
var se_UpdateStackCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_UpdateStackInput(input, context),
[_A]: _US,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UpdateStackCommand");
var se_UpdateStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_UpdateStackInstancesInput(input, context),
[_A]: _USI,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UpdateStackInstancesCommand");
var se_UpdateStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_UpdateStackSetInput(input, context),
[_A]: _USS,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UpdateStackSetCommand");
var se_UpdateTerminationProtectionCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_UpdateTerminationProtectionInput(input, context),
[_A]: _UTP,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UpdateTerminationProtectionCommand");
var se_ValidateTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_ValidateTemplateInput(input, context),
[_A]: _VT,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ValidateTemplateCommand");
var de_ActivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ActivateOrganizationsAccessOutput(data.ActivateOrganizationsAccessResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ActivateOrganizationsAccessCommand");
var de_ActivateTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ActivateTypeOutput(data.ActivateTypeResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ActivateTypeCommand");
var de_BatchDescribeTypeConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_BatchDescribeTypeConfigurationsOutput(data.BatchDescribeTypeConfigurationsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_BatchDescribeTypeConfigurationsCommand");
var de_CancelUpdateStackCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_CancelUpdateStackCommand");
var de_ContinueUpdateRollbackCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ContinueUpdateRollbackOutput(data.ContinueUpdateRollbackResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ContinueUpdateRollbackCommand");
var de_CreateChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_CreateChangeSetOutput(data.CreateChangeSetResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_CreateChangeSetCommand");
var de_CreateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_CreateGeneratedTemplateOutput(data.CreateGeneratedTemplateResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_CreateGeneratedTemplateCommand");
var de_CreateStackCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_CreateStackOutput(data.CreateStackResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_CreateStackCommand");
var de_CreateStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_CreateStackInstancesOutput(data.CreateStackInstancesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_CreateStackInstancesCommand");
var de_CreateStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_CreateStackRefactorOutput(data.CreateStackRefactorResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_CreateStackRefactorCommand");
var de_CreateStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_CreateStackSetOutput(data.CreateStackSetResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_CreateStackSetCommand");
var de_DeactivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DeactivateOrganizationsAccessOutput(data.DeactivateOrganizationsAccessResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DeactivateOrganizationsAccessCommand");
var de_DeactivateTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DeactivateTypeOutput(data.DeactivateTypeResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DeactivateTypeCommand");
var de_DeleteChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DeleteChangeSetOutput(data.DeleteChangeSetResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DeleteChangeSetCommand");
var de_DeleteGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteGeneratedTemplateCommand");
var de_DeleteStackCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteStackCommand");
var de_DeleteStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DeleteStackInstancesOutput(data.DeleteStackInstancesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DeleteStackInstancesCommand");
var de_DeleteStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DeleteStackSetOutput(data.DeleteStackSetResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DeleteStackSetCommand");
var de_DeregisterTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DeregisterTypeOutput(data.DeregisterTypeResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DeregisterTypeCommand");
var de_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeAccountLimitsOutput(data.DescribeAccountLimitsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeAccountLimitsCommand");
var de_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeChangeSetOutput(data.DescribeChangeSetResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeChangeSetCommand");
var de_DescribeChangeSetHooksCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeChangeSetHooksOutput(data.DescribeChangeSetHooksResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeChangeSetHooksCommand");
var de_DescribeGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeGeneratedTemplateOutput(data.DescribeGeneratedTemplateResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeGeneratedTemplateCommand");
var de_DescribeOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeOrganizationsAccessOutput(data.DescribeOrganizationsAccessResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeOrganizationsAccessCommand");
var de_DescribePublisherCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribePublisherOutput(data.DescribePublisherResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribePublisherCommand");
var de_DescribeResourceScanCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeResourceScanOutput(data.DescribeResourceScanResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeResourceScanCommand");
var de_DescribeStackDriftDetectionStatusCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStackDriftDetectionStatusOutput(data.DescribeStackDriftDetectionStatusResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStackDriftDetectionStatusCommand");
var de_DescribeStackEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStackEventsOutput(data.DescribeStackEventsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStackEventsCommand");
var de_DescribeStackInstanceCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStackInstanceOutput(data.DescribeStackInstanceResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStackInstanceCommand");
var de_DescribeStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStackRefactorOutput(data.DescribeStackRefactorResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStackRefactorCommand");
var de_DescribeStackResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStackResourceOutput(data.DescribeStackResourceResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStackResourceCommand");
var de_DescribeStackResourceDriftsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStackResourceDriftsOutput(data.DescribeStackResourceDriftsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStackResourceDriftsCommand");
var de_DescribeStackResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStackResourcesOutput(data.DescribeStackResourcesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStackResourcesCommand");
var de_DescribeStacksCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStacksOutput(data.DescribeStacksResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStacksCommand");
var de_DescribeStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStackSetOutput(data.DescribeStackSetResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStackSetCommand");
var de_DescribeStackSetOperationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeStackSetOperationOutput(data.DescribeStackSetOperationResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeStackSetOperationCommand");
var de_DescribeTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeTypeOutput(data.DescribeTypeResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeTypeCommand");
var de_DescribeTypeRegistrationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DescribeTypeRegistrationOutput(data.DescribeTypeRegistrationResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeTypeRegistrationCommand");
var de_DetectStackDriftCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DetectStackDriftOutput(data.DetectStackDriftResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DetectStackDriftCommand");
var de_DetectStackResourceDriftCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DetectStackResourceDriftOutput(data.DetectStackResourceDriftResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DetectStackResourceDriftCommand");
var de_DetectStackSetDriftCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_DetectStackSetDriftOutput(data.DetectStackSetDriftResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DetectStackSetDriftCommand");
var de_EstimateTemplateCostCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_EstimateTemplateCostOutput(data.EstimateTemplateCostResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_EstimateTemplateCostCommand");
var de_ExecuteChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ExecuteChangeSetOutput(data.ExecuteChangeSetResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ExecuteChangeSetCommand");
var de_ExecuteStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_ExecuteStackRefactorCommand");
var de_GetGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_GetGeneratedTemplateOutput(data.GetGeneratedTemplateResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetGeneratedTemplateCommand");
var de_GetStackPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_GetStackPolicyOutput(data.GetStackPolicyResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetStackPolicyCommand");
var de_GetTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_GetTemplateOutput(data.GetTemplateResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetTemplateCommand");
var de_GetTemplateSummaryCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_GetTemplateSummaryOutput(data.GetTemplateSummaryResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetTemplateSummaryCommand");
var de_ImportStacksToStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ImportStacksToStackSetOutput(data.ImportStacksToStackSetResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ImportStacksToStackSetCommand");
var de_ListChangeSetsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListChangeSetsOutput(data.ListChangeSetsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListChangeSetsCommand");
var de_ListExportsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListExportsOutput(data.ListExportsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListExportsCommand");
var de_ListGeneratedTemplatesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListGeneratedTemplatesOutput(data.ListGeneratedTemplatesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListGeneratedTemplatesCommand");
var de_ListHookResultsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListHookResultsOutput(data.ListHookResultsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListHookResultsCommand");
var de_ListImportsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListImportsOutput(data.ListImportsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListImportsCommand");
var de_ListResourceScanRelatedResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListResourceScanRelatedResourcesOutput(data.ListResourceScanRelatedResourcesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListResourceScanRelatedResourcesCommand");
var de_ListResourceScanResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListResourceScanResourcesOutput(data.ListResourceScanResourcesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListResourceScanResourcesCommand");
var de_ListResourceScansCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListResourceScansOutput(data.ListResourceScansResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListResourceScansCommand");
var de_ListStackInstanceResourceDriftsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStackInstanceResourceDriftsOutput(data.ListStackInstanceResourceDriftsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStackInstanceResourceDriftsCommand");
var de_ListStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStackInstancesOutput(data.ListStackInstancesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStackInstancesCommand");
var de_ListStackRefactorActionsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStackRefactorActionsOutput(data.ListStackRefactorActionsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStackRefactorActionsCommand");
var de_ListStackRefactorsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStackRefactorsOutput(data.ListStackRefactorsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStackRefactorsCommand");
var de_ListStackResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStackResourcesOutput(data.ListStackResourcesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStackResourcesCommand");
var de_ListStacksCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStacksOutput(data.ListStacksResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStacksCommand");
var de_ListStackSetAutoDeploymentTargetsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStackSetAutoDeploymentTargetsOutput(data.ListStackSetAutoDeploymentTargetsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStackSetAutoDeploymentTargetsCommand");
var de_ListStackSetOperationResultsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStackSetOperationResultsOutput(data.ListStackSetOperationResultsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStackSetOperationResultsCommand");
var de_ListStackSetOperationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStackSetOperationsOutput(data.ListStackSetOperationsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStackSetOperationsCommand");
var de_ListStackSetsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListStackSetsOutput(data.ListStackSetsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListStackSetsCommand");
var de_ListTypeRegistrationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListTypeRegistrationsOutput(data.ListTypeRegistrationsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListTypeRegistrationsCommand");
var de_ListTypesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListTypesOutput(data.ListTypesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListTypesCommand");
var de_ListTypeVersionsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ListTypeVersionsOutput(data.ListTypeVersionsResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListTypeVersionsCommand");
var de_PublishTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_PublishTypeOutput(data.PublishTypeResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PublishTypeCommand");
var de_RecordHandlerProgressCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_RecordHandlerProgressOutput(data.RecordHandlerProgressResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_RecordHandlerProgressCommand");
var de_RegisterPublisherCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_RegisterPublisherOutput(data.RegisterPublisherResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_RegisterPublisherCommand");
var de_RegisterTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_RegisterTypeOutput(data.RegisterTypeResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_RegisterTypeCommand");
var de_RollbackStackCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_RollbackStackOutput(data.RollbackStackResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_RollbackStackCommand");
var de_SetStackPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_SetStackPolicyCommand");
var de_SetTypeConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_SetTypeConfigurationOutput(data.SetTypeConfigurationResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_SetTypeConfigurationCommand");
var de_SetTypeDefaultVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_SetTypeDefaultVersionOutput(data.SetTypeDefaultVersionResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_SetTypeDefaultVersionCommand");
var de_SignalResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_SignalResourceCommand");
var de_StartResourceScanCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_StartResourceScanOutput(data.StartResourceScanResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_StartResourceScanCommand");
var de_StopStackSetOperationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_StopStackSetOperationOutput(data.StopStackSetOperationResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_StopStackSetOperationCommand");
var de_TestTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_TestTypeOutput(data.TestTypeResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_TestTypeCommand");
var de_UpdateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_UpdateGeneratedTemplateOutput(data.UpdateGeneratedTemplateResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_UpdateGeneratedTemplateCommand");
var de_UpdateStackCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_UpdateStackOutput(data.UpdateStackResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_UpdateStackCommand");
var de_UpdateStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_UpdateStackInstancesOutput(data.UpdateStackInstancesResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_UpdateStackInstancesCommand");
var de_UpdateStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_UpdateStackSetOutput(data.UpdateStackSetResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_UpdateStackSetCommand");
var de_UpdateTerminationProtectionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_UpdateTerminationProtectionOutput(data.UpdateTerminationProtectionResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_UpdateTerminationProtectionCommand");
var de_ValidateTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseXmlBody)(output.body, context);
let contents = {};
contents = de_ValidateTemplateOutput(data.ValidateTemplateResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ValidateTemplateCommand");
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await (0, import_core2.parseXmlErrorBody)(output.body, context)
};
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidOperationException":
case "com.amazonaws.cloudformation#InvalidOperationException":
throw await de_InvalidOperationExceptionRes(parsedOutput, context);
case "OperationNotFoundException":
case "com.amazonaws.cloudformation#OperationNotFoundException":
throw await de_OperationNotFoundExceptionRes(parsedOutput, context);
case "CFNRegistryException":
case "com.amazonaws.cloudformation#CFNRegistryException":
throw await de_CFNRegistryExceptionRes(parsedOutput, context);
case "TypeNotFoundException":
case "com.amazonaws.cloudformation#TypeNotFoundException":
throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
case "TypeConfigurationNotFoundException":
case "com.amazonaws.cloudformation#TypeConfigurationNotFoundException":
throw await de_TypeConfigurationNotFoundExceptionRes(parsedOutput, context);
case "TokenAlreadyExistsException":
case "com.amazonaws.cloudformation#TokenAlreadyExistsException":
throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);
case "AlreadyExistsException":
case "com.amazonaws.cloudformation#AlreadyExistsException":
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
case "InsufficientCapabilitiesException":
case "com.amazonaws.cloudformation#InsufficientCapabilitiesException":
throw await de_InsufficientCapabilitiesExceptionRes(parsedOutput, context);
case "LimitExceededException":
case "com.amazonaws.cloudformation#LimitExceededException":
throw await de_LimitExceededExceptionRes(parsedOutput, context);
case "ConcurrentResourcesLimitExceeded":
case "com.amazonaws.cloudformation#ConcurrentResourcesLimitExceededException":
throw await de_ConcurrentResourcesLimitExceededExceptionRes(parsedOutput, context);
case "OperationIdAlreadyExistsException":
case "com.amazonaws.cloudformation#OperationIdAlreadyExistsException":
throw await de_OperationIdAlreadyExistsExceptionRes(parsedOutput, context);
case "OperationInProgressException":
case "com.amazonaws.cloudformation#OperationInProgressException":
throw await de_OperationInProgressExceptionRes(parsedOutput, context);
case "StackSetNotFoundException":
case "com.amazonaws.cloudformation#StackSetNotFoundException":
throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);
case "StaleRequestException":
case "com.amazonaws.cloudformation#StaleRequestException":
throw await de_StaleRequestExceptionRes(parsedOutput, context);
case "CreatedButModifiedException":
case "com.amazonaws.cloudformation#CreatedButModifiedException":
throw await de_CreatedButModifiedExceptionRes(parsedOutput, context);
case "NameAlreadyExistsException":
case "com.amazonaws.cloudformation#NameAlreadyExistsException":
throw await de_NameAlreadyExistsExceptionRes(parsedOutput, context);
case "InvalidChangeSetStatus":
case "com.amazonaws.cloudformation#InvalidChangeSetStatusException":
throw await de_InvalidChangeSetStatusExceptionRes(parsedOutput, context);
case "GeneratedTemplateNotFound":
case "com.amazonaws.cloudformation#GeneratedTemplateNotFoundException":
throw await de_GeneratedTemplateNotFoundExceptionRes(parsedOutput, context);
case "StackSetNotEmptyException":
case "com.amazonaws.cloudformation#StackSetNotEmptyException":
throw await de_StackSetNotEmptyExceptionRes(parsedOutput, context);
case "ChangeSetNotFound":
case "com.amazonaws.cloudformation#ChangeSetNotFoundException":
throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context);
case "ResourceScanNotFound":
case "com.amazonaws.cloudformation#ResourceScanNotFoundException":
throw await de_ResourceScanNotFoundExceptionRes(parsedOutput, context);
case "StackInstanceNotFoundException":
case "com.amazonaws.cloudformation#StackInstanceNotFoundException":
throw await de_StackInstanceNotFoundExceptionRes(parsedOutput, context);
case "StackRefactorNotFoundException":
case "com.amazonaws.cloudformation#StackRefactorNotFoundException":
throw await de_StackRefactorNotFoundExceptionRes(parsedOutput, context);
case "StackNotFoundException":
case "com.amazonaws.cloudformation#StackNotFoundException":
throw await de_StackNotFoundExceptionRes(parsedOutput, context);
case "HookResultNotFound":
case "com.amazonaws.cloudformation#HookResultNotFoundException":
throw await de_HookResultNotFoundExceptionRes(parsedOutput, context);
case "ResourceScanInProgress":
case "com.amazonaws.cloudformation#ResourceScanInProgressException":
throw await de_ResourceScanInProgressExceptionRes(parsedOutput, context);
case "ConditionalCheckFailed":
case "com.amazonaws.cloudformation#OperationStatusCheckFailedException":
throw await de_OperationStatusCheckFailedExceptionRes(parsedOutput, context);
case "InvalidStateTransition":
case "com.amazonaws.cloudformation#InvalidStateTransitionException":
throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
case "ResourceScanLimitExceeded":
case "com.amazonaws.cloudformation#ResourceScanLimitExceededException":
throw await de_ResourceScanLimitExceededExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody: parsedBody.Error,
errorCode
});
}
}, "de_CommandError");
var de_AlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_AlreadyExistsException(body.Error, context);
const exception = new AlreadyExistsException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_AlreadyExistsExceptionRes");
var de_CFNRegistryExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_CFNRegistryException(body.Error, context);
const exception = new CFNRegistryException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_CFNRegistryExceptionRes");
var de_ChangeSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_ChangeSetNotFoundException(body.Error, context);
const exception = new ChangeSetNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ChangeSetNotFoundExceptionRes");
var de_ConcurrentResourcesLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_ConcurrentResourcesLimitExceededException(body.Error, context);
const exception = new ConcurrentResourcesLimitExceededException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ConcurrentResourcesLimitExceededExceptionRes");
var de_CreatedButModifiedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_CreatedButModifiedException(body.Error, context);
const exception = new CreatedButModifiedException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_CreatedButModifiedExceptionRes");
var de_GeneratedTemplateNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_GeneratedTemplateNotFoundException(body.Error, context);
const exception = new GeneratedTemplateNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_GeneratedTemplateNotFoundExceptionRes");
var de_HookResultNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_HookResultNotFoundException(body.Error, context);
const exception = new HookResultNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_HookResultNotFoundExceptionRes");
var de_InsufficientCapabilitiesExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_InsufficientCapabilitiesException(body.Error, context);
const exception = new InsufficientCapabilitiesException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_InsufficientCapabilitiesExceptionRes");
var de_InvalidChangeSetStatusExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_InvalidChangeSetStatusException(body.Error, context);
const exception = new InvalidChangeSetStatusException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_InvalidChangeSetStatusExceptionRes");
var de_InvalidOperationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_InvalidOperationException(body.Error, context);
const exception = new InvalidOperationException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_InvalidOperationExceptionRes");
var de_InvalidStateTransitionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_InvalidStateTransitionException(body.Error, context);
const exception = new InvalidStateTransitionException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_InvalidStateTransitionExceptionRes");
var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_LimitExceededException(body.Error, context);
const exception = new LimitExceededException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_LimitExceededExceptionRes");
var de_NameAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_NameAlreadyExistsException(body.Error, context);
const exception = new NameAlreadyExistsException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_NameAlreadyExistsExceptionRes");
var de_OperationIdAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_OperationIdAlreadyExistsException(body.Error, context);
const exception = new OperationIdAlreadyExistsException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_OperationIdAlreadyExistsExceptionRes");
var de_OperationInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_OperationInProgressException(body.Error, context);
const exception = new OperationInProgressException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_OperationInProgressExceptionRes");
var de_OperationNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_OperationNotFoundException(body.Error, context);
const exception = new OperationNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_OperationNotFoundExceptionRes");
var de_OperationStatusCheckFailedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_OperationStatusCheckFailedException(body.Error, context);
const exception = new OperationStatusCheckFailedException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_OperationStatusCheckFailedExceptionRes");
var de_ResourceScanInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_ResourceScanInProgressException(body.Error, context);
const exception = new ResourceScanInProgressException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ResourceScanInProgressExceptionRes");
var de_ResourceScanLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_ResourceScanLimitExceededException(body.Error, context);
const exception = new ResourceScanLimitExceededException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ResourceScanLimitExceededExceptionRes");
var de_ResourceScanNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_ResourceScanNotFoundException(body.Error, context);
const exception = new ResourceScanNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ResourceScanNotFoundExceptionRes");
var de_StackInstanceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_StackInstanceNotFoundException(body.Error, context);
const exception = new StackInstanceNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_StackInstanceNotFoundExceptionRes");
var de_StackNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_StackNotFoundException(body.Error, context);
const exception = new StackNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_StackNotFoundExceptionRes");
var de_StackRefactorNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_StackRefactorNotFoundException(body.Error, context);
const exception = new StackRefactorNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_StackRefactorNotFoundExceptionRes");
var de_StackSetNotEmptyExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_StackSetNotEmptyException(body.Error, context);
const exception = new StackSetNotEmptyException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_StackSetNotEmptyExceptionRes");
var de_StackSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_StackSetNotFoundException(body.Error, context);
const exception = new StackSetNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_StackSetNotFoundExceptionRes");
var de_StaleRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_StaleRequestException(body.Error, context);
const exception = new StaleRequestException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_StaleRequestExceptionRes");
var de_TokenAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_TokenAlreadyExistsException(body.Error, context);
const exception = new TokenAlreadyExistsException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_TokenAlreadyExistsExceptionRes");
var de_TypeConfigurationNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_TypeConfigurationNotFoundException(body.Error, context);
const exception = new TypeConfigurationNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_TypeConfigurationNotFoundExceptionRes");
var de_TypeNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_TypeNotFoundException(body.Error, context);
const exception = new TypeNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_TypeNotFoundExceptionRes");
var se_AccountList = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_AccountList");
var se_ActivateOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
return entries;
}, "se_ActivateOrganizationsAccessInput");
var se_ActivateTypeInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_PTA] != null) {
entries[_PTA] = input[_PTA];
}
if (input[_PI] != null) {
entries[_PI] = input[_PI];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_TNA] != null) {
entries[_TNA] = input[_TNA];
}
if (input[_AU] != null) {
entries[_AU] = input[_AU];
}
if (input[_LC] != null) {
const memberEntries = se_LoggingConfig(input[_LC], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `LoggingConfig.${key}`;
entries[loc] = value;
});
}
if (input[_ERA] != null) {
entries[_ERA] = input[_ERA];
}
if (input[_VB] != null) {
entries[_VB] = input[_VB];
}
if (input[_MV] != null) {
entries[_MV] = input[_MV];
}
return entries;
}, "se_ActivateTypeInput");
var se_AutoDeployment = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_E] != null) {
entries[_E] = input[_E];
}
if (input[_RSOAR] != null) {
entries[_RSOAR] = input[_RSOAR];
}
return entries;
}, "se_AutoDeployment");
var se_BatchDescribeTypeConfigurationsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_TCI] != null) {
const memberEntries = se_TypeConfigurationIdentifiers(input[_TCI], context);
if (input[_TCI]?.length === 0) {
entries.TypeConfigurationIdentifiers = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `TypeConfigurationIdentifiers.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_BatchDescribeTypeConfigurationsInput");
var se_CancelUpdateStackInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
return entries;
}, "se_CancelUpdateStackInput");
var se_Capabilities = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_Capabilities");
var se_ContinueUpdateRollbackInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_RARN] != null) {
entries[_RARN] = input[_RARN];
}
if (input[_RTS] != null) {
const memberEntries = se_ResourcesToSkip(input[_RTS], context);
if (input[_RTS]?.length === 0) {
entries.ResourcesToSkip = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ResourcesToSkip.${key}`;
entries[loc] = value;
});
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
return entries;
}, "se_ContinueUpdateRollbackInput");
var se_CreateChangeSetInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_TB] != null) {
entries[_TB] = input[_TB];
}
if (input[_TURL] != null) {
entries[_TURL] = input[_TURL];
}
if (input[_UPT] != null) {
entries[_UPT] = input[_UPT];
}
if (input[_P] != null) {
const memberEntries = se_Parameters(input[_P], context);
if (input[_P]?.length === 0) {
entries.Parameters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Parameters.${key}`;
entries[loc] = value;
});
}
if (input[_C] != null) {
const memberEntries = se_Capabilities(input[_C], context);
if (input[_C]?.length === 0) {
entries.Capabilities = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Capabilities.${key}`;
entries[loc] = value;
});
}
if (input[_RTe] != null) {
const memberEntries = se_ResourceTypes(input[_RTe], context);
if (input[_RTe]?.length === 0) {
entries.ResourceTypes = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ResourceTypes.${key}`;
entries[loc] = value;
});
}
if (input[_RARN] != null) {
entries[_RARN] = input[_RARN];
}
if (input[_RC] != null) {
const memberEntries = se_RollbackConfiguration(input[_RC], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `RollbackConfiguration.${key}`;
entries[loc] = value;
});
}
if (input[_NARN] != null) {
const memberEntries = se_NotificationARNs(input[_NARN], context);
if (input[_NARN]?.length === 0) {
entries.NotificationARNs = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `NotificationARNs.${key}`;
entries[loc] = value;
});
}
if (input[_Ta] != null) {
const memberEntries = se_Tags(input[_Ta], context);
if (input[_Ta]?.length === 0) {
entries.Tags = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Tags.${key}`;
entries[loc] = value;
});
}
if (input[_CSN] != null) {
entries[_CSN] = input[_CSN];
}
if (input[_CT] != null) {
entries[_CT] = input[_CT];
}
if (input[_D] != null) {
entries[_D] = input[_D];
}
if (input[_CST] != null) {
entries[_CST] = input[_CST];
}
if (input[_RTI] != null) {
const memberEntries = se_ResourcesToImport(input[_RTI], context);
if (input[_RTI]?.length === 0) {
entries.ResourcesToImport = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ResourcesToImport.${key}`;
entries[loc] = value;
});
}
if (input[_INS] != null) {
entries[_INS] = input[_INS];
}
if (input[_OSF] != null) {
entries[_OSF] = input[_OSF];
}
if (input[_IER] != null) {
entries[_IER] = input[_IER];
}
return entries;
}, "se_CreateChangeSetInput");
var se_CreateGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_R] != null) {
const memberEntries = se_ResourceDefinitions(input[_R], context);
if (input[_R]?.length === 0) {
entries.Resources = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Resources.${key}`;
entries[loc] = value;
});
}
if (input[_GTN] != null) {
entries[_GTN] = input[_GTN];
}
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_TC] != null) {
const memberEntries = se_TemplateConfiguration(input[_TC], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `TemplateConfiguration.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_CreateGeneratedTemplateInput");
var se_CreateStackInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_TB] != null) {
entries[_TB] = input[_TB];
}
if (input[_TURL] != null) {
entries[_TURL] = input[_TURL];
}
if (input[_P] != null) {
const memberEntries = se_Parameters(input[_P], context);
if (input[_P]?.length === 0) {
entries.Parameters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Parameters.${key}`;
entries[loc] = value;
});
}
if (input[_DR] != null) {
entries[_DR] = input[_DR];
}
if (input[_RC] != null) {
const memberEntries = se_RollbackConfiguration(input[_RC], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `RollbackConfiguration.${key}`;
entries[loc] = value;
});
}
if (input[_TIM] != null) {
entries[_TIM] = input[_TIM];
}
if (input[_NARN] != null) {
const memberEntries = se_NotificationARNs(input[_NARN], context);
if (input[_NARN]?.length === 0) {
entries.NotificationARNs = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `NotificationARNs.${key}`;
entries[loc] = value;
});
}
if (input[_C] != null) {
const memberEntries = se_Capabilities(input[_C], context);
if (input[_C]?.length === 0) {
entries.Capabilities = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Capabilities.${key}`;
entries[loc] = value;
});
}
if (input[_RTe] != null) {
const memberEntries = se_ResourceTypes(input[_RTe], context);
if (input[_RTe]?.length === 0) {
entries.ResourceTypes = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ResourceTypes.${key}`;
entries[loc] = value;
});
}
if (input[_RARN] != null) {
entries[_RARN] = input[_RARN];
}
if (input[_OF] != null) {
entries[_OF] = input[_OF];
}
if (input[_SPB] != null) {
entries[_SPB] = input[_SPB];
}
if (input[_SPURL] != null) {
entries[_SPURL] = input[_SPURL];
}
if (input[_Ta] != null) {
const memberEntries = se_Tags(input[_Ta], context);
if (input[_Ta]?.length === 0) {
entries.Tags = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Tags.${key}`;
entries[loc] = value;
});
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
if (input[_ETP] != null) {
entries[_ETP] = input[_ETP];
}
if (input[_REOC] != null) {
entries[_REOC] = input[_REOC];
}
return entries;
}, "se_CreateStackInput");
var se_CreateStackInstancesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_Ac] != null) {
const memberEntries = se_AccountList(input[_Ac], context);
if (input[_Ac]?.length === 0) {
entries.Accounts = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Accounts.${key}`;
entries[loc] = value;
});
}
if (input[_DTep] != null) {
const memberEntries = se_DeploymentTargets(input[_DTep], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `DeploymentTargets.${key}`;
entries[loc] = value;
});
}
if (input[_Re] != null) {
const memberEntries = se_RegionList(input[_Re], context);
if (input[_Re]?.length === 0) {
entries.Regions = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Regions.${key}`;
entries[loc] = value;
});
}
if (input[_PO] != null) {
const memberEntries = se_Parameters(input[_PO], context);
if (input[_PO]?.length === 0) {
entries.ParameterOverrides = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ParameterOverrides.${key}`;
entries[loc] = value;
});
}
if (input[_OP] != null) {
const memberEntries = se_StackSetOperationPreferences(input[_OP], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `OperationPreferences.${key}`;
entries[loc] = value;
});
}
if (input[_OI] === void 0) {
input[_OI] = (0, import_uuid.v4)();
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_CreateStackInstancesInput");
var se_CreateStackRefactorInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_D] != null) {
entries[_D] = input[_D];
}
if (input[_ESC] != null) {
entries[_ESC] = input[_ESC];
}
if (input[_RM] != null) {
const memberEntries = se_ResourceMappings(input[_RM], context);
if (input[_RM]?.length === 0) {
entries.ResourceMappings = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ResourceMappings.${key}`;
entries[loc] = value;
});
}
if (input[_SD] != null) {
const memberEntries = se_StackDefinitions(input[_SD], context);
if (input[_SD]?.length === 0) {
entries.StackDefinitions = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `StackDefinitions.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_CreateStackRefactorInput");
var se_CreateStackSetInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_D] != null) {
entries[_D] = input[_D];
}
if (input[_TB] != null) {
entries[_TB] = input[_TB];
}
if (input[_TURL] != null) {
entries[_TURL] = input[_TURL];
}
if (input[_SI] != null) {
entries[_SI] = input[_SI];
}
if (input[_P] != null) {
const memberEntries = se_Parameters(input[_P], context);
if (input[_P]?.length === 0) {
entries.Parameters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Parameters.${key}`;
entries[loc] = value;
});
}
if (input[_C] != null) {
const memberEntries = se_Capabilities(input[_C], context);
if (input[_C]?.length === 0) {
entries.Capabilities = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Capabilities.${key}`;
entries[loc] = value;
});
}
if (input[_Ta] != null) {
const memberEntries = se_Tags(input[_Ta], context);
if (input[_Ta]?.length === 0) {
entries.Tags = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Tags.${key}`;
entries[loc] = value;
});
}
if (input[_ARARN] != null) {
entries[_ARARN] = input[_ARARN];
}
if (input[_ERN] != null) {
entries[_ERN] = input[_ERN];
}
if (input[_PM] != null) {
entries[_PM] = input[_PM];
}
if (input[_AD] != null) {
const memberEntries = se_AutoDeployment(input[_AD], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `AutoDeployment.${key}`;
entries[loc] = value;
});
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
if (input[_CRT] === void 0) {
input[_CRT] = (0, import_uuid.v4)();
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
if (input[_ME] != null) {
const memberEntries = se_ManagedExecution(input[_ME], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ManagedExecution.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_CreateStackSetInput");
var se_DeactivateOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
return entries;
}, "se_DeactivateOrganizationsAccessInput");
var se_DeactivateTypeInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_Ar] != null) {
entries[_Ar] = input[_Ar];
}
return entries;
}, "se_DeactivateTypeInput");
var se_DeleteChangeSetInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_CSN] != null) {
entries[_CSN] = input[_CSN];
}
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
return entries;
}, "se_DeleteChangeSetInput");
var se_DeleteGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_GTN] != null) {
entries[_GTN] = input[_GTN];
}
return entries;
}, "se_DeleteGeneratedTemplateInput");
var se_DeleteStackInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_RR] != null) {
const memberEntries = se_RetainResources(input[_RR], context);
if (input[_RR]?.length === 0) {
entries.RetainResources = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `RetainResources.${key}`;
entries[loc] = value;
});
}
if (input[_RARN] != null) {
entries[_RARN] = input[_RARN];
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
if (input[_DM] != null) {
entries[_DM] = input[_DM];
}
return entries;
}, "se_DeleteStackInput");
var se_DeleteStackInstancesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_Ac] != null) {
const memberEntries = se_AccountList(input[_Ac], context);
if (input[_Ac]?.length === 0) {
entries.Accounts = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Accounts.${key}`;
entries[loc] = value;
});
}
if (input[_DTep] != null) {
const memberEntries = se_DeploymentTargets(input[_DTep], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `DeploymentTargets.${key}`;
entries[loc] = value;
});
}
if (input[_Re] != null) {
const memberEntries = se_RegionList(input[_Re], context);
if (input[_Re]?.length === 0) {
entries.Regions = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Regions.${key}`;
entries[loc] = value;
});
}
if (input[_OP] != null) {
const memberEntries = se_StackSetOperationPreferences(input[_OP], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `OperationPreferences.${key}`;
entries[loc] = value;
});
}
if (input[_RSe] != null) {
entries[_RSe] = input[_RSe];
}
if (input[_OI] === void 0) {
input[_OI] = (0, import_uuid.v4)();
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_DeleteStackInstancesInput");
var se_DeleteStackSetInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_DeleteStackSetInput");
var se_DeploymentTargets = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_Ac] != null) {
const memberEntries = se_AccountList(input[_Ac], context);
if (input[_Ac]?.length === 0) {
entries.Accounts = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Accounts.${key}`;
entries[loc] = value;
});
}
if (input[_AUc] != null) {
entries[_AUc] = input[_AUc];
}
if (input[_OUI] != null) {
const memberEntries = se_OrganizationalUnitIdList(input[_OUI], context);
if (input[_OUI]?.length === 0) {
entries.OrganizationalUnitIds = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `OrganizationalUnitIds.${key}`;
entries[loc] = value;
});
}
if (input[_AFT] != null) {
entries[_AFT] = input[_AFT];
}
return entries;
}, "se_DeploymentTargets");
var se_DeregisterTypeInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_Ar] != null) {
entries[_Ar] = input[_Ar];
}
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_VI] != null) {
entries[_VI] = input[_VI];
}
return entries;
}, "se_DeregisterTypeInput");
var se_DescribeAccountLimitsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_DescribeAccountLimitsInput");
var se_DescribeChangeSetHooksInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_CSN] != null) {
entries[_CSN] = input[_CSN];
}
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_LRI] != null) {
entries[_LRI] = input[_LRI];
}
return entries;
}, "se_DescribeChangeSetHooksInput");
var se_DescribeChangeSetInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_CSN] != null) {
entries[_CSN] = input[_CSN];
}
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_IPV] != null) {
entries[_IPV] = input[_IPV];
}
return entries;
}, "se_DescribeChangeSetInput");
var se_DescribeGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_GTN] != null) {
entries[_GTN] = input[_GTN];
}
return entries;
}, "se_DescribeGeneratedTemplateInput");
var se_DescribeOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_DescribeOrganizationsAccessInput");
var se_DescribePublisherInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_PI] != null) {
entries[_PI] = input[_PI];
}
return entries;
}, "se_DescribePublisherInput");
var se_DescribeResourceScanInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RSI] != null) {
entries[_RSI] = input[_RSI];
}
return entries;
}, "se_DescribeResourceScanInput");
var se_DescribeStackDriftDetectionStatusInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SDDI] != null) {
entries[_SDDI] = input[_SDDI];
}
return entries;
}, "se_DescribeStackDriftDetectionStatusInput");
var se_DescribeStackEventsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_DescribeStackEventsInput");
var se_DescribeStackInstanceInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_SIA] != null) {
entries[_SIA] = input[_SIA];
}
if (input[_SIR] != null) {
entries[_SIR] = input[_SIR];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_DescribeStackInstanceInput");
var se_DescribeStackRefactorInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SRI] != null) {
entries[_SRI] = input[_SRI];
}
return entries;
}, "se_DescribeStackRefactorInput");
var se_DescribeStackResourceDriftsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_SRDSF] != null) {
const memberEntries = se_StackResourceDriftStatusFilters(input[_SRDSF], context);
if (input[_SRDSF]?.length === 0) {
entries.StackResourceDriftStatusFilters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `StackResourceDriftStatusFilters.${key}`;
entries[loc] = value;
});
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
return entries;
}, "se_DescribeStackResourceDriftsInput");
var se_DescribeStackResourceInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_LRI] != null) {
entries[_LRI] = input[_LRI];
}
return entries;
}, "se_DescribeStackResourceInput");
var se_DescribeStackResourcesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_LRI] != null) {
entries[_LRI] = input[_LRI];
}
if (input[_PRI] != null) {
entries[_PRI] = input[_PRI];
}
return entries;
}, "se_DescribeStackResourcesInput");
var se_DescribeStackSetInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_DescribeStackSetInput");
var se_DescribeStackSetOperationInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_DescribeStackSetOperationInput");
var se_DescribeStacksInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_DescribeStacksInput");
var se_DescribeTypeInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_Ar] != null) {
entries[_Ar] = input[_Ar];
}
if (input[_VI] != null) {
entries[_VI] = input[_VI];
}
if (input[_PI] != null) {
entries[_PI] = input[_PI];
}
if (input[_PVN] != null) {
entries[_PVN] = input[_PVN];
}
return entries;
}, "se_DescribeTypeInput");
var se_DescribeTypeRegistrationInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RTeg] != null) {
entries[_RTeg] = input[_RTeg];
}
return entries;
}, "se_DescribeTypeRegistrationInput");
var se_DetectStackDriftInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_LRIo] != null) {
const memberEntries = se_LogicalResourceIds(input[_LRIo], context);
if (input[_LRIo]?.length === 0) {
entries.LogicalResourceIds = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `LogicalResourceIds.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_DetectStackDriftInput");
var se_DetectStackResourceDriftInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_LRI] != null) {
entries[_LRI] = input[_LRI];
}
return entries;
}, "se_DetectStackResourceDriftInput");
var se_DetectStackSetDriftInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_OP] != null) {
const memberEntries = se_StackSetOperationPreferences(input[_OP], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `OperationPreferences.${key}`;
entries[loc] = value;
});
}
if (input[_OI] === void 0) {
input[_OI] = (0, import_uuid.v4)();
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_DetectStackSetDriftInput");
var se_EstimateTemplateCostInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_TB] != null) {
entries[_TB] = input[_TB];
}
if (input[_TURL] != null) {
entries[_TURL] = input[_TURL];
}
if (input[_P] != null) {
const memberEntries = se_Parameters(input[_P], context);
if (input[_P]?.length === 0) {
entries.Parameters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Parameters.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_EstimateTemplateCostInput");
var se_ExecuteChangeSetInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_CSN] != null) {
entries[_CSN] = input[_CSN];
}
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
if (input[_DR] != null) {
entries[_DR] = input[_DR];
}
if (input[_REOC] != null) {
entries[_REOC] = input[_REOC];
}
return entries;
}, "se_ExecuteChangeSetInput");
var se_ExecuteStackRefactorInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SRI] != null) {
entries[_SRI] = input[_SRI];
}
return entries;
}, "se_ExecuteStackRefactorInput");
var se_GetGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_F] != null) {
entries[_F] = input[_F];
}
if (input[_GTN] != null) {
entries[_GTN] = input[_GTN];
}
return entries;
}, "se_GetGeneratedTemplateInput");
var se_GetStackPolicyInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
return entries;
}, "se_GetStackPolicyInput");
var se_GetTemplateInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_CSN] != null) {
entries[_CSN] = input[_CSN];
}
if (input[_TS] != null) {
entries[_TS] = input[_TS];
}
return entries;
}, "se_GetTemplateInput");
var se_GetTemplateSummaryInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_TB] != null) {
entries[_TB] = input[_TB];
}
if (input[_TURL] != null) {
entries[_TURL] = input[_TURL];
}
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
if (input[_TSC] != null) {
const memberEntries = se_TemplateSummaryConfig(input[_TSC], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `TemplateSummaryConfig.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_GetTemplateSummaryInput");
var se_ImportStacksToStackSetInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_SIt] != null) {
const memberEntries = se_StackIdList(input[_SIt], context);
if (input[_SIt]?.length === 0) {
entries.StackIds = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `StackIds.${key}`;
entries[loc] = value;
});
}
if (input[_SIU] != null) {
entries[_SIU] = input[_SIU];
}
if (input[_OUI] != null) {
const memberEntries = se_OrganizationalUnitIdList(input[_OUI], context);
if (input[_OUI]?.length === 0) {
entries.OrganizationalUnitIds = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `OrganizationalUnitIds.${key}`;
entries[loc] = value;
});
}
if (input[_OP] != null) {
const memberEntries = se_StackSetOperationPreferences(input[_OP], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `OperationPreferences.${key}`;
entries[loc] = value;
});
}
if (input[_OI] === void 0) {
input[_OI] = (0, import_uuid.v4)();
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_ImportStacksToStackSetInput");
var se_JazzLogicalResourceIds = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_JazzLogicalResourceIds");
var se_JazzResourceIdentifierProperties = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
Object.keys(input).filter((key) => input[key] != null).forEach((key) => {
entries[`entry.${counter}.key`] = key;
entries[`entry.${counter}.value`] = input[key];
counter++;
});
return entries;
}, "se_JazzResourceIdentifierProperties");
var se_ListChangeSetsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_ListChangeSetsInput");
var se_ListExportsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_ListExportsInput");
var se_ListGeneratedTemplatesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
return entries;
}, "se_ListGeneratedTemplatesInput");
var se_ListHookResultsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_TTa] != null) {
entries[_TTa] = input[_TTa];
}
if (input[_TI] != null) {
entries[_TI] = input[_TI];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_ListHookResultsInput");
var se_ListImportsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_EN] != null) {
entries[_EN] = input[_EN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_ListImportsInput");
var se_ListResourceScanRelatedResourcesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RSI] != null) {
entries[_RSI] = input[_RSI];
}
if (input[_R] != null) {
const memberEntries = se_ScannedResourceIdentifiers(input[_R], context);
if (input[_R]?.length === 0) {
entries.Resources = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Resources.${key}`;
entries[loc] = value;
});
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
return entries;
}, "se_ListResourceScanRelatedResourcesInput");
var se_ListResourceScanResourcesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RSI] != null) {
entries[_RSI] = input[_RSI];
}
if (input[_RI] != null) {
entries[_RI] = input[_RI];
}
if (input[_RTP] != null) {
entries[_RTP] = input[_RTP];
}
if (input[_TK] != null) {
entries[_TK] = input[_TK];
}
if (input[_TV] != null) {
entries[_TV] = input[_TV];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
return entries;
}, "se_ListResourceScanResourcesInput");
var se_ListResourceScansInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_STF] != null) {
entries[_STF] = input[_STF];
}
return entries;
}, "se_ListResourceScansInput");
var se_ListStackInstanceResourceDriftsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_SIRDS] != null) {
const memberEntries = se_StackResourceDriftStatusFilters(input[_SIRDS], context);
if (input[_SIRDS]?.length === 0) {
entries.StackInstanceResourceDriftStatuses = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `StackInstanceResourceDriftStatuses.${key}`;
entries[loc] = value;
});
}
if (input[_SIA] != null) {
entries[_SIA] = input[_SIA];
}
if (input[_SIR] != null) {
entries[_SIR] = input[_SIR];
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_ListStackInstanceResourceDriftsInput");
var se_ListStackInstancesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_Fi] != null) {
const memberEntries = se_StackInstanceFilters(input[_Fi], context);
if (input[_Fi]?.length === 0) {
entries.Filters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Filters.${key}`;
entries[loc] = value;
});
}
if (input[_SIA] != null) {
entries[_SIA] = input[_SIA];
}
if (input[_SIR] != null) {
entries[_SIR] = input[_SIR];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_ListStackInstancesInput");
var se_ListStackRefactorActionsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SRI] != null) {
entries[_SRI] = input[_SRI];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
return entries;
}, "se_ListStackRefactorActionsInput");
var se_ListStackRefactorsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_ESF] != null) {
const memberEntries = se_StackRefactorExecutionStatusFilter(input[_ESF], context);
if (input[_ESF]?.length === 0) {
entries.ExecutionStatusFilter = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ExecutionStatusFilter.${key}`;
entries[loc] = value;
});
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
return entries;
}, "se_ListStackRefactorsInput");
var se_ListStackResourcesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_ListStackResourcesInput");
var se_ListStackSetAutoDeploymentTargetsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_ListStackSetAutoDeploymentTargetsInput");
var se_ListStackSetOperationResultsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
if (input[_Fi] != null) {
const memberEntries = se_OperationResultFilters(input[_Fi], context);
if (input[_Fi]?.length === 0) {
entries.Filters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Filters.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_ListStackSetOperationResultsInput");
var se_ListStackSetOperationsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_ListStackSetOperationsInput");
var se_ListStackSetsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_S] != null) {
entries[_S] = input[_S];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_ListStackSetsInput");
var se_ListStacksInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_SSF] != null) {
const memberEntries = se_StackStatusFilter(input[_SSF], context);
if (input[_SSF]?.length === 0) {
entries.StackStatusFilter = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `StackStatusFilter.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_ListStacksInput");
var se_ListTypeRegistrationsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_TA] != null) {
entries[_TA] = input[_TA];
}
if (input[_RSF] != null) {
entries[_RSF] = input[_RSF];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_ListTypeRegistrationsInput");
var se_ListTypesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_Vi] != null) {
entries[_Vi] = input[_Vi];
}
if (input[_PTr] != null) {
entries[_PTr] = input[_PTr];
}
if (input[_DSep] != null) {
entries[_DSep] = input[_DSep];
}
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_Fi] != null) {
const memberEntries = se_TypeFilters(input[_Fi], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Filters.${key}`;
entries[loc] = value;
});
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
return entries;
}, "se_ListTypesInput");
var se_ListTypeVersionsInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_Ar] != null) {
entries[_Ar] = input[_Ar];
}
if (input[_MR] != null) {
entries[_MR] = input[_MR];
}
if (input[_NT] != null) {
entries[_NT] = input[_NT];
}
if (input[_DSep] != null) {
entries[_DSep] = input[_DSep];
}
if (input[_PI] != null) {
entries[_PI] = input[_PI];
}
return entries;
}, "se_ListTypeVersionsInput");
var se_LoggingConfig = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_LRA] != null) {
entries[_LRA] = input[_LRA];
}
if (input[_LGN] != null) {
entries[_LGN] = input[_LGN];
}
return entries;
}, "se_LoggingConfig");
var se_LogicalResourceIds = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_LogicalResourceIds");
var se_ManagedExecution = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_Act] != null) {
entries[_Act] = input[_Act];
}
return entries;
}, "se_ManagedExecution");
var se_NotificationARNs = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_NotificationARNs");
var se_OperationResultFilter = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_N] != null) {
entries[_N] = input[_N];
}
if (input[_Va] != null) {
entries[_Va] = input[_Va];
}
return entries;
}, "se_OperationResultFilter");
var se_OperationResultFilters = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_OperationResultFilter(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_OperationResultFilters");
var se_OrganizationalUnitIdList = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_OrganizationalUnitIdList");
var se_Parameter = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_PK] != null) {
entries[_PK] = input[_PK];
}
if (input[_PV] != null) {
entries[_PV] = input[_PV];
}
if (input[_UPV] != null) {
entries[_UPV] = input[_UPV];
}
if (input[_RV] != null) {
entries[_RV] = input[_RV];
}
return entries;
}, "se_Parameter");
var se_Parameters = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_Parameter(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_Parameters");
var se_PublishTypeInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_Ar] != null) {
entries[_Ar] = input[_Ar];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_PVN] != null) {
entries[_PVN] = input[_PVN];
}
return entries;
}, "se_PublishTypeInput");
var se_RecordHandlerProgressInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_BT] != null) {
entries[_BT] = input[_BT];
}
if (input[_OS] != null) {
entries[_OS] = input[_OS];
}
if (input[_COS] != null) {
entries[_COS] = input[_COS];
}
if (input[_SM] != null) {
entries[_SM] = input[_SM];
}
if (input[_EC] != null) {
entries[_EC] = input[_EC];
}
if (input[_RMe] != null) {
entries[_RMe] = input[_RMe];
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
return entries;
}, "se_RecordHandlerProgressInput");
var se_RegionList = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_RegionList");
var se_RegisterPublisherInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_ATAC] != null) {
entries[_ATAC] = input[_ATAC];
}
if (input[_CAo] != null) {
entries[_CAo] = input[_CAo];
}
return entries;
}, "se_RegisterPublisherInput");
var se_RegisterTypeInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_SHP] != null) {
entries[_SHP] = input[_SHP];
}
if (input[_LC] != null) {
const memberEntries = se_LoggingConfig(input[_LC], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `LoggingConfig.${key}`;
entries[loc] = value;
});
}
if (input[_ERA] != null) {
entries[_ERA] = input[_ERA];
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
return entries;
}, "se_RegisterTypeInput");
var se_ResourceDefinition = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RTes] != null) {
entries[_RTes] = input[_RTes];
}
if (input[_LRI] != null) {
entries[_LRI] = input[_LRI];
}
if (input[_RI] != null) {
const memberEntries = se_ResourceIdentifierProperties(input[_RI], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ResourceIdentifier.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_ResourceDefinition");
var se_ResourceDefinitions = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_ResourceDefinition(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_ResourceDefinitions");
var se_ResourceIdentifierProperties = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
Object.keys(input).filter((key) => input[key] != null).forEach((key) => {
entries[`entry.${counter}.key`] = key;
entries[`entry.${counter}.value`] = input[key];
counter++;
});
return entries;
}, "se_ResourceIdentifierProperties");
var se_ResourceLocation = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_LRI] != null) {
entries[_LRI] = input[_LRI];
}
return entries;
}, "se_ResourceLocation");
var se_ResourceMapping = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_So] != null) {
const memberEntries = se_ResourceLocation(input[_So], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Source.${key}`;
entries[loc] = value;
});
}
if (input[_De] != null) {
const memberEntries = se_ResourceLocation(input[_De], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Destination.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_ResourceMapping");
var se_ResourceMappings = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_ResourceMapping(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_ResourceMappings");
var se_ResourcesToImport = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_ResourceToImport(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_ResourcesToImport");
var se_ResourcesToSkip = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_ResourcesToSkip");
var se_ResourceToImport = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RTes] != null) {
entries[_RTes] = input[_RTes];
}
if (input[_LRI] != null) {
entries[_LRI] = input[_LRI];
}
if (input[_RI] != null) {
const memberEntries = se_ResourceIdentifierProperties(input[_RI], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ResourceIdentifier.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_ResourceToImport");
var se_ResourceTypeFilters = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_ResourceTypeFilters");
var se_ResourceTypes = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_ResourceTypes");
var se_RetainResources = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_RetainResources");
var se_RollbackConfiguration = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RTo] != null) {
const memberEntries = se_RollbackTriggers(input[_RTo], context);
if (input[_RTo]?.length === 0) {
entries.RollbackTriggers = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `RollbackTriggers.${key}`;
entries[loc] = value;
});
}
if (input[_MTIM] != null) {
entries[_MTIM] = input[_MTIM];
}
return entries;
}, "se_RollbackConfiguration");
var se_RollbackStackInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_RARN] != null) {
entries[_RARN] = input[_RARN];
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
if (input[_REOC] != null) {
entries[_REOC] = input[_REOC];
}
return entries;
}, "se_RollbackStackInput");
var se_RollbackTrigger = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_Ar] != null) {
entries[_Ar] = input[_Ar];
}
if (input[_T] != null) {
entries[_T] = input[_T];
}
return entries;
}, "se_RollbackTrigger");
var se_RollbackTriggers = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_RollbackTrigger(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_RollbackTriggers");
var se_ScanFilter = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_Ty] != null) {
const memberEntries = se_ResourceTypeFilters(input[_Ty], context);
if (input[_Ty]?.length === 0) {
entries.Types = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Types.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_ScanFilter");
var se_ScanFilters = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_ScanFilter(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_ScanFilters");
var se_ScannedResourceIdentifier = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RTes] != null) {
entries[_RTes] = input[_RTes];
}
if (input[_RI] != null) {
const memberEntries = se_JazzResourceIdentifierProperties(input[_RI], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ResourceIdentifier.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_ScannedResourceIdentifier");
var se_ScannedResourceIdentifiers = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_ScannedResourceIdentifier(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_ScannedResourceIdentifiers");
var se_SetStackPolicyInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_SPB] != null) {
entries[_SPB] = input[_SPB];
}
if (input[_SPURL] != null) {
entries[_SPURL] = input[_SPURL];
}
return entries;
}, "se_SetStackPolicyInput");
var se_SetTypeConfigurationInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_TA] != null) {
entries[_TA] = input[_TA];
}
if (input[_Co] != null) {
entries[_Co] = input[_Co];
}
if (input[_CAon] != null) {
entries[_CAon] = input[_CAon];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_T] != null) {
entries[_T] = input[_T];
}
return entries;
}, "se_SetTypeConfigurationInput");
var se_SetTypeDefaultVersionInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_Ar] != null) {
entries[_Ar] = input[_Ar];
}
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_VI] != null) {
entries[_VI] = input[_VI];
}
return entries;
}, "se_SetTypeDefaultVersionInput");
var se_SignalResourceInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_LRI] != null) {
entries[_LRI] = input[_LRI];
}
if (input[_UI] != null) {
entries[_UI] = input[_UI];
}
if (input[_S] != null) {
entries[_S] = input[_S];
}
return entries;
}, "se_SignalResourceInput");
var se_StackDefinition = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_TB] != null) {
entries[_TB] = input[_TB];
}
if (input[_TURL] != null) {
entries[_TURL] = input[_TURL];
}
return entries;
}, "se_StackDefinition");
var se_StackDefinitions = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_StackDefinition(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_StackDefinitions");
var se_StackIdList = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_StackIdList");
var se_StackInstanceFilter = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_N] != null) {
entries[_N] = input[_N];
}
if (input[_Va] != null) {
entries[_Va] = input[_Va];
}
return entries;
}, "se_StackInstanceFilter");
var se_StackInstanceFilters = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_StackInstanceFilter(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_StackInstanceFilters");
var se_StackRefactorExecutionStatusFilter = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_StackRefactorExecutionStatusFilter");
var se_StackResourceDriftStatusFilters = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_StackResourceDriftStatusFilters");
var se_StackSetOperationPreferences = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RCT] != null) {
entries[_RCT] = input[_RCT];
}
if (input[_RO] != null) {
const memberEntries = se_RegionList(input[_RO], context);
if (input[_RO]?.length === 0) {
entries.RegionOrder = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `RegionOrder.${key}`;
entries[loc] = value;
});
}
if (input[_FTC] != null) {
entries[_FTC] = input[_FTC];
}
if (input[_FTP] != null) {
entries[_FTP] = input[_FTP];
}
if (input[_MCC] != null) {
entries[_MCC] = input[_MCC];
}
if (input[_MCP] != null) {
entries[_MCP] = input[_MCP];
}
if (input[_CM] != null) {
entries[_CM] = input[_CM];
}
return entries;
}, "se_StackSetOperationPreferences");
var se_StackStatusFilter = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_StackStatusFilter");
var se_StartResourceScanInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
if (input[_SF] != null) {
const memberEntries = se_ScanFilters(input[_SF], context);
if (input[_SF]?.length === 0) {
entries.ScanFilters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ScanFilters.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_StartResourceScanInput");
var se_StopStackSetOperationInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_StopStackSetOperationInput");
var se_Tag = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_K] != null) {
entries[_K] = input[_K];
}
if (input[_Val] != null) {
entries[_Val] = input[_Val];
}
return entries;
}, "se_Tag");
var se_Tags = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_Tag(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_Tags");
var se_TemplateConfiguration = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_DPe] != null) {
entries[_DPe] = input[_DPe];
}
if (input[_URP] != null) {
entries[_URP] = input[_URP];
}
return entries;
}, "se_TemplateConfiguration");
var se_TemplateSummaryConfig = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_TURTAW] != null) {
entries[_TURTAW] = input[_TURTAW];
}
return entries;
}, "se_TemplateSummaryConfig");
var se_TestTypeInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_Ar] != null) {
entries[_Ar] = input[_Ar];
}
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
if (input[_VI] != null) {
entries[_VI] = input[_VI];
}
if (input[_LDB] != null) {
entries[_LDB] = input[_LDB];
}
return entries;
}, "se_TestTypeInput");
var se_TypeConfigurationIdentifier = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_TA] != null) {
entries[_TA] = input[_TA];
}
if (input[_TCA] != null) {
entries[_TCA] = input[_TCA];
}
if (input[_TCAy] != null) {
entries[_TCAy] = input[_TCAy];
}
if (input[_T] != null) {
entries[_T] = input[_T];
}
if (input[_TN] != null) {
entries[_TN] = input[_TN];
}
return entries;
}, "se_TypeConfigurationIdentifier");
var se_TypeConfigurationIdentifiers = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_TypeConfigurationIdentifier(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_TypeConfigurationIdentifiers");
var se_TypeFilters = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_Ca] != null) {
entries[_Ca] = input[_Ca];
}
if (input[_PI] != null) {
entries[_PI] = input[_PI];
}
if (input[_TNP] != null) {
entries[_TNP] = input[_TNP];
}
return entries;
}, "se_TypeFilters");
var se_UpdateGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_GTN] != null) {
entries[_GTN] = input[_GTN];
}
if (input[_NGTN] != null) {
entries[_NGTN] = input[_NGTN];
}
if (input[_AR] != null) {
const memberEntries = se_ResourceDefinitions(input[_AR], context);
if (input[_AR]?.length === 0) {
entries.AddResources = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `AddResources.${key}`;
entries[loc] = value;
});
}
if (input[_RRe] != null) {
const memberEntries = se_JazzLogicalResourceIds(input[_RRe], context);
if (input[_RRe]?.length === 0) {
entries.RemoveResources = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `RemoveResources.${key}`;
entries[loc] = value;
});
}
if (input[_RAR] != null) {
entries[_RAR] = input[_RAR];
}
if (input[_TC] != null) {
const memberEntries = se_TemplateConfiguration(input[_TC], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `TemplateConfiguration.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_UpdateGeneratedTemplateInput");
var se_UpdateStackInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_TB] != null) {
entries[_TB] = input[_TB];
}
if (input[_TURL] != null) {
entries[_TURL] = input[_TURL];
}
if (input[_UPT] != null) {
entries[_UPT] = input[_UPT];
}
if (input[_SPDUB] != null) {
entries[_SPDUB] = input[_SPDUB];
}
if (input[_SPDUURL] != null) {
entries[_SPDUURL] = input[_SPDUURL];
}
if (input[_P] != null) {
const memberEntries = se_Parameters(input[_P], context);
if (input[_P]?.length === 0) {
entries.Parameters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Parameters.${key}`;
entries[loc] = value;
});
}
if (input[_C] != null) {
const memberEntries = se_Capabilities(input[_C], context);
if (input[_C]?.length === 0) {
entries.Capabilities = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Capabilities.${key}`;
entries[loc] = value;
});
}
if (input[_RTe] != null) {
const memberEntries = se_ResourceTypes(input[_RTe], context);
if (input[_RTe]?.length === 0) {
entries.ResourceTypes = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ResourceTypes.${key}`;
entries[loc] = value;
});
}
if (input[_RARN] != null) {
entries[_RARN] = input[_RARN];
}
if (input[_RC] != null) {
const memberEntries = se_RollbackConfiguration(input[_RC], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `RollbackConfiguration.${key}`;
entries[loc] = value;
});
}
if (input[_SPB] != null) {
entries[_SPB] = input[_SPB];
}
if (input[_SPURL] != null) {
entries[_SPURL] = input[_SPURL];
}
if (input[_NARN] != null) {
const memberEntries = se_NotificationARNs(input[_NARN], context);
if (input[_NARN]?.length === 0) {
entries.NotificationARNs = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `NotificationARNs.${key}`;
entries[loc] = value;
});
}
if (input[_Ta] != null) {
const memberEntries = se_Tags(input[_Ta], context);
if (input[_Ta]?.length === 0) {
entries.Tags = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Tags.${key}`;
entries[loc] = value;
});
}
if (input[_DR] != null) {
entries[_DR] = input[_DR];
}
if (input[_CRT] != null) {
entries[_CRT] = input[_CRT];
}
if (input[_REOC] != null) {
entries[_REOC] = input[_REOC];
}
return entries;
}, "se_UpdateStackInput");
var se_UpdateStackInstancesInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_Ac] != null) {
const memberEntries = se_AccountList(input[_Ac], context);
if (input[_Ac]?.length === 0) {
entries.Accounts = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Accounts.${key}`;
entries[loc] = value;
});
}
if (input[_DTep] != null) {
const memberEntries = se_DeploymentTargets(input[_DTep], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `DeploymentTargets.${key}`;
entries[loc] = value;
});
}
if (input[_Re] != null) {
const memberEntries = se_RegionList(input[_Re], context);
if (input[_Re]?.length === 0) {
entries.Regions = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Regions.${key}`;
entries[loc] = value;
});
}
if (input[_PO] != null) {
const memberEntries = se_Parameters(input[_PO], context);
if (input[_PO]?.length === 0) {
entries.ParameterOverrides = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ParameterOverrides.${key}`;
entries[loc] = value;
});
}
if (input[_OP] != null) {
const memberEntries = se_StackSetOperationPreferences(input[_OP], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `OperationPreferences.${key}`;
entries[loc] = value;
});
}
if (input[_OI] === void 0) {
input[_OI] = (0, import_uuid.v4)();
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_UpdateStackInstancesInput");
var se_UpdateStackSetInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_SSN] != null) {
entries[_SSN] = input[_SSN];
}
if (input[_D] != null) {
entries[_D] = input[_D];
}
if (input[_TB] != null) {
entries[_TB] = input[_TB];
}
if (input[_TURL] != null) {
entries[_TURL] = input[_TURL];
}
if (input[_UPT] != null) {
entries[_UPT] = input[_UPT];
}
if (input[_P] != null) {
const memberEntries = se_Parameters(input[_P], context);
if (input[_P]?.length === 0) {
entries.Parameters = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Parameters.${key}`;
entries[loc] = value;
});
}
if (input[_C] != null) {
const memberEntries = se_Capabilities(input[_C], context);
if (input[_C]?.length === 0) {
entries.Capabilities = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Capabilities.${key}`;
entries[loc] = value;
});
}
if (input[_Ta] != null) {
const memberEntries = se_Tags(input[_Ta], context);
if (input[_Ta]?.length === 0) {
entries.Tags = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Tags.${key}`;
entries[loc] = value;
});
}
if (input[_OP] != null) {
const memberEntries = se_StackSetOperationPreferences(input[_OP], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `OperationPreferences.${key}`;
entries[loc] = value;
});
}
if (input[_ARARN] != null) {
entries[_ARARN] = input[_ARARN];
}
if (input[_ERN] != null) {
entries[_ERN] = input[_ERN];
}
if (input[_DTep] != null) {
const memberEntries = se_DeploymentTargets(input[_DTep], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `DeploymentTargets.${key}`;
entries[loc] = value;
});
}
if (input[_PM] != null) {
entries[_PM] = input[_PM];
}
if (input[_AD] != null) {
const memberEntries = se_AutoDeployment(input[_AD], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `AutoDeployment.${key}`;
entries[loc] = value;
});
}
if (input[_OI] === void 0) {
input[_OI] = (0, import_uuid.v4)();
}
if (input[_OI] != null) {
entries[_OI] = input[_OI];
}
if (input[_Ac] != null) {
const memberEntries = se_AccountList(input[_Ac], context);
if (input[_Ac]?.length === 0) {
entries.Accounts = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Accounts.${key}`;
entries[loc] = value;
});
}
if (input[_Re] != null) {
const memberEntries = se_RegionList(input[_Re], context);
if (input[_Re]?.length === 0) {
entries.Regions = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Regions.${key}`;
entries[loc] = value;
});
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
if (input[_ME] != null) {
const memberEntries = se_ManagedExecution(input[_ME], context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ManagedExecution.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_UpdateStackSetInput");
var se_UpdateTerminationProtectionInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_ETP] != null) {
entries[_ETP] = input[_ETP];
}
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
return entries;
}, "se_UpdateTerminationProtectionInput");
var se_ValidateTemplateInput = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_TB] != null) {
entries[_TB] = input[_TB];
}
if (input[_TURL] != null) {
entries[_TURL] = input[_TURL];
}
return entries;
}, "se_ValidateTemplateInput");
var de_AccountGateResult = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
return contents;
}, "de_AccountGateResult");
var de_AccountLimit = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_N] != null) {
contents[_N] = (0, import_smithy_client.expectString)(output[_N]);
}
if (output[_Val] != null) {
contents[_Val] = (0, import_smithy_client.strictParseInt32)(output[_Val]);
}
return contents;
}, "de_AccountLimit");
var de_AccountLimitList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_AccountLimit(entry, context);
});
}, "de_AccountLimitList");
var de_AccountList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_AccountList");
var de_ActivateOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_ActivateOrganizationsAccessOutput");
var de_ActivateTypeOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Ar] != null) {
contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);
}
return contents;
}, "de_ActivateTypeOutput");
var de_AllowedValues = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_AllowedValues");
var de_AlreadyExistsException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_AlreadyExistsException");
var de_AutoDeployment = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_E] != null) {
contents[_E] = (0, import_smithy_client.parseBoolean)(output[_E]);
}
if (output[_RSOAR] != null) {
contents[_RSOAR] = (0, import_smithy_client.parseBoolean)(output[_RSOAR]);
}
return contents;
}, "de_AutoDeployment");
var de_BatchDescribeTypeConfigurationsError = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_EC] != null) {
contents[_EC] = (0, import_smithy_client.expectString)(output[_EC]);
}
if (output[_EM] != null) {
contents[_EM] = (0, import_smithy_client.expectString)(output[_EM]);
}
if (output[_TCIy] != null) {
contents[_TCIy] = de_TypeConfigurationIdentifier(output[_TCIy], context);
}
return contents;
}, "de_BatchDescribeTypeConfigurationsError");
var de_BatchDescribeTypeConfigurationsErrors = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_BatchDescribeTypeConfigurationsError(entry, context);
});
}, "de_BatchDescribeTypeConfigurationsErrors");
var de_BatchDescribeTypeConfigurationsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Errors === "") {
contents[_Er] = [];
} else if (output[_Er] != null && output[_Er][_m] != null) {
contents[_Er] = de_BatchDescribeTypeConfigurationsErrors((0, import_smithy_client.getArrayIfSingleItem)(output[_Er][_m]), context);
}
if (output.UnprocessedTypeConfigurations === "") {
contents[_UTC] = [];
} else if (output[_UTC] != null && output[_UTC][_m] != null) {
contents[_UTC] = de_UnprocessedTypeConfigurations((0, import_smithy_client.getArrayIfSingleItem)(output[_UTC][_m]), context);
}
if (output.TypeConfigurations === "") {
contents[_TCy] = [];
} else if (output[_TCy] != null && output[_TCy][_m] != null) {
contents[_TCy] = de_TypeConfigurationDetailsList((0, import_smithy_client.getArrayIfSingleItem)(output[_TCy][_m]), context);
}
return contents;
}, "de_BatchDescribeTypeConfigurationsOutput");
var de_Capabilities = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_Capabilities");
var de_CFNRegistryException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_CFNRegistryException");
var de_Change = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_T] != null) {
contents[_T] = (0, import_smithy_client.expectString)(output[_T]);
}
if (output[_HIC] != null) {
contents[_HIC] = (0, import_smithy_client.strictParseInt32)(output[_HIC]);
}
if (output[_RCe] != null) {
contents[_RCe] = de_ResourceChange(output[_RCe], context);
}
return contents;
}, "de_Change");
var de_Changes = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Change(entry, context);
});
}, "de_Changes");
var de_ChangeSetHook = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_IP] != null) {
contents[_IP] = (0, import_smithy_client.expectString)(output[_IP]);
}
if (output[_FM] != null) {
contents[_FM] = (0, import_smithy_client.expectString)(output[_FM]);
}
if (output[_TN] != null) {
contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
}
if (output[_TVI] != null) {
contents[_TVI] = (0, import_smithy_client.expectString)(output[_TVI]);
}
if (output[_TCVI] != null) {
contents[_TCVI] = (0, import_smithy_client.expectString)(output[_TCVI]);
}
if (output[_TD] != null) {
contents[_TD] = de_ChangeSetHookTargetDetails(output[_TD], context);
}
return contents;
}, "de_ChangeSetHook");
var de_ChangeSetHookResourceTargetDetails = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output[_RA] != null) {
contents[_RA] = (0, import_smithy_client.expectString)(output[_RA]);
}
return contents;
}, "de_ChangeSetHookResourceTargetDetails");
var de_ChangeSetHooks = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ChangeSetHook(entry, context);
});
}, "de_ChangeSetHooks");
var de_ChangeSetHookTargetDetails = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_TTa] != null) {
contents[_TTa] = (0, import_smithy_client.expectString)(output[_TTa]);
}
if (output[_RTD] != null) {
contents[_RTD] = de_ChangeSetHookResourceTargetDetails(output[_RTD], context);
}
return contents;
}, "de_ChangeSetHookTargetDetails");
var de_ChangeSetNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_ChangeSetNotFoundException");
var de_ChangeSetSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ChangeSetSummary(entry, context);
});
}, "de_ChangeSetSummaries");
var de_ChangeSetSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_SN] != null) {
contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);
}
if (output[_CSIh] != null) {
contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);
}
if (output[_CSN] != null) {
contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]);
}
if (output[_ES] != null) {
contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_CTr] != null) {
contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_INS] != null) {
contents[_INS] = (0, import_smithy_client.parseBoolean)(output[_INS]);
}
if (output[_PCSI] != null) {
contents[_PCSI] = (0, import_smithy_client.expectString)(output[_PCSI]);
}
if (output[_RCSI] != null) {
contents[_RCSI] = (0, import_smithy_client.expectString)(output[_RCSI]);
}
if (output[_IER] != null) {
contents[_IER] = (0, import_smithy_client.parseBoolean)(output[_IER]);
}
return contents;
}, "de_ChangeSetSummary");
var de_ConcurrentResourcesLimitExceededException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_ConcurrentResourcesLimitExceededException");
var de_ContinueUpdateRollbackOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_ContinueUpdateRollbackOutput");
var de_CreateChangeSetOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
return contents;
}, "de_CreateChangeSetOutput");
var de_CreatedButModifiedException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_CreatedButModifiedException");
var de_CreateGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_GTI] != null) {
contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);
}
return contents;
}, "de_CreateGeneratedTemplateOutput");
var de_CreateStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OI] != null) {
contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);
}
return contents;
}, "de_CreateStackInstancesOutput");
var de_CreateStackOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
return contents;
}, "de_CreateStackOutput");
var de_CreateStackRefactorOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SRI] != null) {
contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]);
}
return contents;
}, "de_CreateStackRefactorOutput");
var de_CreateStackSetOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SSI] != null) {
contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);
}
return contents;
}, "de_CreateStackSetOutput");
var de_DeactivateOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_DeactivateOrganizationsAccessOutput");
var de_DeactivateTypeOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_DeactivateTypeOutput");
var de_DeleteChangeSetOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_DeleteChangeSetOutput");
var de_DeleteStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OI] != null) {
contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);
}
return contents;
}, "de_DeleteStackInstancesOutput");
var de_DeleteStackSetOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_DeleteStackSetOutput");
var de_DeploymentTargets = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Accounts === "") {
contents[_Ac] = [];
} else if (output[_Ac] != null && output[_Ac][_m] != null) {
contents[_Ac] = de_AccountList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ac][_m]), context);
}
if (output[_AUc] != null) {
contents[_AUc] = (0, import_smithy_client.expectString)(output[_AUc]);
}
if (output.OrganizationalUnitIds === "") {
contents[_OUI] = [];
} else if (output[_OUI] != null && output[_OUI][_m] != null) {
contents[_OUI] = de_OrganizationalUnitIdList((0, import_smithy_client.getArrayIfSingleItem)(output[_OUI][_m]), context);
}
if (output[_AFT] != null) {
contents[_AFT] = (0, import_smithy_client.expectString)(output[_AFT]);
}
return contents;
}, "de_DeploymentTargets");
var de_DeregisterTypeOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_DeregisterTypeOutput");
var de_DescribeAccountLimitsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.AccountLimits === "") {
contents[_AL] = [];
} else if (output[_AL] != null && output[_AL][_m] != null) {
contents[_AL] = de_AccountLimitList((0, import_smithy_client.getArrayIfSingleItem)(output[_AL][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_DescribeAccountLimitsOutput");
var de_DescribeChangeSetHooksOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_CSIh] != null) {
contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);
}
if (output[_CSN] != null) {
contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]);
}
if (output.Hooks === "") {
contents[_H] = [];
} else if (output[_H] != null && output[_H][_m] != null) {
contents[_H] = de_ChangeSetHooks((0, import_smithy_client.getArrayIfSingleItem)(output[_H][_m]), context);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_SN] != null) {
contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);
}
return contents;
}, "de_DescribeChangeSetHooksOutput");
var de_DescribeChangeSetOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_CSN] != null) {
contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]);
}
if (output[_CSIh] != null) {
contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_SN] != null) {
contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output.Parameters === "") {
contents[_P] = [];
} else if (output[_P] != null && output[_P][_m] != null) {
contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);
}
if (output[_CTr] != null) {
contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));
}
if (output[_ES] != null) {
contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output.NotificationARNs === "") {
contents[_NARN] = [];
} else if (output[_NARN] != null && output[_NARN][_m] != null) {
contents[_NARN] = de_NotificationARNs((0, import_smithy_client.getArrayIfSingleItem)(output[_NARN][_m]), context);
}
if (output[_RC] != null) {
contents[_RC] = de_RollbackConfiguration(output[_RC], context);
}
if (output.Capabilities === "") {
contents[_C] = [];
} else if (output[_C] != null && output[_C][_m] != null) {
contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);
}
if (output.Tags === "") {
contents[_Ta] = [];
} else if (output[_Ta] != null && output[_Ta][_m] != null) {
contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context);
}
if (output.Changes === "") {
contents[_Ch] = [];
} else if (output[_Ch] != null && output[_Ch][_m] != null) {
contents[_Ch] = de_Changes((0, import_smithy_client.getArrayIfSingleItem)(output[_Ch][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
if (output[_INS] != null) {
contents[_INS] = (0, import_smithy_client.parseBoolean)(output[_INS]);
}
if (output[_PCSI] != null) {
contents[_PCSI] = (0, import_smithy_client.expectString)(output[_PCSI]);
}
if (output[_RCSI] != null) {
contents[_RCSI] = (0, import_smithy_client.expectString)(output[_RCSI]);
}
if (output[_OSF] != null) {
contents[_OSF] = (0, import_smithy_client.expectString)(output[_OSF]);
}
if (output[_IER] != null) {
contents[_IER] = (0, import_smithy_client.parseBoolean)(output[_IER]);
}
return contents;
}, "de_DescribeChangeSetOutput");
var de_DescribeGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_GTI] != null) {
contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);
}
if (output[_GTN] != null) {
contents[_GTN] = (0, import_smithy_client.expectString)(output[_GTN]);
}
if (output.Resources === "") {
contents[_R] = [];
} else if (output[_R] != null && output[_R][_m] != null) {
contents[_R] = de_ResourceDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_R][_m]), context);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_CTr] != null) {
contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));
}
if (output[_LUT] != null) {
contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));
}
if (output[_Pr] != null) {
contents[_Pr] = de_TemplateProgress(output[_Pr], context);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_TC] != null) {
contents[_TC] = de_TemplateConfiguration(output[_TC], context);
}
if (output[_TW] != null) {
contents[_TW] = (0, import_smithy_client.strictParseInt32)(output[_TW]);
}
return contents;
}, "de_DescribeGeneratedTemplateOutput");
var de_DescribeOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
return contents;
}, "de_DescribeOrganizationsAccessOutput");
var de_DescribePublisherOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PI] != null) {
contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);
}
if (output[_PS] != null) {
contents[_PS] = (0, import_smithy_client.expectString)(output[_PS]);
}
if (output[_IPd] != null) {
contents[_IPd] = (0, import_smithy_client.expectString)(output[_IPd]);
}
if (output[_PP] != null) {
contents[_PP] = (0, import_smithy_client.expectString)(output[_PP]);
}
return contents;
}, "de_DescribePublisherOutput");
var de_DescribeResourceScanOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RSI] != null) {
contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_ST] != null) {
contents[_ST] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ST]));
}
if (output[_ET] != null) {
contents[_ET] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ET]));
}
if (output[_PC] != null) {
contents[_PC] = (0, import_smithy_client.strictParseFloat)(output[_PC]);
}
if (output.ResourceTypes === "") {
contents[_RTe] = [];
} else if (output[_RTe] != null && output[_RTe][_m] != null) {
contents[_RTe] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RTe][_m]), context);
}
if (output[_RSes] != null) {
contents[_RSes] = (0, import_smithy_client.strictParseInt32)(output[_RSes]);
}
if (output[_RRes] != null) {
contents[_RRes] = (0, import_smithy_client.strictParseInt32)(output[_RRes]);
}
if (output.ScanFilters === "") {
contents[_SF] = [];
} else if (output[_SF] != null && output[_SF][_m] != null) {
contents[_SF] = de_ScanFilters((0, import_smithy_client.getArrayIfSingleItem)(output[_SF][_m]), context);
}
return contents;
}, "de_DescribeResourceScanOutput");
var de_DescribeStackDriftDetectionStatusOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_SDDI] != null) {
contents[_SDDI] = (0, import_smithy_client.expectString)(output[_SDDI]);
}
if (output[_SDS] != null) {
contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]);
}
if (output[_DSet] != null) {
contents[_DSet] = (0, import_smithy_client.expectString)(output[_DSet]);
}
if (output[_DSRet] != null) {
contents[_DSRet] = (0, import_smithy_client.expectString)(output[_DSRet]);
}
if (output[_DSRC] != null) {
contents[_DSRC] = (0, import_smithy_client.strictParseInt32)(output[_DSRC]);
}
if (output[_Ti] != null) {
contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));
}
return contents;
}, "de_DescribeStackDriftDetectionStatusOutput");
var de_DescribeStackEventsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.StackEvents === "") {
contents[_SE] = [];
} else if (output[_SE] != null && output[_SE][_m] != null) {
contents[_SE] = de_StackEvents((0, import_smithy_client.getArrayIfSingleItem)(output[_SE][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_DescribeStackEventsOutput");
var de_DescribeStackInstanceOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SIta] != null) {
contents[_SIta] = de_StackInstance(output[_SIta], context);
}
return contents;
}, "de_DescribeStackInstanceOutput");
var de_DescribeStackRefactorOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_SRI] != null) {
contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]);
}
if (output.StackIds === "") {
contents[_SIt] = [];
} else if (output[_SIt] != null && output[_SIt][_m] != null) {
contents[_SIt] = de_StackIds((0, import_smithy_client.getArrayIfSingleItem)(output[_SIt][_m]), context);
}
if (output[_ES] != null) {
contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);
}
if (output[_ESRx] != null) {
contents[_ESRx] = (0, import_smithy_client.expectString)(output[_ESRx]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
return contents;
}, "de_DescribeStackRefactorOutput");
var de_DescribeStackResourceDriftsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.StackResourceDrifts === "") {
contents[_SRD] = [];
} else if (output[_SRD] != null && output[_SRD][_m] != null) {
contents[_SRD] = de_StackResourceDrifts((0, import_smithy_client.getArrayIfSingleItem)(output[_SRD][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_DescribeStackResourceDriftsOutput");
var de_DescribeStackResourceOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SRDt] != null) {
contents[_SRDt] = de_StackResourceDetail(output[_SRDt], context);
}
return contents;
}, "de_DescribeStackResourceOutput");
var de_DescribeStackResourcesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.StackResources === "") {
contents[_SRta] = [];
} else if (output[_SRta] != null && output[_SRta][_m] != null) {
contents[_SRta] = de_StackResources((0, import_smithy_client.getArrayIfSingleItem)(output[_SRta][_m]), context);
}
return contents;
}, "de_DescribeStackResourcesOutput");
var de_DescribeStackSetOperationOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SSO] != null) {
contents[_SSO] = de_StackSetOperation(output[_SSO], context);
}
return contents;
}, "de_DescribeStackSetOperationOutput");
var de_DescribeStackSetOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SS] != null) {
contents[_SS] = de_StackSet(output[_SS], context);
}
return contents;
}, "de_DescribeStackSetOutput");
var de_DescribeStacksOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Stacks === "") {
contents[_St] = [];
} else if (output[_St] != null && output[_St][_m] != null) {
contents[_St] = de_Stacks((0, import_smithy_client.getArrayIfSingleItem)(output[_St][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_DescribeStacksOutput");
var de_DescribeTypeOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Ar] != null) {
contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);
}
if (output[_T] != null) {
contents[_T] = (0, import_smithy_client.expectString)(output[_T]);
}
if (output[_TN] != null) {
contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
}
if (output[_DVI] != null) {
contents[_DVI] = (0, import_smithy_client.expectString)(output[_DVI]);
}
if (output[_IDV] != null) {
contents[_IDV] = (0, import_smithy_client.parseBoolean)(output[_IDV]);
}
if (output[_TTS] != null) {
contents[_TTS] = (0, import_smithy_client.expectString)(output[_TTS]);
}
if (output[_TTSD] != null) {
contents[_TTSD] = (0, import_smithy_client.expectString)(output[_TTSD]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_Sc] != null) {
contents[_Sc] = (0, import_smithy_client.expectString)(output[_Sc]);
}
if (output[_PTr] != null) {
contents[_PTr] = (0, import_smithy_client.expectString)(output[_PTr]);
}
if (output[_DSep] != null) {
contents[_DSep] = (0, import_smithy_client.expectString)(output[_DSep]);
}
if (output[_LC] != null) {
contents[_LC] = de_LoggingConfig(output[_LC], context);
}
if (output.RequiredActivatedTypes === "") {
contents[_RAT] = [];
} else if (output[_RAT] != null && output[_RAT][_m] != null) {
contents[_RAT] = de_RequiredActivatedTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RAT][_m]), context);
}
if (output[_ERA] != null) {
contents[_ERA] = (0, import_smithy_client.expectString)(output[_ERA]);
}
if (output[_Vi] != null) {
contents[_Vi] = (0, import_smithy_client.expectString)(output[_Vi]);
}
if (output[_SU] != null) {
contents[_SU] = (0, import_smithy_client.expectString)(output[_SU]);
}
if (output[_DU] != null) {
contents[_DU] = (0, import_smithy_client.expectString)(output[_DU]);
}
if (output[_LU] != null) {
contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU]));
}
if (output[_TCi] != null) {
contents[_TCi] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_TCi]));
}
if (output[_CSo] != null) {
contents[_CSo] = (0, import_smithy_client.expectString)(output[_CSo]);
}
if (output[_PI] != null) {
contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);
}
if (output[_OTN] != null) {
contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]);
}
if (output[_OTA] != null) {
contents[_OTA] = (0, import_smithy_client.expectString)(output[_OTA]);
}
if (output[_PVN] != null) {
contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]);
}
if (output[_LPV] != null) {
contents[_LPV] = (0, import_smithy_client.expectString)(output[_LPV]);
}
if (output[_IA] != null) {
contents[_IA] = (0, import_smithy_client.parseBoolean)(output[_IA]);
}
if (output[_AU] != null) {
contents[_AU] = (0, import_smithy_client.parseBoolean)(output[_AU]);
}
return contents;
}, "de_DescribeTypeOutput");
var de_DescribeTypeRegistrationOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PSr] != null) {
contents[_PSr] = (0, import_smithy_client.expectString)(output[_PSr]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_TA] != null) {
contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);
}
if (output[_TVA] != null) {
contents[_TVA] = (0, import_smithy_client.expectString)(output[_TVA]);
}
return contents;
}, "de_DescribeTypeRegistrationOutput");
var de_DetectStackDriftOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SDDI] != null) {
contents[_SDDI] = (0, import_smithy_client.expectString)(output[_SDDI]);
}
return contents;
}, "de_DetectStackDriftOutput");
var de_DetectStackResourceDriftOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SRDta] != null) {
contents[_SRDta] = de_StackResourceDrift(output[_SRDta], context);
}
return contents;
}, "de_DetectStackResourceDriftOutput");
var de_DetectStackSetDriftOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OI] != null) {
contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);
}
return contents;
}, "de_DetectStackSetDriftOutput");
var de_EstimateTemplateCostOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_U] != null) {
contents[_U] = (0, import_smithy_client.expectString)(output[_U]);
}
return contents;
}, "de_EstimateTemplateCostOutput");
var de_ExecuteChangeSetOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_ExecuteChangeSetOutput");
var de_Export = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ESI] != null) {
contents[_ESI] = (0, import_smithy_client.expectString)(output[_ESI]);
}
if (output[_N] != null) {
contents[_N] = (0, import_smithy_client.expectString)(output[_N]);
}
if (output[_Val] != null) {
contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]);
}
return contents;
}, "de_Export");
var de_Exports = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Export(entry, context);
});
}, "de_Exports");
var de_GeneratedTemplateNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_GeneratedTemplateNotFoundException");
var de_GetGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_TB] != null) {
contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);
}
return contents;
}, "de_GetGeneratedTemplateOutput");
var de_GetStackPolicyOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SPB] != null) {
contents[_SPB] = (0, import_smithy_client.expectString)(output[_SPB]);
}
return contents;
}, "de_GetStackPolicyOutput");
var de_GetTemplateOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_TB] != null) {
contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);
}
if (output.StagesAvailable === "") {
contents[_SA] = [];
} else if (output[_SA] != null && output[_SA][_m] != null) {
contents[_SA] = de_StageList((0, import_smithy_client.getArrayIfSingleItem)(output[_SA][_m]), context);
}
return contents;
}, "de_GetTemplateOutput");
var de_GetTemplateSummaryOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Parameters === "") {
contents[_P] = [];
} else if (output[_P] != null && output[_P][_m] != null) {
contents[_P] = de_ParameterDeclarations((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output.Capabilities === "") {
contents[_C] = [];
} else if (output[_C] != null && output[_C][_m] != null) {
contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);
}
if (output[_CR] != null) {
contents[_CR] = (0, import_smithy_client.expectString)(output[_CR]);
}
if (output.ResourceTypes === "") {
contents[_RTe] = [];
} else if (output[_RTe] != null && output[_RTe][_m] != null) {
contents[_RTe] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RTe][_m]), context);
}
if (output[_V] != null) {
contents[_V] = (0, import_smithy_client.expectString)(output[_V]);
}
if (output[_Me] != null) {
contents[_Me] = (0, import_smithy_client.expectString)(output[_Me]);
}
if (output.DeclaredTransforms === "") {
contents[_DTec] = [];
} else if (output[_DTec] != null && output[_DTec][_m] != null) {
contents[_DTec] = de_TransformsList((0, import_smithy_client.getArrayIfSingleItem)(output[_DTec][_m]), context);
}
if (output.ResourceIdentifierSummaries === "") {
contents[_RIS] = [];
} else if (output[_RIS] != null && output[_RIS][_m] != null) {
contents[_RIS] = de_ResourceIdentifierSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_RIS][_m]), context);
}
if (output[_W] != null) {
contents[_W] = de_Warnings(output[_W], context);
}
return contents;
}, "de_GetTemplateSummaryOutput");
var de_HookResultNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_HookResultNotFoundException");
var de_HookResultSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_HookResultSummary(entry, context);
});
}, "de_HookResultSummaries");
var de_HookResultSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_IP] != null) {
contents[_IP] = (0, import_smithy_client.expectString)(output[_IP]);
}
if (output[_FM] != null) {
contents[_FM] = (0, import_smithy_client.expectString)(output[_FM]);
}
if (output[_TN] != null) {
contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
}
if (output[_TVI] != null) {
contents[_TVI] = (0, import_smithy_client.expectString)(output[_TVI]);
}
if (output[_TCVI] != null) {
contents[_TCVI] = (0, import_smithy_client.expectString)(output[_TCVI]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_HSR] != null) {
contents[_HSR] = (0, import_smithy_client.expectString)(output[_HSR]);
}
return contents;
}, "de_HookResultSummary");
var de_Imports = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_Imports");
var de_ImportStacksToStackSetOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OI] != null) {
contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);
}
return contents;
}, "de_ImportStacksToStackSetOutput");
var de_InsufficientCapabilitiesException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_InsufficientCapabilitiesException");
var de_InvalidChangeSetStatusException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_InvalidChangeSetStatusException");
var de_InvalidOperationException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_InvalidOperationException");
var de_InvalidStateTransitionException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_InvalidStateTransitionException");
var de_JazzResourceIdentifierProperties = /* @__PURE__ */ __name((output, context) => {
return output.reduce((acc, pair) => {
if (pair["value"] === null) {
return acc;
}
acc[pair["key"]] = (0, import_smithy_client.expectString)(pair["value"]);
return acc;
}, {});
}, "de_JazzResourceIdentifierProperties");
var de_LimitExceededException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_LimitExceededException");
var de_ListChangeSetsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Summaries === "") {
contents[_Su] = [];
} else if (output[_Su] != null && output[_Su][_m] != null) {
contents[_Su] = de_ChangeSetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListChangeSetsOutput");
var de_ListExportsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Exports === "") {
contents[_Ex] = [];
} else if (output[_Ex] != null && output[_Ex][_m] != null) {
contents[_Ex] = de_Exports((0, import_smithy_client.getArrayIfSingleItem)(output[_Ex][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListExportsOutput");
var de_ListGeneratedTemplatesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Summaries === "") {
contents[_Su] = [];
} else if (output[_Su] != null && output[_Su][_m] != null) {
contents[_Su] = de_TemplateSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListGeneratedTemplatesOutput");
var de_ListHookResultsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_TTa] != null) {
contents[_TTa] = (0, import_smithy_client.expectString)(output[_TTa]);
}
if (output[_TI] != null) {
contents[_TI] = (0, import_smithy_client.expectString)(output[_TI]);
}
if (output.HookResults === "") {
contents[_HR] = [];
} else if (output[_HR] != null && output[_HR][_m] != null) {
contents[_HR] = de_HookResultSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_HR][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListHookResultsOutput");
var de_ListImportsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Imports === "") {
contents[_Im] = [];
} else if (output[_Im] != null && output[_Im][_m] != null) {
contents[_Im] = de_Imports((0, import_smithy_client.getArrayIfSingleItem)(output[_Im][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListImportsOutput");
var de_ListResourceScanRelatedResourcesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.RelatedResources === "") {
contents[_RRel] = [];
} else if (output[_RRel] != null && output[_RRel][_m] != null) {
contents[_RRel] = de_RelatedResources((0, import_smithy_client.getArrayIfSingleItem)(output[_RRel][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListResourceScanRelatedResourcesOutput");
var de_ListResourceScanResourcesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Resources === "") {
contents[_R] = [];
} else if (output[_R] != null && output[_R][_m] != null) {
contents[_R] = de_ScannedResources((0, import_smithy_client.getArrayIfSingleItem)(output[_R][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListResourceScanResourcesOutput");
var de_ListResourceScansOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.ResourceScanSummaries === "") {
contents[_RSS] = [];
} else if (output[_RSS] != null && output[_RSS][_m] != null) {
contents[_RSS] = de_ResourceScanSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_RSS][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListResourceScansOutput");
var de_ListStackInstanceResourceDriftsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Summaries === "") {
contents[_Su] = [];
} else if (output[_Su] != null && output[_Su][_m] != null) {
contents[_Su] = de_StackInstanceResourceDriftsSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStackInstanceResourceDriftsOutput");
var de_ListStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Summaries === "") {
contents[_Su] = [];
} else if (output[_Su] != null && output[_Su][_m] != null) {
contents[_Su] = de_StackInstanceSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStackInstancesOutput");
var de_ListStackRefactorActionsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.StackRefactorActions === "") {
contents[_SRA] = [];
} else if (output[_SRA] != null && output[_SRA][_m] != null) {
contents[_SRA] = de_StackRefactorActions((0, import_smithy_client.getArrayIfSingleItem)(output[_SRA][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStackRefactorActionsOutput");
var de_ListStackRefactorsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.StackRefactorSummaries === "") {
contents[_SRSt] = [];
} else if (output[_SRSt] != null && output[_SRSt][_m] != null) {
contents[_SRSt] = de_StackRefactorSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SRSt][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStackRefactorsOutput");
var de_ListStackResourcesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.StackResourceSummaries === "") {
contents[_SRSta] = [];
} else if (output[_SRSta] != null && output[_SRSta][_m] != null) {
contents[_SRSta] = de_StackResourceSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SRSta][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStackResourcesOutput");
var de_ListStackSetAutoDeploymentTargetsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Summaries === "") {
contents[_Su] = [];
} else if (output[_Su] != null && output[_Su][_m] != null) {
contents[_Su] = de_StackSetAutoDeploymentTargetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStackSetAutoDeploymentTargetsOutput");
var de_ListStackSetOperationResultsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Summaries === "") {
contents[_Su] = [];
} else if (output[_Su] != null && output[_Su][_m] != null) {
contents[_Su] = de_StackSetOperationResultSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStackSetOperationResultsOutput");
var de_ListStackSetOperationsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Summaries === "") {
contents[_Su] = [];
} else if (output[_Su] != null && output[_Su][_m] != null) {
contents[_Su] = de_StackSetOperationSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStackSetOperationsOutput");
var de_ListStackSetsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Summaries === "") {
contents[_Su] = [];
} else if (output[_Su] != null && output[_Su][_m] != null) {
contents[_Su] = de_StackSetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStackSetsOutput");
var de_ListStacksOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.StackSummaries === "") {
contents[_SSt] = [];
} else if (output[_SSt] != null && output[_SSt][_m] != null) {
contents[_SSt] = de_StackSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SSt][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListStacksOutput");
var de_ListTypeRegistrationsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.RegistrationTokenList === "") {
contents[_RTL] = [];
} else if (output[_RTL] != null && output[_RTL][_m] != null) {
contents[_RTL] = de_RegistrationTokenList((0, import_smithy_client.getArrayIfSingleItem)(output[_RTL][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListTypeRegistrationsOutput");
var de_ListTypesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.TypeSummaries === "") {
contents[_TSy] = [];
} else if (output[_TSy] != null && output[_TSy][_m] != null) {
contents[_TSy] = de_TypeSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_TSy][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListTypesOutput");
var de_ListTypeVersionsOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.TypeVersionSummaries === "") {
contents[_TVS] = [];
} else if (output[_TVS] != null && output[_TVS][_m] != null) {
contents[_TVS] = de_TypeVersionSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_TVS][_m]), context);
}
if (output[_NT] != null) {
contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);
}
return contents;
}, "de_ListTypeVersionsOutput");
var de_LoggingConfig = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_LRA] != null) {
contents[_LRA] = (0, import_smithy_client.expectString)(output[_LRA]);
}
if (output[_LGN] != null) {
contents[_LGN] = (0, import_smithy_client.expectString)(output[_LGN]);
}
return contents;
}, "de_LoggingConfig");
var de_LogicalResourceIds = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_LogicalResourceIds");
var de_ManagedExecution = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Act] != null) {
contents[_Act] = (0, import_smithy_client.parseBoolean)(output[_Act]);
}
return contents;
}, "de_ManagedExecution");
var de_ModuleInfo = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_TH] != null) {
contents[_TH] = (0, import_smithy_client.expectString)(output[_TH]);
}
if (output[_LIH] != null) {
contents[_LIH] = (0, import_smithy_client.expectString)(output[_LIH]);
}
return contents;
}, "de_ModuleInfo");
var de_NameAlreadyExistsException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_NameAlreadyExistsException");
var de_NotificationARNs = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_NotificationARNs");
var de_OperationIdAlreadyExistsException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_OperationIdAlreadyExistsException");
var de_OperationInProgressException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_OperationInProgressException");
var de_OperationNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_OperationNotFoundException");
var de_OperationStatusCheckFailedException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_OperationStatusCheckFailedException");
var de_OrganizationalUnitIdList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_OrganizationalUnitIdList");
var de_Output = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OK] != null) {
contents[_OK] = (0, import_smithy_client.expectString)(output[_OK]);
}
if (output[_OV] != null) {
contents[_OV] = (0, import_smithy_client.expectString)(output[_OV]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_EN] != null) {
contents[_EN] = (0, import_smithy_client.expectString)(output[_EN]);
}
return contents;
}, "de_Output");
var de_Outputs = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Output(entry, context);
});
}, "de_Outputs");
var de_Parameter = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PK] != null) {
contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]);
}
if (output[_PV] != null) {
contents[_PV] = (0, import_smithy_client.expectString)(output[_PV]);
}
if (output[_UPV] != null) {
contents[_UPV] = (0, import_smithy_client.parseBoolean)(output[_UPV]);
}
if (output[_RV] != null) {
contents[_RV] = (0, import_smithy_client.expectString)(output[_RV]);
}
return contents;
}, "de_Parameter");
var de_ParameterConstraints = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.AllowedValues === "") {
contents[_AV] = [];
} else if (output[_AV] != null && output[_AV][_m] != null) {
contents[_AV] = de_AllowedValues((0, import_smithy_client.getArrayIfSingleItem)(output[_AV][_m]), context);
}
return contents;
}, "de_ParameterConstraints");
var de_ParameterDeclaration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PK] != null) {
contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]);
}
if (output[_DV] != null) {
contents[_DV] = (0, import_smithy_client.expectString)(output[_DV]);
}
if (output[_PTa] != null) {
contents[_PTa] = (0, import_smithy_client.expectString)(output[_PTa]);
}
if (output[_NE] != null) {
contents[_NE] = (0, import_smithy_client.parseBoolean)(output[_NE]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_PCa] != null) {
contents[_PCa] = de_ParameterConstraints(output[_PCa], context);
}
return contents;
}, "de_ParameterDeclaration");
var de_ParameterDeclarations = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ParameterDeclaration(entry, context);
});
}, "de_ParameterDeclarations");
var de_Parameters = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Parameter(entry, context);
});
}, "de_Parameters");
var de_PhysicalResourceIdContext = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_PhysicalResourceIdContextKeyValuePair(entry, context);
});
}, "de_PhysicalResourceIdContext");
var de_PhysicalResourceIdContextKeyValuePair = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
if (output[_Val] != null) {
contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]);
}
return contents;
}, "de_PhysicalResourceIdContextKeyValuePair");
var de_PropertyDifference = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PPr] != null) {
contents[_PPr] = (0, import_smithy_client.expectString)(output[_PPr]);
}
if (output[_EV] != null) {
contents[_EV] = (0, import_smithy_client.expectString)(output[_EV]);
}
if (output[_AVc] != null) {
contents[_AVc] = (0, import_smithy_client.expectString)(output[_AVc]);
}
if (output[_DTi] != null) {
contents[_DTi] = (0, import_smithy_client.expectString)(output[_DTi]);
}
return contents;
}, "de_PropertyDifference");
var de_PropertyDifferences = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_PropertyDifference(entry, context);
});
}, "de_PropertyDifferences");
var de_PublishTypeOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PTA] != null) {
contents[_PTA] = (0, import_smithy_client.expectString)(output[_PTA]);
}
return contents;
}, "de_PublishTypeOutput");
var de_RecordHandlerProgressOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_RecordHandlerProgressOutput");
var de_RegionList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_RegionList");
var de_RegisterPublisherOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PI] != null) {
contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);
}
return contents;
}, "de_RegisterPublisherOutput");
var de_RegisterTypeOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RTeg] != null) {
contents[_RTeg] = (0, import_smithy_client.expectString)(output[_RTeg]);
}
return contents;
}, "de_RegisterTypeOutput");
var de_RegistrationTokenList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_RegistrationTokenList");
var de_RelatedResources = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ScannedResource(entry, context);
});
}, "de_RelatedResources");
var de_RequiredActivatedType = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_TNA] != null) {
contents[_TNA] = (0, import_smithy_client.expectString)(output[_TNA]);
}
if (output[_OTN] != null) {
contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]);
}
if (output[_PI] != null) {
contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);
}
if (output.SupportedMajorVersions === "") {
contents[_SMV] = [];
} else if (output[_SMV] != null && output[_SMV][_m] != null) {
contents[_SMV] = de_SupportedMajorVersions((0, import_smithy_client.getArrayIfSingleItem)(output[_SMV][_m]), context);
}
return contents;
}, "de_RequiredActivatedType");
var de_RequiredActivatedTypes = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_RequiredActivatedType(entry, context);
});
}, "de_RequiredActivatedTypes");
var de_ResourceChange = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PA] != null) {
contents[_PA] = (0, import_smithy_client.expectString)(output[_PA]);
}
if (output[_A] != null) {
contents[_A] = (0, import_smithy_client.expectString)(output[_A]);
}
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
if (output[_PRI] != null) {
contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);
}
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output[_Rep] != null) {
contents[_Rep] = (0, import_smithy_client.expectString)(output[_Rep]);
}
if (output.Scope === "") {
contents[_Sco] = [];
} else if (output[_Sco] != null && output[_Sco][_m] != null) {
contents[_Sco] = de_Scope((0, import_smithy_client.getArrayIfSingleItem)(output[_Sco][_m]), context);
}
if (output.Details === "") {
contents[_Det] = [];
} else if (output[_Det] != null && output[_Det][_m] != null) {
contents[_Det] = de_ResourceChangeDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_Det][_m]), context);
}
if (output[_CSIh] != null) {
contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);
}
if (output[_MI] != null) {
contents[_MI] = de_ModuleInfo(output[_MI], context);
}
if (output[_BC] != null) {
contents[_BC] = (0, import_smithy_client.expectString)(output[_BC]);
}
if (output[_AC] != null) {
contents[_AC] = (0, import_smithy_client.expectString)(output[_AC]);
}
return contents;
}, "de_ResourceChange");
var de_ResourceChangeDetail = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Tar] != null) {
contents[_Tar] = de_ResourceTargetDefinition(output[_Tar], context);
}
if (output[_Ev] != null) {
contents[_Ev] = (0, import_smithy_client.expectString)(output[_Ev]);
}
if (output[_CSh] != null) {
contents[_CSh] = (0, import_smithy_client.expectString)(output[_CSh]);
}
if (output[_CE] != null) {
contents[_CE] = (0, import_smithy_client.expectString)(output[_CE]);
}
return contents;
}, "de_ResourceChangeDetail");
var de_ResourceChangeDetails = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ResourceChangeDetail(entry, context);
});
}, "de_ResourceChangeDetails");
var de_ResourceDetail = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
if (output.ResourceIdentifier === "") {
contents[_RI] = {};
} else if (output[_RI] != null && output[_RI][_e] != null) {
contents[_RI] = de_ResourceIdentifierProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_RI][_e]), context);
}
if (output[_RSeso] != null) {
contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);
}
if (output[_RSR] != null) {
contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);
}
if (output.Warnings === "") {
contents[_W] = [];
} else if (output[_W] != null && output[_W][_m] != null) {
contents[_W] = de_WarningDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_W][_m]), context);
}
return contents;
}, "de_ResourceDetail");
var de_ResourceDetails = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ResourceDetail(entry, context);
});
}, "de_ResourceDetails");
var de_ResourceIdentifierProperties = /* @__PURE__ */ __name((output, context) => {
return output.reduce((acc, pair) => {
if (pair["value"] === null) {
return acc;
}
acc[pair["key"]] = (0, import_smithy_client.expectString)(pair["value"]);
return acc;
}, {});
}, "de_ResourceIdentifierProperties");
var de_ResourceIdentifiers = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_ResourceIdentifiers");
var de_ResourceIdentifierSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ResourceIdentifierSummary(entry, context);
});
}, "de_ResourceIdentifierSummaries");
var de_ResourceIdentifierSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output.LogicalResourceIds === "") {
contents[_LRIo] = [];
} else if (output[_LRIo] != null && output[_LRIo][_m] != null) {
contents[_LRIo] = de_LogicalResourceIds((0, import_smithy_client.getArrayIfSingleItem)(output[_LRIo][_m]), context);
}
if (output.ResourceIdentifiers === "") {
contents[_RIe] = [];
} else if (output[_RIe] != null && output[_RIe][_m] != null) {
contents[_RIe] = de_ResourceIdentifiers((0, import_smithy_client.getArrayIfSingleItem)(output[_RIe][_m]), context);
}
return contents;
}, "de_ResourceIdentifierSummary");
var de_ResourceLocation = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SN] != null) {
contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);
}
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
return contents;
}, "de_ResourceLocation");
var de_ResourceMapping = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_So] != null) {
contents[_So] = de_ResourceLocation(output[_So], context);
}
if (output[_De] != null) {
contents[_De] = de_ResourceLocation(output[_De], context);
}
return contents;
}, "de_ResourceMapping");
var de_ResourceScanInProgressException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_ResourceScanInProgressException");
var de_ResourceScanLimitExceededException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_ResourceScanLimitExceededException");
var de_ResourceScanNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_ResourceScanNotFoundException");
var de_ResourceScanSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ResourceScanSummary(entry, context);
});
}, "de_ResourceScanSummaries");
var de_ResourceScanSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RSI] != null) {
contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_ST] != null) {
contents[_ST] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ST]));
}
if (output[_ET] != null) {
contents[_ET] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ET]));
}
if (output[_PC] != null) {
contents[_PC] = (0, import_smithy_client.strictParseFloat)(output[_PC]);
}
if (output[_STc] != null) {
contents[_STc] = (0, import_smithy_client.expectString)(output[_STc]);
}
return contents;
}, "de_ResourceScanSummary");
var de_ResourceTargetDefinition = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_At] != null) {
contents[_At] = (0, import_smithy_client.expectString)(output[_At]);
}
if (output[_N] != null) {
contents[_N] = (0, import_smithy_client.expectString)(output[_N]);
}
if (output[_RReq] != null) {
contents[_RReq] = (0, import_smithy_client.expectString)(output[_RReq]);
}
if (output[_Pa] != null) {
contents[_Pa] = (0, import_smithy_client.expectString)(output[_Pa]);
}
if (output[_BV] != null) {
contents[_BV] = (0, import_smithy_client.expectString)(output[_BV]);
}
if (output[_AVf] != null) {
contents[_AVf] = (0, import_smithy_client.expectString)(output[_AVf]);
}
if (output[_ACT] != null) {
contents[_ACT] = (0, import_smithy_client.expectString)(output[_ACT]);
}
return contents;
}, "de_ResourceTargetDefinition");
var de_ResourceTypeFilters = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_ResourceTypeFilters");
var de_ResourceTypes = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_ResourceTypes");
var de_RollbackConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.RollbackTriggers === "") {
contents[_RTo] = [];
} else if (output[_RTo] != null && output[_RTo][_m] != null) {
contents[_RTo] = de_RollbackTriggers((0, import_smithy_client.getArrayIfSingleItem)(output[_RTo][_m]), context);
}
if (output[_MTIM] != null) {
contents[_MTIM] = (0, import_smithy_client.strictParseInt32)(output[_MTIM]);
}
return contents;
}, "de_RollbackConfiguration");
var de_RollbackStackOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
return contents;
}, "de_RollbackStackOutput");
var de_RollbackTrigger = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Ar] != null) {
contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);
}
if (output[_T] != null) {
contents[_T] = (0, import_smithy_client.expectString)(output[_T]);
}
return contents;
}, "de_RollbackTrigger");
var de_RollbackTriggers = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_RollbackTrigger(entry, context);
});
}, "de_RollbackTriggers");
var de_ScanFilter = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Types === "") {
contents[_Ty] = [];
} else if (output[_Ty] != null && output[_Ty][_m] != null) {
contents[_Ty] = de_ResourceTypeFilters((0, import_smithy_client.getArrayIfSingleItem)(output[_Ty][_m]), context);
}
return contents;
}, "de_ScanFilter");
var de_ScanFilters = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ScanFilter(entry, context);
});
}, "de_ScanFilters");
var de_ScannedResource = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output.ResourceIdentifier === "") {
contents[_RI] = {};
} else if (output[_RI] != null && output[_RI][_e] != null) {
contents[_RI] = de_JazzResourceIdentifierProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_RI][_e]), context);
}
if (output[_MBS] != null) {
contents[_MBS] = (0, import_smithy_client.parseBoolean)(output[_MBS]);
}
return contents;
}, "de_ScannedResource");
var de_ScannedResources = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ScannedResource(entry, context);
});
}, "de_ScannedResources");
var de_Scope = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_Scope");
var de_SetTypeConfigurationOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_CAonf] != null) {
contents[_CAonf] = (0, import_smithy_client.expectString)(output[_CAonf]);
}
return contents;
}, "de_SetTypeConfigurationOutput");
var de_SetTypeDefaultVersionOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_SetTypeDefaultVersionOutput");
var de_Stack = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_SN] != null) {
contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);
}
if (output[_CSIh] != null) {
contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output.Parameters === "") {
contents[_P] = [];
} else if (output[_P] != null && output[_P][_m] != null) {
contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);
}
if (output[_CTr] != null) {
contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));
}
if (output[_DTel] != null) {
contents[_DTel] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_DTel]));
}
if (output[_LUT] != null) {
contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));
}
if (output[_RC] != null) {
contents[_RC] = de_RollbackConfiguration(output[_RC], context);
}
if (output[_SSta] != null) {
contents[_SSta] = (0, import_smithy_client.expectString)(output[_SSta]);
}
if (output[_SSR] != null) {
contents[_SSR] = (0, import_smithy_client.expectString)(output[_SSR]);
}
if (output[_DR] != null) {
contents[_DR] = (0, import_smithy_client.parseBoolean)(output[_DR]);
}
if (output.NotificationARNs === "") {
contents[_NARN] = [];
} else if (output[_NARN] != null && output[_NARN][_m] != null) {
contents[_NARN] = de_NotificationARNs((0, import_smithy_client.getArrayIfSingleItem)(output[_NARN][_m]), context);
}
if (output[_TIM] != null) {
contents[_TIM] = (0, import_smithy_client.strictParseInt32)(output[_TIM]);
}
if (output.Capabilities === "") {
contents[_C] = [];
} else if (output[_C] != null && output[_C][_m] != null) {
contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);
}
if (output.Outputs === "") {
contents[_O] = [];
} else if (output[_O] != null && output[_O][_m] != null) {
contents[_O] = de_Outputs((0, import_smithy_client.getArrayIfSingleItem)(output[_O][_m]), context);
}
if (output[_RARN] != null) {
contents[_RARN] = (0, import_smithy_client.expectString)(output[_RARN]);
}
if (output.Tags === "") {
contents[_Ta] = [];
} else if (output[_Ta] != null && output[_Ta][_m] != null) {
contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context);
}
if (output[_ETP] != null) {
contents[_ETP] = (0, import_smithy_client.parseBoolean)(output[_ETP]);
}
if (output[_PIa] != null) {
contents[_PIa] = (0, import_smithy_client.expectString)(output[_PIa]);
}
if (output[_RIo] != null) {
contents[_RIo] = (0, import_smithy_client.expectString)(output[_RIo]);
}
if (output[_DI] != null) {
contents[_DI] = de_StackDriftInformation(output[_DI], context);
}
if (output[_REOC] != null) {
contents[_REOC] = (0, import_smithy_client.parseBoolean)(output[_REOC]);
}
if (output[_DM] != null) {
contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]);
}
if (output[_DSeta] != null) {
contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]);
}
return contents;
}, "de_Stack");
var de_StackDriftInformation = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SDS] != null) {
contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]);
}
if (output[_LCT] != null) {
contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));
}
return contents;
}, "de_StackDriftInformation");
var de_StackDriftInformationSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SDS] != null) {
contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]);
}
if (output[_LCT] != null) {
contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));
}
return contents;
}, "de_StackDriftInformationSummary");
var de_StackEvent = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_EI] != null) {
contents[_EI] = (0, import_smithy_client.expectString)(output[_EI]);
}
if (output[_SN] != null) {
contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);
}
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
if (output[_PRI] != null) {
contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);
}
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output[_Ti] != null) {
contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));
}
if (output[_RSeso] != null) {
contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);
}
if (output[_RSR] != null) {
contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);
}
if (output[_RPe] != null) {
contents[_RPe] = (0, import_smithy_client.expectString)(output[_RPe]);
}
if (output[_CRT] != null) {
contents[_CRT] = (0, import_smithy_client.expectString)(output[_CRT]);
}
if (output[_HT] != null) {
contents[_HT] = (0, import_smithy_client.expectString)(output[_HT]);
}
if (output[_HS] != null) {
contents[_HS] = (0, import_smithy_client.expectString)(output[_HS]);
}
if (output[_HSR] != null) {
contents[_HSR] = (0, import_smithy_client.expectString)(output[_HSR]);
}
if (output[_HIP] != null) {
contents[_HIP] = (0, import_smithy_client.expectString)(output[_HIP]);
}
if (output[_HFM] != null) {
contents[_HFM] = (0, import_smithy_client.expectString)(output[_HFM]);
}
if (output[_DSeta] != null) {
contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]);
}
return contents;
}, "de_StackEvent");
var de_StackEvents = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackEvent(entry, context);
});
}, "de_StackEvents");
var de_StackIds = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_StackIds");
var de_StackInstance = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SSI] != null) {
contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);
}
if (output[_Reg] != null) {
contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]);
}
if (output[_Acc] != null) {
contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output.ParameterOverrides === "") {
contents[_PO] = [];
} else if (output[_PO] != null && output[_PO][_m] != null) {
contents[_PO] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_PO][_m]), context);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SIS] != null) {
contents[_SIS] = de_StackInstanceComprehensiveStatus(output[_SIS], context);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_OUIr] != null) {
contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);
}
if (output[_DSr] != null) {
contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);
}
if (output[_LDCT] != null) {
contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));
}
if (output[_LOI] != null) {
contents[_LOI] = (0, import_smithy_client.expectString)(output[_LOI]);
}
return contents;
}, "de_StackInstance");
var de_StackInstanceComprehensiveStatus = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_DSeta] != null) {
contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]);
}
return contents;
}, "de_StackInstanceComprehensiveStatus");
var de_StackInstanceNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_StackInstanceNotFoundException");
var de_StackInstanceResourceDriftsSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackInstanceResourceDriftsSummary(entry, context);
});
}, "de_StackInstanceResourceDriftsSummaries");
var de_StackInstanceResourceDriftsSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
if (output[_PRI] != null) {
contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);
}
if (output.PhysicalResourceIdContext === "") {
contents[_PRIC] = [];
} else if (output[_PRIC] != null && output[_PRIC][_m] != null) {
contents[_PRIC] = de_PhysicalResourceIdContext((0, import_smithy_client.getArrayIfSingleItem)(output[_PRIC][_m]), context);
}
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output.PropertyDifferences === "") {
contents[_PD] = [];
} else if (output[_PD] != null && output[_PD][_m] != null) {
contents[_PD] = de_PropertyDifferences((0, import_smithy_client.getArrayIfSingleItem)(output[_PD][_m]), context);
}
if (output[_SRDS] != null) {
contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);
}
if (output[_Ti] != null) {
contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));
}
return contents;
}, "de_StackInstanceResourceDriftsSummary");
var de_StackInstanceSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackInstanceSummary(entry, context);
});
}, "de_StackInstanceSummaries");
var de_StackInstanceSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SSI] != null) {
contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);
}
if (output[_Reg] != null) {
contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]);
}
if (output[_Acc] != null) {
contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_SIS] != null) {
contents[_SIS] = de_StackInstanceComprehensiveStatus(output[_SIS], context);
}
if (output[_OUIr] != null) {
contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);
}
if (output[_DSr] != null) {
contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);
}
if (output[_LDCT] != null) {
contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));
}
if (output[_LOI] != null) {
contents[_LOI] = (0, import_smithy_client.expectString)(output[_LOI]);
}
return contents;
}, "de_StackInstanceSummary");
var de_StackNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_StackNotFoundException");
var de_StackRefactorAction = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_A] != null) {
contents[_A] = (0, import_smithy_client.expectString)(output[_A]);
}
if (output[_En] != null) {
contents[_En] = (0, import_smithy_client.expectString)(output[_En]);
}
if (output[_PRI] != null) {
contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);
}
if (output[_RI] != null) {
contents[_RI] = (0, import_smithy_client.expectString)(output[_RI]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_Dete] != null) {
contents[_Dete] = (0, import_smithy_client.expectString)(output[_Dete]);
}
if (output[_DRe] != null) {
contents[_DRe] = (0, import_smithy_client.expectString)(output[_DRe]);
}
if (output.TagResources === "") {
contents[_TR] = [];
} else if (output[_TR] != null && output[_TR][_m] != null) {
contents[_TR] = de_StackRefactorTagResources((0, import_smithy_client.getArrayIfSingleItem)(output[_TR][_m]), context);
}
if (output.UntagResources === "") {
contents[_UR] = [];
} else if (output[_UR] != null && output[_UR][_m] != null) {
contents[_UR] = de_StackRefactorUntagResources((0, import_smithy_client.getArrayIfSingleItem)(output[_UR][_m]), context);
}
if (output[_RMes] != null) {
contents[_RMes] = de_ResourceMapping(output[_RMes], context);
}
return contents;
}, "de_StackRefactorAction");
var de_StackRefactorActions = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackRefactorAction(entry, context);
});
}, "de_StackRefactorActions");
var de_StackRefactorNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_StackRefactorNotFoundException");
var de_StackRefactorSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackRefactorSummary(entry, context);
});
}, "de_StackRefactorSummaries");
var de_StackRefactorSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SRI] != null) {
contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_ES] != null) {
contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);
}
if (output[_ESRx] != null) {
contents[_ESRx] = (0, import_smithy_client.expectString)(output[_ESRx]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
return contents;
}, "de_StackRefactorSummary");
var de_StackRefactorTagResources = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Tag(entry, context);
});
}, "de_StackRefactorTagResources");
var de_StackRefactorUntagResources = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_StackRefactorUntagResources");
var de_StackResource = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SN] != null) {
contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
if (output[_PRI] != null) {
contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);
}
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output[_Ti] != null) {
contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));
}
if (output[_RSeso] != null) {
contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);
}
if (output[_RSR] != null) {
contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_DI] != null) {
contents[_DI] = de_StackResourceDriftInformation(output[_DI], context);
}
if (output[_MI] != null) {
contents[_MI] = de_ModuleInfo(output[_MI], context);
}
return contents;
}, "de_StackResource");
var de_StackResourceDetail = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SN] != null) {
contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
if (output[_PRI] != null) {
contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);
}
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output[_LUTa] != null) {
contents[_LUTa] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUTa]));
}
if (output[_RSeso] != null) {
contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);
}
if (output[_RSR] != null) {
contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_Me] != null) {
contents[_Me] = (0, import_smithy_client.expectString)(output[_Me]);
}
if (output[_DI] != null) {
contents[_DI] = de_StackResourceDriftInformation(output[_DI], context);
}
if (output[_MI] != null) {
contents[_MI] = de_ModuleInfo(output[_MI], context);
}
return contents;
}, "de_StackResourceDetail");
var de_StackResourceDrift = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
if (output[_PRI] != null) {
contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);
}
if (output.PhysicalResourceIdContext === "") {
contents[_PRIC] = [];
} else if (output[_PRIC] != null && output[_PRIC][_m] != null) {
contents[_PRIC] = de_PhysicalResourceIdContext((0, import_smithy_client.getArrayIfSingleItem)(output[_PRIC][_m]), context);
}
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output[_EP] != null) {
contents[_EP] = (0, import_smithy_client.expectString)(output[_EP]);
}
if (output[_AP] != null) {
contents[_AP] = (0, import_smithy_client.expectString)(output[_AP]);
}
if (output.PropertyDifferences === "") {
contents[_PD] = [];
} else if (output[_PD] != null && output[_PD][_m] != null) {
contents[_PD] = de_PropertyDifferences((0, import_smithy_client.getArrayIfSingleItem)(output[_PD][_m]), context);
}
if (output[_SRDS] != null) {
contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);
}
if (output[_Ti] != null) {
contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));
}
if (output[_MI] != null) {
contents[_MI] = de_ModuleInfo(output[_MI], context);
}
return contents;
}, "de_StackResourceDrift");
var de_StackResourceDriftInformation = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SRDS] != null) {
contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);
}
if (output[_LCT] != null) {
contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));
}
return contents;
}, "de_StackResourceDriftInformation");
var de_StackResourceDriftInformationSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SRDS] != null) {
contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);
}
if (output[_LCT] != null) {
contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));
}
return contents;
}, "de_StackResourceDriftInformationSummary");
var de_StackResourceDrifts = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackResourceDrift(entry, context);
});
}, "de_StackResourceDrifts");
var de_StackResources = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackResource(entry, context);
});
}, "de_StackResources");
var de_StackResourceSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackResourceSummary(entry, context);
});
}, "de_StackResourceSummaries");
var de_StackResourceSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_LRI] != null) {
contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);
}
if (output[_PRI] != null) {
contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);
}
if (output[_RTes] != null) {
contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);
}
if (output[_LUTa] != null) {
contents[_LUTa] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUTa]));
}
if (output[_RSeso] != null) {
contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);
}
if (output[_RSR] != null) {
contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);
}
if (output[_DI] != null) {
contents[_DI] = de_StackResourceDriftInformationSummary(output[_DI], context);
}
if (output[_MI] != null) {
contents[_MI] = de_ModuleInfo(output[_MI], context);
}
return contents;
}, "de_StackResourceSummary");
var de_Stacks = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Stack(entry, context);
});
}, "de_Stacks");
var de_StackSet = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SSN] != null) {
contents[_SSN] = (0, import_smithy_client.expectString)(output[_SSN]);
}
if (output[_SSI] != null) {
contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_TB] != null) {
contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);
}
if (output.Parameters === "") {
contents[_P] = [];
} else if (output[_P] != null && output[_P][_m] != null) {
contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);
}
if (output.Capabilities === "") {
contents[_C] = [];
} else if (output[_C] != null && output[_C][_m] != null) {
contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);
}
if (output.Tags === "") {
contents[_Ta] = [];
} else if (output[_Ta] != null && output[_Ta][_m] != null) {
contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context);
}
if (output[_SSARN] != null) {
contents[_SSARN] = (0, import_smithy_client.expectString)(output[_SSARN]);
}
if (output[_ARARN] != null) {
contents[_ARARN] = (0, import_smithy_client.expectString)(output[_ARARN]);
}
if (output[_ERN] != null) {
contents[_ERN] = (0, import_smithy_client.expectString)(output[_ERN]);
}
if (output[_SSDDD] != null) {
contents[_SSDDD] = de_StackSetDriftDetectionDetails(output[_SSDDD], context);
}
if (output[_AD] != null) {
contents[_AD] = de_AutoDeployment(output[_AD], context);
}
if (output[_PM] != null) {
contents[_PM] = (0, import_smithy_client.expectString)(output[_PM]);
}
if (output.OrganizationalUnitIds === "") {
contents[_OUI] = [];
} else if (output[_OUI] != null && output[_OUI][_m] != null) {
contents[_OUI] = de_OrganizationalUnitIdList((0, import_smithy_client.getArrayIfSingleItem)(output[_OUI][_m]), context);
}
if (output[_ME] != null) {
contents[_ME] = de_ManagedExecution(output[_ME], context);
}
if (output.Regions === "") {
contents[_Re] = [];
} else if (output[_Re] != null && output[_Re][_m] != null) {
contents[_Re] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Re][_m]), context);
}
return contents;
}, "de_StackSet");
var de_StackSetAutoDeploymentTargetSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackSetAutoDeploymentTargetSummary(entry, context);
});
}, "de_StackSetAutoDeploymentTargetSummaries");
var de_StackSetAutoDeploymentTargetSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OUIr] != null) {
contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);
}
if (output.Regions === "") {
contents[_Re] = [];
} else if (output[_Re] != null && output[_Re][_m] != null) {
contents[_Re] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Re][_m]), context);
}
return contents;
}, "de_StackSetAutoDeploymentTargetSummary");
var de_StackSetDriftDetectionDetails = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_DSr] != null) {
contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);
}
if (output[_DDS] != null) {
contents[_DDS] = (0, import_smithy_client.expectString)(output[_DDS]);
}
if (output[_LDCT] != null) {
contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));
}
if (output[_TSIC] != null) {
contents[_TSIC] = (0, import_smithy_client.strictParseInt32)(output[_TSIC]);
}
if (output[_DSIC] != null) {
contents[_DSIC] = (0, import_smithy_client.strictParseInt32)(output[_DSIC]);
}
if (output[_ISSIC] != null) {
contents[_ISSIC] = (0, import_smithy_client.strictParseInt32)(output[_ISSIC]);
}
if (output[_IPSIC] != null) {
contents[_IPSIC] = (0, import_smithy_client.strictParseInt32)(output[_IPSIC]);
}
if (output[_FSIC] != null) {
contents[_FSIC] = (0, import_smithy_client.strictParseInt32)(output[_FSIC]);
}
return contents;
}, "de_StackSetDriftDetectionDetails");
var de_StackSetNotEmptyException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_StackSetNotEmptyException");
var de_StackSetNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_StackSetNotFoundException");
var de_StackSetOperation = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OI] != null) {
contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);
}
if (output[_SSI] != null) {
contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);
}
if (output[_A] != null) {
contents[_A] = (0, import_smithy_client.expectString)(output[_A]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_OP] != null) {
contents[_OP] = de_StackSetOperationPreferences(output[_OP], context);
}
if (output[_RSe] != null) {
contents[_RSe] = (0, import_smithy_client.parseBoolean)(output[_RSe]);
}
if (output[_ARARN] != null) {
contents[_ARARN] = (0, import_smithy_client.expectString)(output[_ARARN]);
}
if (output[_ERN] != null) {
contents[_ERN] = (0, import_smithy_client.expectString)(output[_ERN]);
}
if (output[_CTre] != null) {
contents[_CTre] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTre]));
}
if (output[_ETn] != null) {
contents[_ETn] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ETn]));
}
if (output[_DTep] != null) {
contents[_DTep] = de_DeploymentTargets(output[_DTep], context);
}
if (output[_SSDDD] != null) {
contents[_SSDDD] = de_StackSetDriftDetectionDetails(output[_SSDDD], context);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_SDt] != null) {
contents[_SDt] = de_StackSetOperationStatusDetails(output[_SDt], context);
}
return contents;
}, "de_StackSetOperation");
var de_StackSetOperationPreferences = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RCT] != null) {
contents[_RCT] = (0, import_smithy_client.expectString)(output[_RCT]);
}
if (output.RegionOrder === "") {
contents[_RO] = [];
} else if (output[_RO] != null && output[_RO][_m] != null) {
contents[_RO] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_RO][_m]), context);
}
if (output[_FTC] != null) {
contents[_FTC] = (0, import_smithy_client.strictParseInt32)(output[_FTC]);
}
if (output[_FTP] != null) {
contents[_FTP] = (0, import_smithy_client.strictParseInt32)(output[_FTP]);
}
if (output[_MCC] != null) {
contents[_MCC] = (0, import_smithy_client.strictParseInt32)(output[_MCC]);
}
if (output[_MCP] != null) {
contents[_MCP] = (0, import_smithy_client.strictParseInt32)(output[_MCP]);
}
if (output[_CM] != null) {
contents[_CM] = (0, import_smithy_client.expectString)(output[_CM]);
}
return contents;
}, "de_StackSetOperationPreferences");
var de_StackSetOperationResultSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackSetOperationResultSummary(entry, context);
});
}, "de_StackSetOperationResultSummaries");
var de_StackSetOperationResultSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Acc] != null) {
contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]);
}
if (output[_Reg] != null) {
contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_AGR] != null) {
contents[_AGR] = de_AccountGateResult(output[_AGR], context);
}
if (output[_OUIr] != null) {
contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);
}
return contents;
}, "de_StackSetOperationResultSummary");
var de_StackSetOperationStatusDetails = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_FSIC] != null) {
contents[_FSIC] = (0, import_smithy_client.strictParseInt32)(output[_FSIC]);
}
return contents;
}, "de_StackSetOperationStatusDetails");
var de_StackSetOperationSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackSetOperationSummary(entry, context);
});
}, "de_StackSetOperationSummaries");
var de_StackSetOperationSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OI] != null) {
contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);
}
if (output[_A] != null) {
contents[_A] = (0, import_smithy_client.expectString)(output[_A]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_CTre] != null) {
contents[_CTre] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTre]));
}
if (output[_ETn] != null) {
contents[_ETn] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ETn]));
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_SDt] != null) {
contents[_SDt] = de_StackSetOperationStatusDetails(output[_SDt], context);
}
if (output[_OP] != null) {
contents[_OP] = de_StackSetOperationPreferences(output[_OP], context);
}
return contents;
}, "de_StackSetOperationSummary");
var de_StackSetSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackSetSummary(entry, context);
});
}, "de_StackSetSummaries");
var de_StackSetSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SSN] != null) {
contents[_SSN] = (0, import_smithy_client.expectString)(output[_SSN]);
}
if (output[_SSI] != null) {
contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_AD] != null) {
contents[_AD] = de_AutoDeployment(output[_AD], context);
}
if (output[_PM] != null) {
contents[_PM] = (0, import_smithy_client.expectString)(output[_PM]);
}
if (output[_DSr] != null) {
contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);
}
if (output[_LDCT] != null) {
contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));
}
if (output[_ME] != null) {
contents[_ME] = de_ManagedExecution(output[_ME], context);
}
return contents;
}, "de_StackSetSummary");
var de_StackSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_StackSummary(entry, context);
});
}, "de_StackSummaries");
var de_StackSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
if (output[_SN] != null) {
contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);
}
if (output[_TDe] != null) {
contents[_TDe] = (0, import_smithy_client.expectString)(output[_TDe]);
}
if (output[_CTr] != null) {
contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));
}
if (output[_LUT] != null) {
contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));
}
if (output[_DTel] != null) {
contents[_DTel] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_DTel]));
}
if (output[_SSta] != null) {
contents[_SSta] = (0, import_smithy_client.expectString)(output[_SSta]);
}
if (output[_SSR] != null) {
contents[_SSR] = (0, import_smithy_client.expectString)(output[_SSR]);
}
if (output[_PIa] != null) {
contents[_PIa] = (0, import_smithy_client.expectString)(output[_PIa]);
}
if (output[_RIo] != null) {
contents[_RIo] = (0, import_smithy_client.expectString)(output[_RIo]);
}
if (output[_DI] != null) {
contents[_DI] = de_StackDriftInformationSummary(output[_DI], context);
}
return contents;
}, "de_StackSummary");
var de_StageList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_StageList");
var de_StaleRequestException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_StaleRequestException");
var de_StartResourceScanOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RSI] != null) {
contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]);
}
return contents;
}, "de_StartResourceScanOutput");
var de_StopStackSetOperationOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_StopStackSetOperationOutput");
var de_SupportedMajorVersions = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.strictParseInt32)(entry);
});
}, "de_SupportedMajorVersions");
var de_Tag = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
if (output[_Val] != null) {
contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]);
}
return contents;
}, "de_Tag");
var de_Tags = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Tag(entry, context);
});
}, "de_Tags");
var de_TemplateConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_DPe] != null) {
contents[_DPe] = (0, import_smithy_client.expectString)(output[_DPe]);
}
if (output[_URP] != null) {
contents[_URP] = (0, import_smithy_client.expectString)(output[_URP]);
}
return contents;
}, "de_TemplateConfiguration");
var de_TemplateParameter = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PK] != null) {
contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]);
}
if (output[_DV] != null) {
contents[_DV] = (0, import_smithy_client.expectString)(output[_DV]);
}
if (output[_NE] != null) {
contents[_NE] = (0, import_smithy_client.parseBoolean)(output[_NE]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
return contents;
}, "de_TemplateParameter");
var de_TemplateParameters = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_TemplateParameter(entry, context);
});
}, "de_TemplateParameters");
var de_TemplateProgress = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RSesou] != null) {
contents[_RSesou] = (0, import_smithy_client.strictParseInt32)(output[_RSesou]);
}
if (output[_RF] != null) {
contents[_RF] = (0, import_smithy_client.strictParseInt32)(output[_RF]);
}
if (output[_RPes] != null) {
contents[_RPes] = (0, import_smithy_client.strictParseInt32)(output[_RPes]);
}
if (output[_RPeso] != null) {
contents[_RPeso] = (0, import_smithy_client.strictParseInt32)(output[_RPeso]);
}
return contents;
}, "de_TemplateProgress");
var de_TemplateSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_TemplateSummary(entry, context);
});
}, "de_TemplateSummaries");
var de_TemplateSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_GTI] != null) {
contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);
}
if (output[_GTN] != null) {
contents[_GTN] = (0, import_smithy_client.expectString)(output[_GTN]);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SRt] != null) {
contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);
}
if (output[_CTr] != null) {
contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));
}
if (output[_LUT] != null) {
contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));
}
if (output[_NOR] != null) {
contents[_NOR] = (0, import_smithy_client.strictParseInt32)(output[_NOR]);
}
return contents;
}, "de_TemplateSummary");
var de_TestTypeOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_TVA] != null) {
contents[_TVA] = (0, import_smithy_client.expectString)(output[_TVA]);
}
return contents;
}, "de_TestTypeOutput");
var de_TokenAlreadyExistsException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_TokenAlreadyExistsException");
var de_TransformsList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_TransformsList");
var de_TypeConfigurationDetails = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Ar] != null) {
contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);
}
if (output[_Al] != null) {
contents[_Al] = (0, import_smithy_client.expectString)(output[_Al]);
}
if (output[_Co] != null) {
contents[_Co] = (0, import_smithy_client.expectString)(output[_Co]);
}
if (output[_LU] != null) {
contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU]));
}
if (output[_TA] != null) {
contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);
}
if (output[_TN] != null) {
contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
}
if (output[_IDC] != null) {
contents[_IDC] = (0, import_smithy_client.parseBoolean)(output[_IDC]);
}
return contents;
}, "de_TypeConfigurationDetails");
var de_TypeConfigurationDetailsList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_TypeConfigurationDetails(entry, context);
});
}, "de_TypeConfigurationDetailsList");
var de_TypeConfigurationIdentifier = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_TA] != null) {
contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);
}
if (output[_TCA] != null) {
contents[_TCA] = (0, import_smithy_client.expectString)(output[_TCA]);
}
if (output[_TCAy] != null) {
contents[_TCAy] = (0, import_smithy_client.expectString)(output[_TCAy]);
}
if (output[_T] != null) {
contents[_T] = (0, import_smithy_client.expectString)(output[_T]);
}
if (output[_TN] != null) {
contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
}
return contents;
}, "de_TypeConfigurationIdentifier");
var de_TypeConfigurationNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_TypeConfigurationNotFoundException");
var de_TypeNotFoundException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(output[_M]);
}
return contents;
}, "de_TypeNotFoundException");
var de_TypeSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_TypeSummary(entry, context);
});
}, "de_TypeSummaries");
var de_TypeSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_T] != null) {
contents[_T] = (0, import_smithy_client.expectString)(output[_T]);
}
if (output[_TN] != null) {
contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
}
if (output[_DVI] != null) {
contents[_DVI] = (0, import_smithy_client.expectString)(output[_DVI]);
}
if (output[_TA] != null) {
contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);
}
if (output[_LU] != null) {
contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU]));
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_PI] != null) {
contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);
}
if (output[_OTN] != null) {
contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]);
}
if (output[_PVN] != null) {
contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]);
}
if (output[_LPV] != null) {
contents[_LPV] = (0, import_smithy_client.expectString)(output[_LPV]);
}
if (output[_PIu] != null) {
contents[_PIu] = (0, import_smithy_client.expectString)(output[_PIu]);
}
if (output[_PN] != null) {
contents[_PN] = (0, import_smithy_client.expectString)(output[_PN]);
}
if (output[_IA] != null) {
contents[_IA] = (0, import_smithy_client.parseBoolean)(output[_IA]);
}
return contents;
}, "de_TypeSummary");
var de_TypeVersionSummaries = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_TypeVersionSummary(entry, context);
});
}, "de_TypeVersionSummaries");
var de_TypeVersionSummary = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_T] != null) {
contents[_T] = (0, import_smithy_client.expectString)(output[_T]);
}
if (output[_TN] != null) {
contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
}
if (output[_VI] != null) {
contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]);
}
if (output[_IDV] != null) {
contents[_IDV] = (0, import_smithy_client.parseBoolean)(output[_IDV]);
}
if (output[_Ar] != null) {
contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);
}
if (output[_TCi] != null) {
contents[_TCi] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_TCi]));
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output[_PVN] != null) {
contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]);
}
return contents;
}, "de_TypeVersionSummary");
var de_UnprocessedTypeConfigurations = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_TypeConfigurationIdentifier(entry, context);
});
}, "de_UnprocessedTypeConfigurations");
var de_UpdateGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_GTI] != null) {
contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);
}
return contents;
}, "de_UpdateGeneratedTemplateOutput");
var de_UpdateStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OI] != null) {
contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);
}
return contents;
}, "de_UpdateStackInstancesOutput");
var de_UpdateStackOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
return contents;
}, "de_UpdateStackOutput");
var de_UpdateStackSetOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OI] != null) {
contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);
}
return contents;
}, "de_UpdateStackSetOutput");
var de_UpdateTerminationProtectionOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);
}
return contents;
}, "de_UpdateTerminationProtectionOutput");
var de_ValidateTemplateOutput = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Parameters === "") {
contents[_P] = [];
} else if (output[_P] != null && output[_P][_m] != null) {
contents[_P] = de_TemplateParameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
if (output.Capabilities === "") {
contents[_C] = [];
} else if (output[_C] != null && output[_C][_m] != null) {
contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);
}
if (output[_CR] != null) {
contents[_CR] = (0, import_smithy_client.expectString)(output[_CR]);
}
if (output.DeclaredTransforms === "") {
contents[_DTec] = [];
} else if (output[_DTec] != null && output[_DTec][_m] != null) {
contents[_DTec] = de_TransformsList((0, import_smithy_client.getArrayIfSingleItem)(output[_DTec][_m]), context);
}
return contents;
}, "de_ValidateTemplateOutput");
var de_WarningDetail = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_T] != null) {
contents[_T] = (0, import_smithy_client.expectString)(output[_T]);
}
if (output.Properties === "") {
contents[_Pro] = [];
} else if (output[_Pro] != null && output[_Pro][_m] != null) {
contents[_Pro] = de_WarningProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_Pro][_m]), context);
}
return contents;
}, "de_WarningDetail");
var de_WarningDetails = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_WarningDetail(entry, context);
});
}, "de_WarningDetails");
var de_WarningProperties = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_WarningProperty(entry, context);
});
}, "de_WarningProperties");
var de_WarningProperty = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PPr] != null) {
contents[_PPr] = (0, import_smithy_client.expectString)(output[_PPr]);
}
if (output[_Req] != null) {
contents[_Req] = (0, import_smithy_client.parseBoolean)(output[_Req]);
}
if (output[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(output[_D]);
}
return contents;
}, "de_WarningProperty");
var de_Warnings = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.UnrecognizedResourceTypes === "") {
contents[_URT] = [];
} else if (output[_URT] != null && output[_URT][_m] != null) {
contents[_URT] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_URT][_m]), context);
}
return contents;
}, "de_Warnings");
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
var throwDefaultError = (0, import_smithy_client.withBaseException)(CloudFormationServiceException);
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents = {
protocol,
hostname,
port,
method: "POST",
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers
};
if (resolvedHostname !== void 0) {
contents.hostname = resolvedHostname;
}
if (body !== void 0) {
contents.body = body;
}
return new import_protocol_http.HttpRequest(contents);
}, "buildHttpRpcRequest");
var SHARED_HEADERS = {
"content-type": "application/x-www-form-urlencoded"
};
var _ = "2010-05-15";
var _A = "Action";
var _AC = "AfterContext";
var _ACT = "AttributeChangeType";
var _AD = "AutoDeployment";
var _AFT = "AccountFilterType";
var _AGR = "AccountGateResult";
var _AL = "AccountLimits";
var _AOA = "ActivateOrganizationsAccess";
var _AP = "ActualProperties";
var _AR = "AddResources";
var _ARARN = "AdministrationRoleARN";
var _AT = "ActivateType";
var _ATAC = "AcceptTermsAndConditions";
var _AU = "AutoUpdate";
var _AUc = "AccountsUrl";
var _AV = "AllowedValues";
var _AVc = "ActualValue";
var _AVf = "AfterValue";
var _Ac = "Accounts";
var _Acc = "Account";
var _Act = "Active";
var _Al = "Alias";
var _Ar = "Arn";
var _At = "Attribute";
var _BC = "BeforeContext";
var _BDTC = "BatchDescribeTypeConfigurations";
var _BT = "BearerToken";
var _BV = "BeforeValue";
var _C = "Capabilities";
var _CA = "CallAs";
var _CAo = "ConnectionArn";
var _CAon = "ConfigurationAlias";
var _CAonf = "ConfigurationArn";
var _CCS = "CreateChangeSet";
var _CE = "CausingEntity";
var _CGT = "CreateGeneratedTemplate";
var _CM = "ConcurrencyMode";
var _COS = "CurrentOperationStatus";
var _CR = "CapabilitiesReason";
var _CRT = "ClientRequestToken";
var _CS = "CreateStack";
var _CSI = "CreateStackInstances";
var _CSIh = "ChangeSetId";
var _CSN = "ChangeSetName";
var _CSR = "CreateStackRefactor";
var _CSS = "CreateStackSet";
var _CST = "ChangeSetType";
var _CSh = "ChangeSource";
var _CSo = "ConfigurationSchema";
var _CT = "ClientToken";
var _CTr = "CreationTime";
var _CTre = "CreationTimestamp";
var _CUR = "ContinueUpdateRollback";
var _CUS = "CancelUpdateStack";
var _Ca = "Category";
var _Ch = "Changes";
var _Co = "Configuration";
var _D = "Description";
var _DAL = "DescribeAccountLimits";
var _DCS = "DeleteChangeSet";
var _DCSH = "DescribeChangeSetHooks";
var _DCSe = "DescribeChangeSet";
var _DDS = "DriftDetectionStatus";
var _DGT = "DeleteGeneratedTemplate";
var _DGTe = "DescribeGeneratedTemplate";
var _DI = "DriftInformation";
var _DM = "DeletionMode";
var _DOA = "DeactivateOrganizationsAccess";
var _DOAe = "DescribeOrganizationsAccess";
var _DP = "DescribePublisher";
var _DPe = "DeletionPolicy";
var _DR = "DisableRollback";
var _DRS = "DescribeResourceScan";
var _DRe = "DetectionReason";
var _DS = "DeleteStack";
var _DSD = "DetectStackDrift";
var _DSDDS = "DescribeStackDriftDetectionStatus";
var _DSE = "DescribeStackEvents";
var _DSI = "DeleteStackInstances";
var _DSIC = "DriftedStackInstancesCount";
var _DSIe = "DescribeStackInstance";
var _DSR = "DescribeStackRefactor";
var _DSRC = "DriftedStackResourceCount";
var _DSRD = "DescribeStackResourceDrifts";
var _DSRDe = "DetectStackResourceDrift";
var _DSRe = "DescribeStackResource";
var _DSRes = "DescribeStackResources";
var _DSRet = "DetectionStatusReason";
var _DSS = "DeleteStackSet";
var _DSSD = "DetectStackSetDrift";
var _DSSO = "DescribeStackSetOperation";
var _DSSe = "DescribeStackSet";
var _DSe = "DescribeStacks";
var _DSep = "DeprecatedStatus";
var _DSet = "DetectionStatus";
var _DSeta = "DetailedStatus";
var _DSr = "DriftStatus";
var _DT = "DeactivateType";
var _DTR = "DescribeTypeRegistration";
var _DTe = "DeregisterType";
var _DTec = "DeclaredTransforms";
var _DTel = "DeletionTime";
var _DTep = "DeploymentTargets";
var _DTes = "DescribeType";
var _DTi = "DifferenceType";
var _DU = "DocumentationUrl";
var _DV = "DefaultValue";
var _DVI = "DefaultVersionId";
var _De = "Destination";
var _Det = "Details";
var _Dete = "Detection";
var _E = "Enabled";
var _EC = "ErrorCode";
var _ECS = "ExecuteChangeSet";
var _EI = "EventId";
var _EM = "ErrorMessage";
var _EN = "ExportName";
var _EP = "ExpectedProperties";
var _ERA = "ExecutionRoleArn";
var _ERN = "ExecutionRoleName";
var _ES = "ExecutionStatus";
var _ESC = "EnableStackCreation";
var _ESF = "ExecutionStatusFilter";
var _ESI = "ExportingStackId";
var _ESR = "ExecuteStackRefactor";
var _ESRx = "ExecutionStatusReason";
var _ET = "EndTime";
var _ETC = "EstimateTemplateCost";
var _ETP = "EnableTerminationProtection";
var _ETn = "EndTimestamp";
var _EV = "ExpectedValue";
var _En = "Entity";
var _Er = "Errors";
var _Ev = "Evaluation";
var _Ex = "Exports";
var _F = "Format";
var _FM = "FailureMode";
var _FSIC = "FailedStackInstancesCount";
var _FTC = "FailureToleranceCount";
var _FTP = "FailureTolerancePercentage";
var _Fi = "Filters";
var _GGT = "GetGeneratedTemplate";
var _GSP = "GetStackPolicy";
var _GT = "GetTemplate";
var _GTI = "GeneratedTemplateId";
var _GTN = "GeneratedTemplateName";
var _GTS = "GetTemplateSummary";
var _H = "Hooks";
var _HFM = "HookFailureMode";
var _HIC = "HookInvocationCount";
var _HIP = "HookInvocationPoint";
var _HR = "HookResults";
var _HS = "HookStatus";
var _HSR = "HookStatusReason";
var _HT = "HookType";
var _I = "Id";
var _IA = "IsActivated";
var _IDC = "IsDefaultConfiguration";
var _IDV = "IsDefaultVersion";
var _IER = "ImportExistingResources";
var _INS = "IncludeNestedStacks";
var _IP = "InvocationPoint";
var _IPSIC = "InProgressStackInstancesCount";
var _IPV = "IncludePropertyValues";
var _IPd = "IdentityProvider";
var _ISSIC = "InSyncStackInstancesCount";
var _ISTSS = "ImportStacksToStackSet";
var _Im = "Imports";
var _K = "Key";
var _LC = "LoggingConfig";
var _LCS = "ListChangeSets";
var _LCT = "LastCheckTimestamp";
var _LDB = "LogDeliveryBucket";
var _LDCT = "LastDriftCheckTimestamp";
var _LE = "ListExports";
var _LGN = "LogGroupName";
var _LGT = "ListGeneratedTemplates";
var _LHR = "ListHookResults";
var _LI = "ListImports";
var _LIH = "LogicalIdHierarchy";
var _LOI = "LastOperationId";
var _LPV = "LatestPublicVersion";
var _LRA = "LogRoleArn";
var _LRI = "LogicalResourceId";
var _LRIo = "LogicalResourceIds";
var _LRS = "ListResourceScans";
var _LRSR = "ListResourceScanResources";
var _LRSRR = "ListResourceScanRelatedResources";
var _LS = "ListStacks";
var _LSI = "ListStackInstances";
var _LSIRD = "ListStackInstanceResourceDrifts";
var _LSR = "ListStackRefactors";
var _LSRA = "ListStackRefactorActions";
var _LSRi = "ListStackResources";
var _LSS = "ListStackSets";
var _LSSADT = "ListStackSetAutoDeploymentTargets";
var _LSSO = "ListStackSetOperations";
var _LSSOR = "ListStackSetOperationResults";
var _LT = "ListTypes";
var _LTR = "ListTypeRegistrations";
var _LTV = "ListTypeVersions";
var _LU = "LastUpdated";
var _LUT = "LastUpdatedTime";
var _LUTa = "LastUpdatedTimestamp";
var _M = "Message";
var _MBS = "ManagedByStack";
var _MCC = "MaxConcurrentCount";
var _MCP = "MaxConcurrentPercentage";
var _ME = "ManagedExecution";
var _MI = "ModuleInfo";
var _MR = "MaxResults";
var _MTIM = "MonitoringTimeInMinutes";
var _MV = "MajorVersion";
var _Me = "Metadata";
var _N = "Name";
var _NARN = "NotificationARNs";
var _NE = "NoEcho";
var _NGTN = "NewGeneratedTemplateName";
var _NOR = "NumberOfResources";
var _NT = "NextToken";
var _O = "Outputs";
var _OF = "OnFailure";
var _OI = "OperationId";
var _OK = "OutputKey";
var _OP = "OperationPreferences";
var _OS = "OperationStatus";
var _OSF = "OnStackFailure";
var _OTA = "OriginalTypeArn";
var _OTN = "OriginalTypeName";
var _OUI = "OrganizationalUnitIds";
var _OUIr = "OrganizationalUnitId";
var _OV = "OutputValue";
var _P = "Parameters";
var _PA = "PolicyAction";
var _PC = "PercentageCompleted";
var _PCSI = "ParentChangeSetId";
var _PCa = "ParameterConstraints";
var _PD = "PropertyDifferences";
var _PI = "PublisherId";
var _PIa = "ParentId";
var _PIu = "PublisherIdentity";
var _PK = "ParameterKey";
var _PM = "PermissionModel";
var _PN = "PublisherName";
var _PO = "ParameterOverrides";
var _PP = "PublisherProfile";
var _PPr = "PropertyPath";
var _PRI = "PhysicalResourceId";
var _PRIC = "PhysicalResourceIdContext";
var _PS = "PublisherStatus";
var _PSr = "ProgressStatus";
var _PT = "PublishType";
var _PTA = "PublicTypeArn";
var _PTa = "ParameterType";
var _PTr = "ProvisioningType";
var _PV = "ParameterValue";
var _PVN = "PublicVersionNumber";
var _Pa = "Path";
var _Pr = "Progress";
var _Pro = "Properties";
var _R = "Resources";
var _RA = "ResourceAction";
var _RAR = "RefreshAllResources";
var _RARN = "RoleARN";
var _RAT = "RequiredActivatedTypes";
var _RC = "RollbackConfiguration";
var _RCSI = "RootChangeSetId";
var _RCT = "RegionConcurrencyType";
var _RCe = "ResourceChange";
var _REOC = "RetainExceptOnCreate";
var _RF = "ResourcesFailed";
var _RHP = "RecordHandlerProgress";
var _RI = "ResourceIdentifier";
var _RIS = "ResourceIdentifierSummaries";
var _RIe = "ResourceIdentifiers";
var _RIo = "RootId";
var _RM = "ResourceMappings";
var _RMe = "ResourceModel";
var _RMes = "ResourceMapping";
var _RO = "RegionOrder";
var _RP = "RegisterPublisher";
var _RPe = "ResourceProperties";
var _RPes = "ResourcesProcessing";
var _RPeso = "ResourcesPending";
var _RR = "RetainResources";
var _RRe = "RemoveResources";
var _RRel = "RelatedResources";
var _RReq = "RequiresRecreation";
var _RRes = "ResourcesRead";
var _RS = "RollbackStack";
var _RSF = "RegistrationStatusFilter";
var _RSI = "ResourceScanId";
var _RSOAR = "RetainStacksOnAccountRemoval";
var _RSR = "ResourceStatusReason";
var _RSS = "ResourceScanSummaries";
var _RSe = "RetainStacks";
var _RSes = "ResourcesScanned";
var _RSeso = "ResourceStatus";
var _RSesou = "ResourcesSucceeded";
var _RT = "RegisterType";
var _RTD = "ResourceTargetDetails";
var _RTI = "ResourcesToImport";
var _RTL = "RegistrationTokenList";
var _RTP = "ResourceTypePrefix";
var _RTS = "ResourcesToSkip";
var _RTe = "ResourceTypes";
var _RTeg = "RegistrationToken";
var _RTes = "ResourceType";
var _RTo = "RollbackTriggers";
var _RV = "ResolvedValue";
var _Re = "Regions";
var _Reg = "Region";
var _Rep = "Replacement";
var _Req = "Required";
var _S = "Status";
var _SA = "StagesAvailable";
var _SD = "StackDefinitions";
var _SDDI = "StackDriftDetectionId";
var _SDS = "StackDriftStatus";
var _SDt = "StatusDetails";
var _SE = "StackEvents";
var _SF = "ScanFilters";
var _SHP = "SchemaHandlerPackage";
var _SI = "StackId";
var _SIA = "StackInstanceAccount";
var _SIR = "StackInstanceRegion";
var _SIRDS = "StackInstanceResourceDriftStatuses";
var _SIS = "StackInstanceStatus";
var _SIU = "StackIdsUrl";
var _SIt = "StackIds";
var _SIta = "StackInstance";
var _SM = "StatusMessage";
var _SMV = "SupportedMajorVersions";
var _SN = "StackName";
var _SPB = "StackPolicyBody";
var _SPDUB = "StackPolicyDuringUpdateBody";
var _SPDUURL = "StackPolicyDuringUpdateURL";
var _SPURL = "StackPolicyURL";
var _SR = "SignalResource";
var _SRA = "StackRefactorActions";
var _SRD = "StackResourceDrifts";
var _SRDS = "StackResourceDriftStatus";
var _SRDSF = "StackResourceDriftStatusFilters";
var _SRDt = "StackResourceDetail";
var _SRDta = "StackResourceDrift";
var _SRI = "StackRefactorId";
var _SRS = "StartResourceScan";
var _SRSt = "StackRefactorSummaries";
var _SRSta = "StackResourceSummaries";
var _SRt = "StatusReason";
var _SRta = "StackResources";
var _SS = "StackSet";
var _SSARN = "StackSetARN";
var _SSDDD = "StackSetDriftDetectionDetails";
var _SSF = "StackStatusFilter";
var _SSI = "StackSetId";
var _SSN = "StackSetName";
var _SSO = "StackSetOperation";
var _SSP = "SetStackPolicy";
var _SSR = "StackStatusReason";
var _SSSO = "StopStackSetOperation";
var _SSt = "StackSummaries";
var _SSta = "StackStatus";
var _ST = "StartTime";
var _STC = "SetTypeConfiguration";
var _STDV = "SetTypeDefaultVersion";
var _STF = "ScanTypeFilter";
var _STc = "ScanType";
var _SU = "SourceUrl";
var _Sc = "Schema";
var _Sco = "Scope";
var _So = "Source";
var _St = "Stacks";
var _Su = "Summaries";
var _T = "Type";
var _TA = "TypeArn";
var _TB = "TemplateBody";
var _TC = "TemplateConfiguration";
var _TCA = "TypeConfigurationAlias";
var _TCAy = "TypeConfigurationArn";
var _TCI = "TypeConfigurationIdentifiers";
var _TCIy = "TypeConfigurationIdentifier";
var _TCVI = "TypeConfigurationVersionId";
var _TCi = "TimeCreated";
var _TCy = "TypeConfigurations";
var _TD = "TargetDetails";
var _TDe = "TemplateDescription";
var _TH = "TypeHierarchy";
var _TI = "TargetId";
var _TIM = "TimeoutInMinutes";
var _TK = "TagKey";
var _TN = "TypeName";
var _TNA = "TypeNameAlias";
var _TNP = "TypeNamePrefix";
var _TR = "TagResources";
var _TS = "TemplateStage";
var _TSC = "TemplateSummaryConfig";
var _TSIC = "TotalStackInstancesCount";
var _TSy = "TypeSummaries";
var _TT = "TestType";
var _TTS = "TypeTestsStatus";
var _TTSD = "TypeTestsStatusDescription";
var _TTa = "TargetType";
var _TURL = "TemplateURL";
var _TURTAW = "TreatUnrecognizedResourceTypesAsWarnings";
var _TV = "TagValue";
var _TVA = "TypeVersionArn";
var _TVI = "TypeVersionId";
var _TVS = "TypeVersionSummaries";
var _TW = "TotalWarnings";
var _Ta = "Tags";
var _Tar = "Target";
var _Ti = "Timestamp";
var _Ty = "Types";
var _U = "Url";
var _UGT = "UpdateGeneratedTemplate";
var _UI = "UniqueId";
var _UPT = "UsePreviousTemplate";
var _UPV = "UsePreviousValue";
var _UR = "UntagResources";
var _URP = "UpdateReplacePolicy";
var _URT = "UnrecognizedResourceTypes";
var _US = "UpdateStack";
var _USI = "UpdateStackInstances";
var _USS = "UpdateStackSet";
var _UTC = "UnprocessedTypeConfigurations";
var _UTP = "UpdateTerminationProtection";
var _V = "Version";
var _VB = "VersionBump";
var _VI = "VersionId";
var _VT = "ValidateTemplate";
var _Va = "Values";
var _Val = "Value";
var _Vi = "Visibility";
var _W = "Warnings";
var _e = "entry";
var _m = "member";
var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString");
var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {
if (data.Error?.Code !== void 0) {
return data.Error.Code;
}
if (output.statusCode == 404) {
return "NotFound";
}
}, "loadQueryErrorCode");
// src/commands/ActivateOrganizationsAccessCommand.ts
var ActivateOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ActivateOrganizationsAccess", {}).n("CloudFormationClient", "ActivateOrganizationsAccessCommand").f(void 0, void 0).ser(se_ActivateOrganizationsAccessCommand).de(de_ActivateOrganizationsAccessCommand).build() {
static {
__name(this, "ActivateOrganizationsAccessCommand");
}
};
// src/commands/ActivateTypeCommand.ts
var ActivateTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ActivateType", {}).n("CloudFormationClient", "ActivateTypeCommand").f(void 0, void 0).ser(se_ActivateTypeCommand).de(de_ActivateTypeCommand).build() {
static {
__name(this, "ActivateTypeCommand");
}
};
// src/commands/BatchDescribeTypeConfigurationsCommand.ts
var BatchDescribeTypeConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "BatchDescribeTypeConfigurations", {}).n("CloudFormationClient", "BatchDescribeTypeConfigurationsCommand").f(void 0, void 0).ser(se_BatchDescribeTypeConfigurationsCommand).de(de_BatchDescribeTypeConfigurationsCommand).build() {
static {
__name(this, "BatchDescribeTypeConfigurationsCommand");
}
};
// src/commands/CancelUpdateStackCommand.ts
var CancelUpdateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "CancelUpdateStack", {}).n("CloudFormationClient", "CancelUpdateStackCommand").f(void 0, void 0).ser(se_CancelUpdateStackCommand).de(de_CancelUpdateStackCommand).build() {
static {
__name(this, "CancelUpdateStackCommand");
}
};
// src/commands/ContinueUpdateRollbackCommand.ts
var ContinueUpdateRollbackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ContinueUpdateRollback", {}).n("CloudFormationClient", "ContinueUpdateRollbackCommand").f(void 0, void 0).ser(se_ContinueUpdateRollbackCommand).de(de_ContinueUpdateRollbackCommand).build() {
static {
__name(this, "ContinueUpdateRollbackCommand");
}
};
// src/commands/CreateChangeSetCommand.ts
var CreateChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "CreateChangeSet", {}).n("CloudFormationClient", "CreateChangeSetCommand").f(void 0, void 0).ser(se_CreateChangeSetCommand).de(de_CreateChangeSetCommand).build() {
static {
__name(this, "CreateChangeSetCommand");
}
};
// src/commands/CreateGeneratedTemplateCommand.ts
var CreateGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "CreateGeneratedTemplate", {}).n("CloudFormationClient", "CreateGeneratedTemplateCommand").f(void 0, void 0).ser(se_CreateGeneratedTemplateCommand).de(de_CreateGeneratedTemplateCommand).build() {
static {
__name(this, "CreateGeneratedTemplateCommand");
}
};
// src/commands/CreateStackCommand.ts
var CreateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "CreateStack", {}).n("CloudFormationClient", "CreateStackCommand").f(void 0, void 0).ser(se_CreateStackCommand).de(de_CreateStackCommand).build() {
static {
__name(this, "CreateStackCommand");
}
};
// src/commands/CreateStackInstancesCommand.ts
var CreateStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "CreateStackInstances", {}).n("CloudFormationClient", "CreateStackInstancesCommand").f(void 0, void 0).ser(se_CreateStackInstancesCommand).de(de_CreateStackInstancesCommand).build() {
static {
__name(this, "CreateStackInstancesCommand");
}
};
// src/commands/CreateStackRefactorCommand.ts
var CreateStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "CreateStackRefactor", {}).n("CloudFormationClient", "CreateStackRefactorCommand").f(void 0, void 0).ser(se_CreateStackRefactorCommand).de(de_CreateStackRefactorCommand).build() {
static {
__name(this, "CreateStackRefactorCommand");
}
};
// src/commands/CreateStackSetCommand.ts
var CreateStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "CreateStackSet", {}).n("CloudFormationClient", "CreateStackSetCommand").f(void 0, void 0).ser(se_CreateStackSetCommand).de(de_CreateStackSetCommand).build() {
static {
__name(this, "CreateStackSetCommand");
}
};
// src/commands/DeactivateOrganizationsAccessCommand.ts
var DeactivateOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DeactivateOrganizationsAccess", {}).n("CloudFormationClient", "DeactivateOrganizationsAccessCommand").f(void 0, void 0).ser(se_DeactivateOrganizationsAccessCommand).de(de_DeactivateOrganizationsAccessCommand).build() {
static {
__name(this, "DeactivateOrganizationsAccessCommand");
}
};
// src/commands/DeactivateTypeCommand.ts
var DeactivateTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DeactivateType", {}).n("CloudFormationClient", "DeactivateTypeCommand").f(void 0, void 0).ser(se_DeactivateTypeCommand).de(de_DeactivateTypeCommand).build() {
static {
__name(this, "DeactivateTypeCommand");
}
};
// src/commands/DeleteChangeSetCommand.ts
var DeleteChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DeleteChangeSet", {}).n("CloudFormationClient", "DeleteChangeSetCommand").f(void 0, void 0).ser(se_DeleteChangeSetCommand).de(de_DeleteChangeSetCommand).build() {
static {
__name(this, "DeleteChangeSetCommand");
}
};
// src/commands/DeleteGeneratedTemplateCommand.ts
var DeleteGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DeleteGeneratedTemplate", {}).n("CloudFormationClient", "DeleteGeneratedTemplateCommand").f(void 0, void 0).ser(se_DeleteGeneratedTemplateCommand).de(de_DeleteGeneratedTemplateCommand).build() {
static {
__name(this, "DeleteGeneratedTemplateCommand");
}
};
// src/commands/DeleteStackCommand.ts
var DeleteStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DeleteStack", {}).n("CloudFormationClient", "DeleteStackCommand").f(void 0, void 0).ser(se_DeleteStackCommand).de(de_DeleteStackCommand).build() {
static {
__name(this, "DeleteStackCommand");
}
};
// src/commands/DeleteStackInstancesCommand.ts
var DeleteStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DeleteStackInstances", {}).n("CloudFormationClient", "DeleteStackInstancesCommand").f(void 0, void 0).ser(se_DeleteStackInstancesCommand).de(de_DeleteStackInstancesCommand).build() {
static {
__name(this, "DeleteStackInstancesCommand");
}
};
// src/commands/DeleteStackSetCommand.ts
var DeleteStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DeleteStackSet", {}).n("CloudFormationClient", "DeleteStackSetCommand").f(void 0, void 0).ser(se_DeleteStackSetCommand).de(de_DeleteStackSetCommand).build() {
static {
__name(this, "DeleteStackSetCommand");
}
};
// src/commands/DeregisterTypeCommand.ts
var DeregisterTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DeregisterType", {}).n("CloudFormationClient", "DeregisterTypeCommand").f(void 0, void 0).ser(se_DeregisterTypeCommand).de(de_DeregisterTypeCommand).build() {
static {
__name(this, "DeregisterTypeCommand");
}
};
// src/commands/DescribeAccountLimitsCommand.ts
var DescribeAccountLimitsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeAccountLimits", {}).n("CloudFormationClient", "DescribeAccountLimitsCommand").f(void 0, void 0).ser(se_DescribeAccountLimitsCommand).de(de_DescribeAccountLimitsCommand).build() {
static {
__name(this, "DescribeAccountLimitsCommand");
}
};
// src/commands/DescribeChangeSetCommand.ts
var DescribeChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeChangeSet", {}).n("CloudFormationClient", "DescribeChangeSetCommand").f(void 0, void 0).ser(se_DescribeChangeSetCommand).de(de_DescribeChangeSetCommand).build() {
static {
__name(this, "DescribeChangeSetCommand");
}
};
// src/commands/DescribeChangeSetHooksCommand.ts
var DescribeChangeSetHooksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeChangeSetHooks", {}).n("CloudFormationClient", "DescribeChangeSetHooksCommand").f(void 0, void 0).ser(se_DescribeChangeSetHooksCommand).de(de_DescribeChangeSetHooksCommand).build() {
static {
__name(this, "DescribeChangeSetHooksCommand");
}
};
// src/commands/DescribeGeneratedTemplateCommand.ts
var DescribeGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeGeneratedTemplate", {}).n("CloudFormationClient", "DescribeGeneratedTemplateCommand").f(void 0, void 0).ser(se_DescribeGeneratedTemplateCommand).de(de_DescribeGeneratedTemplateCommand).build() {
static {
__name(this, "DescribeGeneratedTemplateCommand");
}
};
// src/commands/DescribeOrganizationsAccessCommand.ts
var DescribeOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeOrganizationsAccess", {}).n("CloudFormationClient", "DescribeOrganizationsAccessCommand").f(void 0, void 0).ser(se_DescribeOrganizationsAccessCommand).de(de_DescribeOrganizationsAccessCommand).build() {
static {
__name(this, "DescribeOrganizationsAccessCommand");
}
};
// src/commands/DescribePublisherCommand.ts
var DescribePublisherCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribePublisher", {}).n("CloudFormationClient", "DescribePublisherCommand").f(void 0, void 0).ser(se_DescribePublisherCommand).de(de_DescribePublisherCommand).build() {
static {
__name(this, "DescribePublisherCommand");
}
};
// src/commands/DescribeResourceScanCommand.ts
var DescribeResourceScanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeResourceScan", {}).n("CloudFormationClient", "DescribeResourceScanCommand").f(void 0, void 0).ser(se_DescribeResourceScanCommand).de(de_DescribeResourceScanCommand).build() {
static {
__name(this, "DescribeResourceScanCommand");
}
};
// src/commands/DescribeStackDriftDetectionStatusCommand.ts
var DescribeStackDriftDetectionStatusCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStackDriftDetectionStatus", {}).n("CloudFormationClient", "DescribeStackDriftDetectionStatusCommand").f(void 0, void 0).ser(se_DescribeStackDriftDetectionStatusCommand).de(de_DescribeStackDriftDetectionStatusCommand).build() {
static {
__name(this, "DescribeStackDriftDetectionStatusCommand");
}
};
// src/commands/DescribeStackEventsCommand.ts
var DescribeStackEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStackEvents", {}).n("CloudFormationClient", "DescribeStackEventsCommand").f(void 0, void 0).ser(se_DescribeStackEventsCommand).de(de_DescribeStackEventsCommand).build() {
static {
__name(this, "DescribeStackEventsCommand");
}
};
// src/commands/DescribeStackInstanceCommand.ts
var DescribeStackInstanceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStackInstance", {}).n("CloudFormationClient", "DescribeStackInstanceCommand").f(void 0, void 0).ser(se_DescribeStackInstanceCommand).de(de_DescribeStackInstanceCommand).build() {
static {
__name(this, "DescribeStackInstanceCommand");
}
};
// src/commands/DescribeStackRefactorCommand.ts
var DescribeStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStackRefactor", {}).n("CloudFormationClient", "DescribeStackRefactorCommand").f(void 0, void 0).ser(se_DescribeStackRefactorCommand).de(de_DescribeStackRefactorCommand).build() {
static {
__name(this, "DescribeStackRefactorCommand");
}
};
// src/commands/DescribeStackResourceCommand.ts
var DescribeStackResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStackResource", {}).n("CloudFormationClient", "DescribeStackResourceCommand").f(void 0, void 0).ser(se_DescribeStackResourceCommand).de(de_DescribeStackResourceCommand).build() {
static {
__name(this, "DescribeStackResourceCommand");
}
};
// src/commands/DescribeStackResourceDriftsCommand.ts
var DescribeStackResourceDriftsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStackResourceDrifts", {}).n("CloudFormationClient", "DescribeStackResourceDriftsCommand").f(void 0, void 0).ser(se_DescribeStackResourceDriftsCommand).de(de_DescribeStackResourceDriftsCommand).build() {
static {
__name(this, "DescribeStackResourceDriftsCommand");
}
};
// src/commands/DescribeStackResourcesCommand.ts
var DescribeStackResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStackResources", {}).n("CloudFormationClient", "DescribeStackResourcesCommand").f(void 0, void 0).ser(se_DescribeStackResourcesCommand).de(de_DescribeStackResourcesCommand).build() {
static {
__name(this, "DescribeStackResourcesCommand");
}
};
// src/commands/DescribeStacksCommand.ts
var DescribeStacksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStacks", {}).n("CloudFormationClient", "DescribeStacksCommand").f(void 0, void 0).ser(se_DescribeStacksCommand).de(de_DescribeStacksCommand).build() {
static {
__name(this, "DescribeStacksCommand");
}
};
// src/commands/DescribeStackSetCommand.ts
var DescribeStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStackSet", {}).n("CloudFormationClient", "DescribeStackSetCommand").f(void 0, void 0).ser(se_DescribeStackSetCommand).de(de_DescribeStackSetCommand).build() {
static {
__name(this, "DescribeStackSetCommand");
}
};
// src/commands/DescribeStackSetOperationCommand.ts
var DescribeStackSetOperationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeStackSetOperation", {}).n("CloudFormationClient", "DescribeStackSetOperationCommand").f(void 0, void 0).ser(se_DescribeStackSetOperationCommand).de(de_DescribeStackSetOperationCommand).build() {
static {
__name(this, "DescribeStackSetOperationCommand");
}
};
// src/commands/DescribeTypeCommand.ts
var DescribeTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeType", {}).n("CloudFormationClient", "DescribeTypeCommand").f(void 0, void 0).ser(se_DescribeTypeCommand).de(de_DescribeTypeCommand).build() {
static {
__name(this, "DescribeTypeCommand");
}
};
// src/commands/DescribeTypeRegistrationCommand.ts
var DescribeTypeRegistrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DescribeTypeRegistration", {}).n("CloudFormationClient", "DescribeTypeRegistrationCommand").f(void 0, void 0).ser(se_DescribeTypeRegistrationCommand).de(de_DescribeTypeRegistrationCommand).build() {
static {
__name(this, "DescribeTypeRegistrationCommand");
}
};
// src/commands/DetectStackDriftCommand.ts
var DetectStackDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DetectStackDrift", {}).n("CloudFormationClient", "DetectStackDriftCommand").f(void 0, void 0).ser(se_DetectStackDriftCommand).de(de_DetectStackDriftCommand).build() {
static {
__name(this, "DetectStackDriftCommand");
}
};
// src/commands/DetectStackResourceDriftCommand.ts
var DetectStackResourceDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DetectStackResourceDrift", {}).n("CloudFormationClient", "DetectStackResourceDriftCommand").f(void 0, void 0).ser(se_DetectStackResourceDriftCommand).de(de_DetectStackResourceDriftCommand).build() {
static {
__name(this, "DetectStackResourceDriftCommand");
}
};
// src/commands/DetectStackSetDriftCommand.ts
var DetectStackSetDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "DetectStackSetDrift", {}).n("CloudFormationClient", "DetectStackSetDriftCommand").f(void 0, void 0).ser(se_DetectStackSetDriftCommand).de(de_DetectStackSetDriftCommand).build() {
static {
__name(this, "DetectStackSetDriftCommand");
}
};
// src/commands/EstimateTemplateCostCommand.ts
var EstimateTemplateCostCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "EstimateTemplateCost", {}).n("CloudFormationClient", "EstimateTemplateCostCommand").f(void 0, void 0).ser(se_EstimateTemplateCostCommand).de(de_EstimateTemplateCostCommand).build() {
static {
__name(this, "EstimateTemplateCostCommand");
}
};
// src/commands/ExecuteChangeSetCommand.ts
var ExecuteChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ExecuteChangeSet", {}).n("CloudFormationClient", "ExecuteChangeSetCommand").f(void 0, void 0).ser(se_ExecuteChangeSetCommand).de(de_ExecuteChangeSetCommand).build() {
static {
__name(this, "ExecuteChangeSetCommand");
}
};
// src/commands/ExecuteStackRefactorCommand.ts
var ExecuteStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ExecuteStackRefactor", {}).n("CloudFormationClient", "ExecuteStackRefactorCommand").f(void 0, void 0).ser(se_ExecuteStackRefactorCommand).de(de_ExecuteStackRefactorCommand).build() {
static {
__name(this, "ExecuteStackRefactorCommand");
}
};
// src/commands/GetGeneratedTemplateCommand.ts
var GetGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "GetGeneratedTemplate", {}).n("CloudFormationClient", "GetGeneratedTemplateCommand").f(void 0, void 0).ser(se_GetGeneratedTemplateCommand).de(de_GetGeneratedTemplateCommand).build() {
static {
__name(this, "GetGeneratedTemplateCommand");
}
};
// src/commands/GetStackPolicyCommand.ts
var GetStackPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "GetStackPolicy", {}).n("CloudFormationClient", "GetStackPolicyCommand").f(void 0, void 0).ser(se_GetStackPolicyCommand).de(de_GetStackPolicyCommand).build() {
static {
__name(this, "GetStackPolicyCommand");
}
};
// src/commands/GetTemplateCommand.ts
var GetTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "GetTemplate", {}).n("CloudFormationClient", "GetTemplateCommand").f(void 0, void 0).ser(se_GetTemplateCommand).de(de_GetTemplateCommand).build() {
static {
__name(this, "GetTemplateCommand");
}
};
// src/commands/GetTemplateSummaryCommand.ts
var GetTemplateSummaryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "GetTemplateSummary", {}).n("CloudFormationClient", "GetTemplateSummaryCommand").f(void 0, void 0).ser(se_GetTemplateSummaryCommand).de(de_GetTemplateSummaryCommand).build() {
static {
__name(this, "GetTemplateSummaryCommand");
}
};
// src/commands/ImportStacksToStackSetCommand.ts
var ImportStacksToStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ImportStacksToStackSet", {}).n("CloudFormationClient", "ImportStacksToStackSetCommand").f(void 0, void 0).ser(se_ImportStacksToStackSetCommand).de(de_ImportStacksToStackSetCommand).build() {
static {
__name(this, "ImportStacksToStackSetCommand");
}
};
// src/commands/ListChangeSetsCommand.ts
var ListChangeSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListChangeSets", {}).n("CloudFormationClient", "ListChangeSetsCommand").f(void 0, void 0).ser(se_ListChangeSetsCommand).de(de_ListChangeSetsCommand).build() {
static {
__name(this, "ListChangeSetsCommand");
}
};
// src/commands/ListExportsCommand.ts
var ListExportsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListExports", {}).n("CloudFormationClient", "ListExportsCommand").f(void 0, void 0).ser(se_ListExportsCommand).de(de_ListExportsCommand).build() {
static {
__name(this, "ListExportsCommand");
}
};
// src/commands/ListGeneratedTemplatesCommand.ts
var ListGeneratedTemplatesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListGeneratedTemplates", {}).n("CloudFormationClient", "ListGeneratedTemplatesCommand").f(void 0, void 0).ser(se_ListGeneratedTemplatesCommand).de(de_ListGeneratedTemplatesCommand).build() {
static {
__name(this, "ListGeneratedTemplatesCommand");
}
};
// src/commands/ListHookResultsCommand.ts
var ListHookResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListHookResults", {}).n("CloudFormationClient", "ListHookResultsCommand").f(void 0, void 0).ser(se_ListHookResultsCommand).de(de_ListHookResultsCommand).build() {
static {
__name(this, "ListHookResultsCommand");
}
};
// src/commands/ListImportsCommand.ts
var ListImportsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListImports", {}).n("CloudFormationClient", "ListImportsCommand").f(void 0, void 0).ser(se_ListImportsCommand).de(de_ListImportsCommand).build() {
static {
__name(this, "ListImportsCommand");
}
};
// src/commands/ListResourceScanRelatedResourcesCommand.ts
var ListResourceScanRelatedResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListResourceScanRelatedResources", {}).n("CloudFormationClient", "ListResourceScanRelatedResourcesCommand").f(void 0, void 0).ser(se_ListResourceScanRelatedResourcesCommand).de(de_ListResourceScanRelatedResourcesCommand).build() {
static {
__name(this, "ListResourceScanRelatedResourcesCommand");
}
};
// src/commands/ListResourceScanResourcesCommand.ts
var ListResourceScanResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListResourceScanResources", {}).n("CloudFormationClient", "ListResourceScanResourcesCommand").f(void 0, void 0).ser(se_ListResourceScanResourcesCommand).de(de_ListResourceScanResourcesCommand).build() {
static {
__name(this, "ListResourceScanResourcesCommand");
}
};
// src/commands/ListResourceScansCommand.ts
var ListResourceScansCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListResourceScans", {}).n("CloudFormationClient", "ListResourceScansCommand").f(void 0, void 0).ser(se_ListResourceScansCommand).de(de_ListResourceScansCommand).build() {
static {
__name(this, "ListResourceScansCommand");
}
};
// src/commands/ListStackInstanceResourceDriftsCommand.ts
var ListStackInstanceResourceDriftsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStackInstanceResourceDrifts", {}).n("CloudFormationClient", "ListStackInstanceResourceDriftsCommand").f(void 0, void 0).ser(se_ListStackInstanceResourceDriftsCommand).de(de_ListStackInstanceResourceDriftsCommand).build() {
static {
__name(this, "ListStackInstanceResourceDriftsCommand");
}
};
// src/commands/ListStackInstancesCommand.ts
var ListStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStackInstances", {}).n("CloudFormationClient", "ListStackInstancesCommand").f(void 0, void 0).ser(se_ListStackInstancesCommand).de(de_ListStackInstancesCommand).build() {
static {
__name(this, "ListStackInstancesCommand");
}
};
// src/commands/ListStackRefactorActionsCommand.ts
var ListStackRefactorActionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStackRefactorActions", {}).n("CloudFormationClient", "ListStackRefactorActionsCommand").f(void 0, void 0).ser(se_ListStackRefactorActionsCommand).de(de_ListStackRefactorActionsCommand).build() {
static {
__name(this, "ListStackRefactorActionsCommand");
}
};
// src/commands/ListStackRefactorsCommand.ts
var ListStackRefactorsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStackRefactors", {}).n("CloudFormationClient", "ListStackRefactorsCommand").f(void 0, void 0).ser(se_ListStackRefactorsCommand).de(de_ListStackRefactorsCommand).build() {
static {
__name(this, "ListStackRefactorsCommand");
}
};
// src/commands/ListStackResourcesCommand.ts
var ListStackResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStackResources", {}).n("CloudFormationClient", "ListStackResourcesCommand").f(void 0, void 0).ser(se_ListStackResourcesCommand).de(de_ListStackResourcesCommand).build() {
static {
__name(this, "ListStackResourcesCommand");
}
};
// src/commands/ListStacksCommand.ts
var ListStacksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStacks", {}).n("CloudFormationClient", "ListStacksCommand").f(void 0, void 0).ser(se_ListStacksCommand).de(de_ListStacksCommand).build() {
static {
__name(this, "ListStacksCommand");
}
};
// src/commands/ListStackSetAutoDeploymentTargetsCommand.ts
var ListStackSetAutoDeploymentTargetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStackSetAutoDeploymentTargets", {}).n("CloudFormationClient", "ListStackSetAutoDeploymentTargetsCommand").f(void 0, void 0).ser(se_ListStackSetAutoDeploymentTargetsCommand).de(de_ListStackSetAutoDeploymentTargetsCommand).build() {
static {
__name(this, "ListStackSetAutoDeploymentTargetsCommand");
}
};
// src/commands/ListStackSetOperationResultsCommand.ts
var ListStackSetOperationResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStackSetOperationResults", {}).n("CloudFormationClient", "ListStackSetOperationResultsCommand").f(void 0, void 0).ser(se_ListStackSetOperationResultsCommand).de(de_ListStackSetOperationResultsCommand).build() {
static {
__name(this, "ListStackSetOperationResultsCommand");
}
};
// src/commands/ListStackSetOperationsCommand.ts
var ListStackSetOperationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStackSetOperations", {}).n("CloudFormationClient", "ListStackSetOperationsCommand").f(void 0, void 0).ser(se_ListStackSetOperationsCommand).de(de_ListStackSetOperationsCommand).build() {
static {
__name(this, "ListStackSetOperationsCommand");
}
};
// src/commands/ListStackSetsCommand.ts
var ListStackSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListStackSets", {}).n("CloudFormationClient", "ListStackSetsCommand").f(void 0, void 0).ser(se_ListStackSetsCommand).de(de_ListStackSetsCommand).build() {
static {
__name(this, "ListStackSetsCommand");
}
};
// src/commands/ListTypeRegistrationsCommand.ts
var ListTypeRegistrationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListTypeRegistrations", {}).n("CloudFormationClient", "ListTypeRegistrationsCommand").f(void 0, void 0).ser(se_ListTypeRegistrationsCommand).de(de_ListTypeRegistrationsCommand).build() {
static {
__name(this, "ListTypeRegistrationsCommand");
}
};
// src/commands/ListTypesCommand.ts
var ListTypesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListTypes", {}).n("CloudFormationClient", "ListTypesCommand").f(void 0, void 0).ser(se_ListTypesCommand).de(de_ListTypesCommand).build() {
static {
__name(this, "ListTypesCommand");
}
};
// src/commands/ListTypeVersionsCommand.ts
var ListTypeVersionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ListTypeVersions", {}).n("CloudFormationClient", "ListTypeVersionsCommand").f(void 0, void 0).ser(se_ListTypeVersionsCommand).de(de_ListTypeVersionsCommand).build() {
static {
__name(this, "ListTypeVersionsCommand");
}
};
// src/commands/PublishTypeCommand.ts
var PublishTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "PublishType", {}).n("CloudFormationClient", "PublishTypeCommand").f(void 0, void 0).ser(se_PublishTypeCommand).de(de_PublishTypeCommand).build() {
static {
__name(this, "PublishTypeCommand");
}
};
// src/commands/RecordHandlerProgressCommand.ts
var RecordHandlerProgressCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "RecordHandlerProgress", {}).n("CloudFormationClient", "RecordHandlerProgressCommand").f(void 0, void 0).ser(se_RecordHandlerProgressCommand).de(de_RecordHandlerProgressCommand).build() {
static {
__name(this, "RecordHandlerProgressCommand");
}
};
// src/commands/RegisterPublisherCommand.ts
var RegisterPublisherCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "RegisterPublisher", {}).n("CloudFormationClient", "RegisterPublisherCommand").f(void 0, void 0).ser(se_RegisterPublisherCommand).de(de_RegisterPublisherCommand).build() {
static {
__name(this, "RegisterPublisherCommand");
}
};
// src/commands/RegisterTypeCommand.ts
var RegisterTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "RegisterType", {}).n("CloudFormationClient", "RegisterTypeCommand").f(void 0, void 0).ser(se_RegisterTypeCommand).de(de_RegisterTypeCommand).build() {
static {
__name(this, "RegisterTypeCommand");
}
};
// src/commands/RollbackStackCommand.ts
var RollbackStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "RollbackStack", {}).n("CloudFormationClient", "RollbackStackCommand").f(void 0, void 0).ser(se_RollbackStackCommand).de(de_RollbackStackCommand).build() {
static {
__name(this, "RollbackStackCommand");
}
};
// src/commands/SetStackPolicyCommand.ts
var SetStackPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "SetStackPolicy", {}).n("CloudFormationClient", "SetStackPolicyCommand").f(void 0, void 0).ser(se_SetStackPolicyCommand).de(de_SetStackPolicyCommand).build() {
static {
__name(this, "SetStackPolicyCommand");
}
};
// src/commands/SetTypeConfigurationCommand.ts
var SetTypeConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "SetTypeConfiguration", {}).n("CloudFormationClient", "SetTypeConfigurationCommand").f(void 0, void 0).ser(se_SetTypeConfigurationCommand).de(de_SetTypeConfigurationCommand).build() {
static {
__name(this, "SetTypeConfigurationCommand");
}
};
// src/commands/SetTypeDefaultVersionCommand.ts
var SetTypeDefaultVersionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "SetTypeDefaultVersion", {}).n("CloudFormationClient", "SetTypeDefaultVersionCommand").f(void 0, void 0).ser(se_SetTypeDefaultVersionCommand).de(de_SetTypeDefaultVersionCommand).build() {
static {
__name(this, "SetTypeDefaultVersionCommand");
}
};
// src/commands/SignalResourceCommand.ts
var SignalResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "SignalResource", {}).n("CloudFormationClient", "SignalResourceCommand").f(void 0, void 0).ser(se_SignalResourceCommand).de(de_SignalResourceCommand).build() {
static {
__name(this, "SignalResourceCommand");
}
};
// src/commands/StartResourceScanCommand.ts
var StartResourceScanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "StartResourceScan", {}).n("CloudFormationClient", "StartResourceScanCommand").f(void 0, void 0).ser(se_StartResourceScanCommand).de(de_StartResourceScanCommand).build() {
static {
__name(this, "StartResourceScanCommand");
}
};
// src/commands/StopStackSetOperationCommand.ts
var StopStackSetOperationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "StopStackSetOperation", {}).n("CloudFormationClient", "StopStackSetOperationCommand").f(void 0, void 0).ser(se_StopStackSetOperationCommand).de(de_StopStackSetOperationCommand).build() {
static {
__name(this, "StopStackSetOperationCommand");
}
};
// src/commands/TestTypeCommand.ts
var TestTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "TestType", {}).n("CloudFormationClient", "TestTypeCommand").f(void 0, void 0).ser(se_TestTypeCommand).de(de_TestTypeCommand).build() {
static {
__name(this, "TestTypeCommand");
}
};
// src/commands/UpdateGeneratedTemplateCommand.ts
var UpdateGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "UpdateGeneratedTemplate", {}).n("CloudFormationClient", "UpdateGeneratedTemplateCommand").f(void 0, void 0).ser(se_UpdateGeneratedTemplateCommand).de(de_UpdateGeneratedTemplateCommand).build() {
static {
__name(this, "UpdateGeneratedTemplateCommand");
}
};
// src/commands/UpdateStackCommand.ts
var UpdateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "UpdateStack", {}).n("CloudFormationClient", "UpdateStackCommand").f(void 0, void 0).ser(se_UpdateStackCommand).de(de_UpdateStackCommand).build() {
static {
__name(this, "UpdateStackCommand");
}
};
// src/commands/UpdateStackInstancesCommand.ts
var UpdateStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "UpdateStackInstances", {}).n("CloudFormationClient", "UpdateStackInstancesCommand").f(void 0, void 0).ser(se_UpdateStackInstancesCommand).de(de_UpdateStackInstancesCommand).build() {
static {
__name(this, "UpdateStackInstancesCommand");
}
};
// src/commands/UpdateStackSetCommand.ts
var UpdateStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "UpdateStackSet", {}).n("CloudFormationClient", "UpdateStackSetCommand").f(void 0, void 0).ser(se_UpdateStackSetCommand).de(de_UpdateStackSetCommand).build() {
static {
__name(this, "UpdateStackSetCommand");
}
};
// src/commands/UpdateTerminationProtectionCommand.ts
var UpdateTerminationProtectionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "UpdateTerminationProtection", {}).n("CloudFormationClient", "UpdateTerminationProtectionCommand").f(void 0, void 0).ser(se_UpdateTerminationProtectionCommand).de(de_UpdateTerminationProtectionCommand).build() {
static {
__name(this, "UpdateTerminationProtectionCommand");
}
};
// src/commands/ValidateTemplateCommand.ts
var ValidateTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("CloudFormation", "ValidateTemplate", {}).n("CloudFormationClient", "ValidateTemplateCommand").f(void 0, void 0).ser(se_ValidateTemplateCommand).de(de_ValidateTemplateCommand).build() {
static {
__name(this, "ValidateTemplateCommand");
}
};
// src/CloudFormation.ts
var commands = {
ActivateOrganizationsAccessCommand,
ActivateTypeCommand,
BatchDescribeTypeConfigurationsCommand,
CancelUpdateStackCommand,
ContinueUpdateRollbackCommand,
CreateChangeSetCommand,
CreateGeneratedTemplateCommand,
CreateStackCommand,
CreateStackInstancesCommand,
CreateStackRefactorCommand,
CreateStackSetCommand,
DeactivateOrganizationsAccessCommand,
DeactivateTypeCommand,
DeleteChangeSetCommand,
DeleteGeneratedTemplateCommand,
DeleteStackCommand,
DeleteStackInstancesCommand,
DeleteStackSetCommand,
DeregisterTypeCommand,
DescribeAccountLimitsCommand,
DescribeChangeSetCommand,
DescribeChangeSetHooksCommand,
DescribeGeneratedTemplateCommand,
DescribeOrganizationsAccessCommand,
DescribePublisherCommand,
DescribeResourceScanCommand,
DescribeStackDriftDetectionStatusCommand,
DescribeStackEventsCommand,
DescribeStackInstanceCommand,
DescribeStackRefactorCommand,
DescribeStackResourceCommand,
DescribeStackResourceDriftsCommand,
DescribeStackResourcesCommand,
DescribeStacksCommand,
DescribeStackSetCommand,
DescribeStackSetOperationCommand,
DescribeTypeCommand,
DescribeTypeRegistrationCommand,
DetectStackDriftCommand,
DetectStackResourceDriftCommand,
DetectStackSetDriftCommand,
EstimateTemplateCostCommand,
ExecuteChangeSetCommand,
ExecuteStackRefactorCommand,
GetGeneratedTemplateCommand,
GetStackPolicyCommand,
GetTemplateCommand,
GetTemplateSummaryCommand,
ImportStacksToStackSetCommand,
ListChangeSetsCommand,
ListExportsCommand,
ListGeneratedTemplatesCommand,
ListHookResultsCommand,
ListImportsCommand,
ListResourceScanRelatedResourcesCommand,
ListResourceScanResourcesCommand,
ListResourceScansCommand,
ListStackInstanceResourceDriftsCommand,
ListStackInstancesCommand,
ListStackRefactorActionsCommand,
ListStackRefactorsCommand,
ListStackResourcesCommand,
ListStacksCommand,
ListStackSetAutoDeploymentTargetsCommand,
ListStackSetOperationResultsCommand,
ListStackSetOperationsCommand,
ListStackSetsCommand,
ListTypeRegistrationsCommand,
ListTypesCommand,
ListTypeVersionsCommand,
PublishTypeCommand,
RecordHandlerProgressCommand,
RegisterPublisherCommand,
RegisterTypeCommand,
RollbackStackCommand,
SetStackPolicyCommand,
SetTypeConfigurationCommand,
SetTypeDefaultVersionCommand,
SignalResourceCommand,
StartResourceScanCommand,
StopStackSetOperationCommand,
TestTypeCommand,
UpdateGeneratedTemplateCommand,
UpdateStackCommand,
UpdateStackInstancesCommand,
UpdateStackSetCommand,
UpdateTerminationProtectionCommand,
ValidateTemplateCommand
};
var CloudFormation = class extends CloudFormationClient {
static {
__name(this, "CloudFormation");
}
};
(0, import_smithy_client.createAggregatedClient)(commands, CloudFormation);
// src/pagination/DescribeAccountLimitsPaginator.ts
var paginateDescribeAccountLimits = (0, import_core.createPaginator)(CloudFormationClient, DescribeAccountLimitsCommand, "NextToken", "NextToken", "");
// src/pagination/DescribeStackEventsPaginator.ts
var paginateDescribeStackEvents = (0, import_core.createPaginator)(CloudFormationClient, DescribeStackEventsCommand, "NextToken", "NextToken", "");
// src/pagination/DescribeStackResourceDriftsPaginator.ts
var paginateDescribeStackResourceDrifts = (0, import_core.createPaginator)(CloudFormationClient, DescribeStackResourceDriftsCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/DescribeStacksPaginator.ts
var paginateDescribeStacks = (0, import_core.createPaginator)(CloudFormationClient, DescribeStacksCommand, "NextToken", "NextToken", "");
// src/pagination/ListChangeSetsPaginator.ts
var paginateListChangeSets = (0, import_core.createPaginator)(CloudFormationClient, ListChangeSetsCommand, "NextToken", "NextToken", "");
// src/pagination/ListExportsPaginator.ts
var paginateListExports = (0, import_core.createPaginator)(CloudFormationClient, ListExportsCommand, "NextToken", "NextToken", "");
// src/pagination/ListGeneratedTemplatesPaginator.ts
var paginateListGeneratedTemplates = (0, import_core.createPaginator)(CloudFormationClient, ListGeneratedTemplatesCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListImportsPaginator.ts
var paginateListImports = (0, import_core.createPaginator)(CloudFormationClient, ListImportsCommand, "NextToken", "NextToken", "");
// src/pagination/ListResourceScanRelatedResourcesPaginator.ts
var paginateListResourceScanRelatedResources = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScanRelatedResourcesCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListResourceScanResourcesPaginator.ts
var paginateListResourceScanResources = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScanResourcesCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListResourceScansPaginator.ts
var paginateListResourceScans = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScansCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListStackInstancesPaginator.ts
var paginateListStackInstances = (0, import_core.createPaginator)(CloudFormationClient, ListStackInstancesCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListStackRefactorActionsPaginator.ts
var paginateListStackRefactorActions = (0, import_core.createPaginator)(CloudFormationClient, ListStackRefactorActionsCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListStackRefactorsPaginator.ts
var paginateListStackRefactors = (0, import_core.createPaginator)(CloudFormationClient, ListStackRefactorsCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListStackResourcesPaginator.ts
var paginateListStackResources = (0, import_core.createPaginator)(CloudFormationClient, ListStackResourcesCommand, "NextToken", "NextToken", "");
// src/pagination/ListStackSetOperationResultsPaginator.ts
var paginateListStackSetOperationResults = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetOperationResultsCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListStackSetOperationsPaginator.ts
var paginateListStackSetOperations = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetOperationsCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListStackSetsPaginator.ts
var paginateListStackSets = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetsCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListStacksPaginator.ts
var paginateListStacks = (0, import_core.createPaginator)(CloudFormationClient, ListStacksCommand, "NextToken", "NextToken", "");
// src/pagination/ListTypeRegistrationsPaginator.ts
var paginateListTypeRegistrations = (0, import_core.createPaginator)(CloudFormationClient, ListTypeRegistrationsCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListTypeVersionsPaginator.ts
var paginateListTypeVersions = (0, import_core.createPaginator)(CloudFormationClient, ListTypeVersionsCommand, "NextToken", "NextToken", "MaxResults");
// src/pagination/ListTypesPaginator.ts
var paginateListTypes = (0, import_core.createPaginator)(CloudFormationClient, ListTypesCommand, "NextToken", "NextToken", "MaxResults");
// src/waiters/waitForChangeSetCreateComplete.ts
var import_util_waiter = __nccwpck_require__(78011);
var checkState = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeChangeSetCommand(input));
reason = result;
try {
const returnComparator = /* @__PURE__ */ __name(() => {
return result.Status;
}, "returnComparator");
if (returnComparator() === "CREATE_COMPLETE") {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
return result.Status;
}, "returnComparator");
if (returnComparator() === "FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
} catch (e) {
}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "ValidationError") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForChangeSetCreateComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
}, "waitForChangeSetCreateComplete");
var waitUntilChangeSetCreateComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilChangeSetCreateComplete");
// src/waiters/waitForStackCreateComplete.ts
var checkState2 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeStacksCommand(input));
reason = result;
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "CREATE_COMPLETE";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_COMPLETE";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_IN_PROGRESS";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_FAILED";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_IN_PROGRESS";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_FAILED";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_COMPLETE";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "CREATE_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "DELETE_COMPLETE") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "DELETE_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "ROLLBACK_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "ROLLBACK_COMPLETE") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "ValidationError") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForStackCreateComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
}, "waitForStackCreateComplete");
var waitUntilStackCreateComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilStackCreateComplete");
// src/waiters/waitForStackDeleteComplete.ts
var checkState3 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeStacksCommand(input));
reason = result;
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "DELETE_COMPLETE";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "DELETE_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "CREATE_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "ROLLBACK_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "UPDATE_ROLLBACK_IN_PROGRESS") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "UPDATE_ROLLBACK_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "UPDATE_ROLLBACK_COMPLETE") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "UPDATE_COMPLETE") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "ValidationError") {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForStackDeleteComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);
}, "waitForStackDeleteComplete");
var waitUntilStackDeleteComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilStackDeleteComplete");
// src/waiters/waitForStackExists.ts
var checkState4 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeStacksCommand(input));
reason = result;
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "ValidationError") {
return { state: import_util_waiter.WaiterState.RETRY, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForStackExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);
}, "waitForStackExists");
var waitUntilStackExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilStackExists");
// src/waiters/waitForStackImportComplete.ts
var checkState5 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeStacksCommand(input));
reason = result;
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "IMPORT_COMPLETE";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "ROLLBACK_COMPLETE") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "ROLLBACK_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "IMPORT_ROLLBACK_IN_PROGRESS") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "IMPORT_ROLLBACK_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "IMPORT_ROLLBACK_COMPLETE") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "ValidationError") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForStackImportComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState5);
}, "waitForStackImportComplete");
var waitUntilStackImportComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState5);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilStackImportComplete");
// src/waiters/waitForStackRefactorCreateComplete.ts
var checkState6 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeStackRefactorCommand(input));
reason = result;
try {
const returnComparator = /* @__PURE__ */ __name(() => {
return result.Status;
}, "returnComparator");
if (returnComparator() === "CREATE_COMPLETE") {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
return result.Status;
}, "returnComparator");
if (returnComparator() === "CREATE_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
} catch (e) {
}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "ValidationError") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForStackRefactorCreateComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState6);
}, "waitForStackRefactorCreateComplete");
var waitUntilStackRefactorCreateComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState6);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilStackRefactorCreateComplete");
// src/waiters/waitForStackRefactorExecuteComplete.ts
var checkState7 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeStackRefactorCommand(input));
reason = result;
try {
const returnComparator = /* @__PURE__ */ __name(() => {
return result.ExecutionStatus;
}, "returnComparator");
if (returnComparator() === "EXECUTE_COMPLETE") {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
return result.ExecutionStatus;
}, "returnComparator");
if (returnComparator() === "EXECUTE_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
return result.ExecutionStatus;
}, "returnComparator");
if (returnComparator() === "ROLLBACK_COMPLETE") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
} catch (e) {
}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "ValidationError") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForStackRefactorExecuteComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState7);
}, "waitForStackRefactorExecuteComplete");
var waitUntilStackRefactorExecuteComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState7);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilStackRefactorExecuteComplete");
// src/waiters/waitForStackRollbackComplete.ts
var checkState8 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeStacksCommand(input));
reason = result;
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_COMPLETE";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "UPDATE_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "UPDATE_ROLLBACK_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "DELETE_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "ValidationError") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForStackRollbackComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState8);
}, "waitForStackRollbackComplete");
var waitUntilStackRollbackComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState8);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilStackRollbackComplete");
// src/waiters/waitForStackUpdateComplete.ts
var checkState9 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeStacksCommand(input));
reason = result;
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
let allStringEq_5 = returnComparator().length > 0;
for (const element_4 of returnComparator()) {
allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_COMPLETE";
}
if (allStringEq_5) {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "UPDATE_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "UPDATE_ROLLBACK_FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
const flat_1 = [].concat(...result.Stacks);
const projection_3 = flat_1.map((element_2) => {
return element_2.StackStatus;
});
return projection_3;
}, "returnComparator");
for (const anyStringEq_4 of returnComparator()) {
if (anyStringEq_4 == "UPDATE_ROLLBACK_COMPLETE") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
} catch (e) {
}
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "ValidationError") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForStackUpdateComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState9);
}, "waitForStackUpdateComplete");
var waitUntilStackUpdateComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState9);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilStackUpdateComplete");
// src/waiters/waitForTypeRegistrationComplete.ts
var checkState10 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeTypeRegistrationCommand(input));
reason = result;
try {
const returnComparator = /* @__PURE__ */ __name(() => {
return result.ProgressStatus;
}, "returnComparator");
if (returnComparator() === "COMPLETE") {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
} catch (e) {
}
try {
const returnComparator = /* @__PURE__ */ __name(() => {
return result.ProgressStatus;
}, "returnComparator");
if (returnComparator() === "FAILED") {
return { state: import_util_waiter.WaiterState.FAILURE, reason };
}
} catch (e) {
}
} catch (exception) {
reason = exception;
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForTypeRegistrationComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState10);
}, "waitForTypeRegistrationComplete");
var waitUntilTypeRegistrationComplete = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState10);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilTypeRegistrationComplete");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 82643:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(43713));
const core_1 = __nccwpck_require__(59963);
const credential_provider_node_1 = __nccwpck_require__(75531);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const config_resolver_1 = __nccwpck_require__(53098);
const hash_node_1 = __nccwpck_require__(3081);
const middleware_retry_1 = __nccwpck_require__(96039);
const node_config_provider_1 = __nccwpck_require__(33461);
const node_http_handler_1 = __nccwpck_require__(20258);
const util_body_length_node_1 = __nccwpck_require__(68075);
const util_retry_1 = __nccwpck_require__(84902);
const runtimeConfig_shared_1 = __nccwpck_require__(37328);
const smithy_client_1 = __nccwpck_require__(63570);
const util_defaults_mode_node_1 = __nccwpck_require__(72429);
const smithy_client_2 = __nccwpck_require__(63570);
const getRuntimeConfig = (config) => {
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
const profileConfig = { profile: config?.profile };
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ??
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
(0, node_config_provider_1.loadConfig)({
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 37328:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const core_1 = __nccwpck_require__(59963);
const smithy_client_1 = __nccwpck_require__(63570);
const url_parser_1 = __nccwpck_require__(14681);
const util_base64_1 = __nccwpck_require__(75600);
const util_utf8_1 = __nccwpck_require__(41895);
const httpAuthSchemeProvider_1 = __nccwpck_require__(74292);
const endpointResolver_1 = __nccwpck_require__(5640);
const getRuntimeConfig = (config) => {
return {
apiVersion: "2010-05-15",
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudFormationHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new core_1.AwsSdkSigV4Signer(),
},
],
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
serviceId: config?.serviceId ?? "CloudFormation",
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 99784:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveHttpAuthSchemeConfig = exports.defaultCloudWatchLogsHttpAuthSchemeProvider = exports.defaultCloudWatchLogsHttpAuthSchemeParametersProvider = void 0;
const core_1 = __nccwpck_require__(59963);
const util_middleware_1 = __nccwpck_require__(2390);
const defaultCloudWatchLogsHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
(() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
exports.defaultCloudWatchLogsHttpAuthSchemeParametersProvider = defaultCloudWatchLogsHttpAuthSchemeParametersProvider;
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "logs",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
const defaultCloudWatchLogsHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
exports.defaultCloudWatchLogsHttpAuthSchemeProvider = defaultCloudWatchLogsHttpAuthSchemeProvider;
const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
return Object.assign(config_0, {});
};
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
/***/ }),
/***/ 49488:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultEndpointResolver = void 0;
const util_endpoints_1 = __nccwpck_require__(13350);
const util_endpoints_2 = __nccwpck_require__(45473);
const ruleset_1 = __nccwpck_require__(82237);
const cache = new util_endpoints_2.EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});
const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
exports.defaultEndpointResolver = defaultEndpointResolver;
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
/***/ }),
/***/ 82237:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ruleSet = void 0;
const u = "required", v = "fn", w = "argv", x = "ref";
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [x]: "Region" }, p = { [v]: "getAttr", [w]: [{ [x]: g }, "supportsFIPS"] }, q = { [v]: c, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: g }, "supportsDualStack"] }] }, r = [l], s = [m], t = [o];
const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, p] }, q], rules: [{ endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [p, a] }], rules: [{ conditions: [{ [v]: h, [w]: [o, "us-gov-east-1"] }], endpoint: { url: "https://logs.us-gov-east-1.amazonaws.com", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "us-gov-west-1"] }], endpoint: { url: "https://logs.us-gov-west-1.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://logs.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://logs.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
exports.ruleSet = _data;
/***/ }),
/***/ 31573:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
AccessDeniedException: () => AccessDeniedException,
AnomalyDetectorStatus: () => AnomalyDetectorStatus,
AssociateKmsKeyCommand: () => AssociateKmsKeyCommand,
CancelExportTaskCommand: () => CancelExportTaskCommand,
CloudWatchLogs: () => CloudWatchLogs,
CloudWatchLogsClient: () => CloudWatchLogsClient,
CloudWatchLogsServiceException: () => CloudWatchLogsServiceException,
ConflictException: () => ConflictException,
CreateDeliveryCommand: () => CreateDeliveryCommand,
CreateExportTaskCommand: () => CreateExportTaskCommand,
CreateLogAnomalyDetectorCommand: () => CreateLogAnomalyDetectorCommand,
CreateLogGroupCommand: () => CreateLogGroupCommand,
CreateLogStreamCommand: () => CreateLogStreamCommand,
DataAlreadyAcceptedException: () => DataAlreadyAcceptedException,
DataProtectionStatus: () => DataProtectionStatus,
DeleteAccountPolicyCommand: () => DeleteAccountPolicyCommand,
DeleteDataProtectionPolicyCommand: () => DeleteDataProtectionPolicyCommand,
DeleteDeliveryCommand: () => DeleteDeliveryCommand,
DeleteDeliveryDestinationCommand: () => DeleteDeliveryDestinationCommand,
DeleteDeliveryDestinationPolicyCommand: () => DeleteDeliveryDestinationPolicyCommand,
DeleteDeliverySourceCommand: () => DeleteDeliverySourceCommand,
DeleteDestinationCommand: () => DeleteDestinationCommand,
DeleteIndexPolicyCommand: () => DeleteIndexPolicyCommand,
DeleteIntegrationCommand: () => DeleteIntegrationCommand,
DeleteLogAnomalyDetectorCommand: () => DeleteLogAnomalyDetectorCommand,
DeleteLogGroupCommand: () => DeleteLogGroupCommand,
DeleteLogStreamCommand: () => DeleteLogStreamCommand,
DeleteMetricFilterCommand: () => DeleteMetricFilterCommand,
DeleteQueryDefinitionCommand: () => DeleteQueryDefinitionCommand,
DeleteResourcePolicyCommand: () => DeleteResourcePolicyCommand,
DeleteRetentionPolicyCommand: () => DeleteRetentionPolicyCommand,
DeleteSubscriptionFilterCommand: () => DeleteSubscriptionFilterCommand,
DeleteTransformerCommand: () => DeleteTransformerCommand,
DeliveryDestinationType: () => DeliveryDestinationType,
DescribeAccountPoliciesCommand: () => DescribeAccountPoliciesCommand,
DescribeConfigurationTemplatesCommand: () => DescribeConfigurationTemplatesCommand,
DescribeDeliveriesCommand: () => DescribeDeliveriesCommand,
DescribeDeliveryDestinationsCommand: () => DescribeDeliveryDestinationsCommand,
DescribeDeliverySourcesCommand: () => DescribeDeliverySourcesCommand,
DescribeDestinationsCommand: () => DescribeDestinationsCommand,
DescribeExportTasksCommand: () => DescribeExportTasksCommand,
DescribeFieldIndexesCommand: () => DescribeFieldIndexesCommand,
DescribeIndexPoliciesCommand: () => DescribeIndexPoliciesCommand,
DescribeLogGroupsCommand: () => DescribeLogGroupsCommand,
DescribeLogStreamsCommand: () => DescribeLogStreamsCommand,
DescribeMetricFiltersCommand: () => DescribeMetricFiltersCommand,
DescribeQueriesCommand: () => DescribeQueriesCommand,
DescribeQueryDefinitionsCommand: () => DescribeQueryDefinitionsCommand,
DescribeResourcePoliciesCommand: () => DescribeResourcePoliciesCommand,
DescribeSubscriptionFiltersCommand: () => DescribeSubscriptionFiltersCommand,
DisassociateKmsKeyCommand: () => DisassociateKmsKeyCommand,
Distribution: () => Distribution,
EntityRejectionErrorType: () => EntityRejectionErrorType,
EvaluationFrequency: () => EvaluationFrequency,
ExportTaskStatusCode: () => ExportTaskStatusCode,
FilterLogEventsCommand: () => FilterLogEventsCommand,
FlattenedElement: () => FlattenedElement,
GetDataProtectionPolicyCommand: () => GetDataProtectionPolicyCommand,
GetDeliveryCommand: () => GetDeliveryCommand,
GetDeliveryDestinationCommand: () => GetDeliveryDestinationCommand,
GetDeliveryDestinationPolicyCommand: () => GetDeliveryDestinationPolicyCommand,
GetDeliverySourceCommand: () => GetDeliverySourceCommand,
GetIntegrationCommand: () => GetIntegrationCommand,
GetLogAnomalyDetectorCommand: () => GetLogAnomalyDetectorCommand,
GetLogEventsCommand: () => GetLogEventsCommand,
GetLogGroupFieldsCommand: () => GetLogGroupFieldsCommand,
GetLogRecordCommand: () => GetLogRecordCommand,
GetQueryResultsCommand: () => GetQueryResultsCommand,
GetTransformerCommand: () => GetTransformerCommand,
IndexSource: () => IndexSource,
InheritedProperty: () => InheritedProperty,
IntegrationDetails: () => IntegrationDetails,
IntegrationStatus: () => IntegrationStatus,
IntegrationType: () => IntegrationType,
InvalidOperationException: () => InvalidOperationException,
InvalidParameterException: () => InvalidParameterException,
InvalidSequenceTokenException: () => InvalidSequenceTokenException,
LimitExceededException: () => LimitExceededException,
ListAnomaliesCommand: () => ListAnomaliesCommand,
ListIntegrationsCommand: () => ListIntegrationsCommand,
ListLogAnomalyDetectorsCommand: () => ListLogAnomalyDetectorsCommand,
ListLogGroupsForQueryCommand: () => ListLogGroupsForQueryCommand,
ListTagsForResourceCommand: () => ListTagsForResourceCommand,
ListTagsLogGroupCommand: () => ListTagsLogGroupCommand,
LogGroupClass: () => LogGroupClass,
MalformedQueryException: () => MalformedQueryException,
OpenSearchResourceStatusType: () => OpenSearchResourceStatusType,
OperationAbortedException: () => OperationAbortedException,
OrderBy: () => OrderBy,
OutputFormat: () => OutputFormat,
PolicyType: () => PolicyType,
PutAccountPolicyCommand: () => PutAccountPolicyCommand,
PutDataProtectionPolicyCommand: () => PutDataProtectionPolicyCommand,
PutDeliveryDestinationCommand: () => PutDeliveryDestinationCommand,
PutDeliveryDestinationPolicyCommand: () => PutDeliveryDestinationPolicyCommand,
PutDeliverySourceCommand: () => PutDeliverySourceCommand,
PutDestinationCommand: () => PutDestinationCommand,
PutDestinationPolicyCommand: () => PutDestinationPolicyCommand,
PutIndexPolicyCommand: () => PutIndexPolicyCommand,
PutIntegrationCommand: () => PutIntegrationCommand,
PutLogEventsCommand: () => PutLogEventsCommand,
PutMetricFilterCommand: () => PutMetricFilterCommand,
PutQueryDefinitionCommand: () => PutQueryDefinitionCommand,
PutResourcePolicyCommand: () => PutResourcePolicyCommand,
PutRetentionPolicyCommand: () => PutRetentionPolicyCommand,
PutSubscriptionFilterCommand: () => PutSubscriptionFilterCommand,
PutTransformerCommand: () => PutTransformerCommand,
QueryLanguage: () => QueryLanguage,
QueryStatus: () => QueryStatus,
ResourceAlreadyExistsException: () => ResourceAlreadyExistsException,
ResourceConfig: () => ResourceConfig,
ResourceNotFoundException: () => ResourceNotFoundException,
Scope: () => Scope,
ServiceQuotaExceededException: () => ServiceQuotaExceededException,
ServiceUnavailableException: () => ServiceUnavailableException,
SessionStreamingException: () => SessionStreamingException,
SessionTimeoutException: () => SessionTimeoutException,
StandardUnit: () => StandardUnit,
StartLiveTailCommand: () => StartLiveTailCommand,
StartLiveTailResponseFilterSensitiveLog: () => StartLiveTailResponseFilterSensitiveLog,
StartLiveTailResponseStream: () => StartLiveTailResponseStream,
StartLiveTailResponseStreamFilterSensitiveLog: () => StartLiveTailResponseStreamFilterSensitiveLog,
StartQueryCommand: () => StartQueryCommand,
State: () => State,
StopQueryCommand: () => StopQueryCommand,
SuppressionState: () => SuppressionState,
SuppressionType: () => SuppressionType,
SuppressionUnit: () => SuppressionUnit,
TagLogGroupCommand: () => TagLogGroupCommand,
TagResourceCommand: () => TagResourceCommand,
TestMetricFilterCommand: () => TestMetricFilterCommand,
TestTransformerCommand: () => TestTransformerCommand,
ThrottlingException: () => ThrottlingException,
TooManyTagsException: () => TooManyTagsException,
Type: () => Type,
UnrecognizedClientException: () => UnrecognizedClientException,
UntagLogGroupCommand: () => UntagLogGroupCommand,
UntagResourceCommand: () => UntagResourceCommand,
UpdateAnomalyCommand: () => UpdateAnomalyCommand,
UpdateDeliveryConfigurationCommand: () => UpdateDeliveryConfigurationCommand,
UpdateLogAnomalyDetectorCommand: () => UpdateLogAnomalyDetectorCommand,
ValidationException: () => ValidationException,
__Client: () => import_smithy_client.Client,
paginateDescribeConfigurationTemplates: () => paginateDescribeConfigurationTemplates,
paginateDescribeDeliveries: () => paginateDescribeDeliveries,
paginateDescribeDeliveryDestinations: () => paginateDescribeDeliveryDestinations,
paginateDescribeDeliverySources: () => paginateDescribeDeliverySources,
paginateDescribeDestinations: () => paginateDescribeDestinations,
paginateDescribeLogGroups: () => paginateDescribeLogGroups,
paginateDescribeLogStreams: () => paginateDescribeLogStreams,
paginateDescribeMetricFilters: () => paginateDescribeMetricFilters,
paginateDescribeSubscriptionFilters: () => paginateDescribeSubscriptionFilters,
paginateFilterLogEvents: () => paginateFilterLogEvents,
paginateGetLogEvents: () => paginateGetLogEvents,
paginateListAnomalies: () => paginateListAnomalies,
paginateListLogAnomalyDetectors: () => paginateListLogAnomalyDetectors,
paginateListLogGroupsForQuery: () => paginateListLogGroupsForQuery
});
module.exports = __toCommonJS(index_exports);
// src/CloudWatchLogsClient.ts
var import_middleware_host_header = __nccwpck_require__(22545);
var import_middleware_logger = __nccwpck_require__(20014);
var import_middleware_recursion_detection = __nccwpck_require__(85525);
var import_middleware_user_agent = __nccwpck_require__(64688);
var import_config_resolver = __nccwpck_require__(53098);
var import_core = __nccwpck_require__(55829);
var import_eventstream_serde_config_resolver = __nccwpck_require__(16181);
var import_middleware_content_length = __nccwpck_require__(82800);
var import_middleware_endpoint = __nccwpck_require__(82918);
var import_middleware_retry = __nccwpck_require__(96039);
var import_httpAuthSchemeProvider = __nccwpck_require__(99784);
// src/endpoint/EndpointParameters.ts
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "logs"
});
}, "resolveClientEndpointParameters");
var commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
// src/CloudWatchLogsClient.ts
var import_runtimeConfig = __nccwpck_require__(29879);
// src/runtimeExtensions.ts
var import_region_config_resolver = __nccwpck_require__(18156);
var import_protocol_http = __nccwpck_require__(64418);
var import_smithy_client = __nccwpck_require__(63570);
// src/auth/httpAuthExtensionConfiguration.ts
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
} else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
}
};
}, "getHttpAuthExtensionConfiguration");
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials()
};
}, "resolveHttpAuthRuntimeConfig");
// src/runtimeExtensions.ts
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
getHttpAuthExtensionConfiguration(runtimeConfig)
);
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(
runtimeConfig,
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
resolveHttpAuthRuntimeConfig(extensionConfiguration)
);
}, "resolveRuntimeExtensions");
// src/CloudWatchLogsClient.ts
var CloudWatchLogsClient = class extends import_smithy_client.Client {
static {
__name(this, "CloudWatchLogsClient");
}
/**
* The resolved configuration of CloudWatchLogsClient class. This is resolved and normalized from the {@link CloudWatchLogsClientConfig | constructor configuration interface}.
*/
config;
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6);
const _config_8 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_7);
const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []);
this.config = _config_9;
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use(
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultCloudWatchLogsHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials
}), "identityProviderConfigProvider")
})
);
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
}
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy() {
super.destroy();
}
};
// src/CloudWatchLogs.ts
// src/commands/AssociateKmsKeyCommand.ts
var import_middleware_serde = __nccwpck_require__(81238);
// src/protocols/Aws_json1_1.ts
var import_core2 = __nccwpck_require__(59963);
var import_uuid = __nccwpck_require__(75840);
// src/models/CloudWatchLogsServiceException.ts
var CloudWatchLogsServiceException = class _CloudWatchLogsServiceException extends import_smithy_client.ServiceException {
static {
__name(this, "CloudWatchLogsServiceException");
}
/**
* @internal
*/
constructor(options) {
super(options);
Object.setPrototypeOf(this, _CloudWatchLogsServiceException.prototype);
}
};
// src/models/models_0.ts
var AccessDeniedException = class _AccessDeniedException extends CloudWatchLogsServiceException {
static {
__name(this, "AccessDeniedException");
}
name = "AccessDeniedException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "AccessDeniedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
}
};
var PolicyType = {
DATA_PROTECTION_POLICY: "DATA_PROTECTION_POLICY",
FIELD_INDEX_POLICY: "FIELD_INDEX_POLICY",
SUBSCRIPTION_FILTER_POLICY: "SUBSCRIPTION_FILTER_POLICY",
TRANSFORMER_POLICY: "TRANSFORMER_POLICY"
};
var Scope = {
ALL: "ALL"
};
var State = {
Active: "Active",
Baseline: "Baseline",
Suppressed: "Suppressed"
};
var AnomalyDetectorStatus = {
ANALYZING: "ANALYZING",
DELETED: "DELETED",
FAILED: "FAILED",
INITIALIZING: "INITIALIZING",
PAUSED: "PAUSED",
TRAINING: "TRAINING"
};
var EvaluationFrequency = {
FIFTEEN_MIN: "FIFTEEN_MIN",
FIVE_MIN: "FIVE_MIN",
ONE_HOUR: "ONE_HOUR",
ONE_MIN: "ONE_MIN",
TEN_MIN: "TEN_MIN",
THIRTY_MIN: "THIRTY_MIN"
};
var InvalidParameterException = class _InvalidParameterException extends CloudWatchLogsServiceException {
static {
__name(this, "InvalidParameterException");
}
name = "InvalidParameterException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidParameterException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidParameterException.prototype);
}
};
var OperationAbortedException = class _OperationAbortedException extends CloudWatchLogsServiceException {
static {
__name(this, "OperationAbortedException");
}
name = "OperationAbortedException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "OperationAbortedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _OperationAbortedException.prototype);
}
};
var ResourceNotFoundException = class _ResourceNotFoundException extends CloudWatchLogsServiceException {
static {
__name(this, "ResourceNotFoundException");
}
name = "ResourceNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
}
};
var ServiceUnavailableException = class _ServiceUnavailableException extends CloudWatchLogsServiceException {
static {
__name(this, "ServiceUnavailableException");
}
name = "ServiceUnavailableException";
$fault = "server";
/**
* @internal
*/
constructor(opts) {
super({
name: "ServiceUnavailableException",
$fault: "server",
...opts
});
Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);
}
};
var InvalidOperationException = class _InvalidOperationException extends CloudWatchLogsServiceException {
static {
__name(this, "InvalidOperationException");
}
name = "InvalidOperationException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidOperationException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidOperationException.prototype);
}
};
var OutputFormat = {
JSON: "json",
PARQUET: "parquet",
PLAIN: "plain",
RAW: "raw",
W3C: "w3c"
};
var DeliveryDestinationType = {
CWL: "CWL",
FH: "FH",
S3: "S3"
};
var ConflictException = class _ConflictException extends CloudWatchLogsServiceException {
static {
__name(this, "ConflictException");
}
name = "ConflictException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ConflictException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ConflictException.prototype);
}
};
var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends CloudWatchLogsServiceException {
static {
__name(this, "ServiceQuotaExceededException");
}
name = "ServiceQuotaExceededException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ServiceQuotaExceededException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
}
};
var ThrottlingException = class _ThrottlingException extends CloudWatchLogsServiceException {
static {
__name(this, "ThrottlingException");
}
name = "ThrottlingException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ThrottlingException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ThrottlingException.prototype);
}
};
var ValidationException = class _ValidationException extends CloudWatchLogsServiceException {
static {
__name(this, "ValidationException");
}
name = "ValidationException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ValidationException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ValidationException.prototype);
}
};
var LimitExceededException = class _LimitExceededException extends CloudWatchLogsServiceException {
static {
__name(this, "LimitExceededException");
}
name = "LimitExceededException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "LimitExceededException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _LimitExceededException.prototype);
}
};
var ResourceAlreadyExistsException = class _ResourceAlreadyExistsException extends CloudWatchLogsServiceException {
static {
__name(this, "ResourceAlreadyExistsException");
}
name = "ResourceAlreadyExistsException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceAlreadyExistsException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceAlreadyExistsException.prototype);
}
};
var LogGroupClass = {
INFREQUENT_ACCESS: "INFREQUENT_ACCESS",
STANDARD: "STANDARD"
};
var DataAlreadyAcceptedException = class _DataAlreadyAcceptedException extends CloudWatchLogsServiceException {
static {
__name(this, "DataAlreadyAcceptedException");
}
name = "DataAlreadyAcceptedException";
$fault = "client";
expectedSequenceToken;
/**
* @internal
*/
constructor(opts) {
super({
name: "DataAlreadyAcceptedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _DataAlreadyAcceptedException.prototype);
this.expectedSequenceToken = opts.expectedSequenceToken;
}
};
var DataProtectionStatus = {
ACTIVATED: "ACTIVATED",
ARCHIVED: "ARCHIVED",
DELETED: "DELETED",
DISABLED: "DISABLED"
};
var ExportTaskStatusCode = {
CANCELLED: "CANCELLED",
COMPLETED: "COMPLETED",
FAILED: "FAILED",
PENDING: "PENDING",
PENDING_CANCEL: "PENDING_CANCEL",
RUNNING: "RUNNING"
};
var IndexSource = {
ACCOUNT: "ACCOUNT",
LOG_GROUP: "LOG_GROUP"
};
var InheritedProperty = {
ACCOUNT_DATA_PROTECTION: "ACCOUNT_DATA_PROTECTION"
};
var OrderBy = {
LastEventTime: "LastEventTime",
LogStreamName: "LogStreamName"
};
var StandardUnit = {
Bits: "Bits",
BitsSecond: "Bits/Second",
Bytes: "Bytes",
BytesSecond: "Bytes/Second",
Count: "Count",
CountSecond: "Count/Second",
Gigabits: "Gigabits",
GigabitsSecond: "Gigabits/Second",
Gigabytes: "Gigabytes",
GigabytesSecond: "Gigabytes/Second",
Kilobits: "Kilobits",
KilobitsSecond: "Kilobits/Second",
Kilobytes: "Kilobytes",
KilobytesSecond: "Kilobytes/Second",
Megabits: "Megabits",
MegabitsSecond: "Megabits/Second",
Megabytes: "Megabytes",
MegabytesSecond: "Megabytes/Second",
Microseconds: "Microseconds",
Milliseconds: "Milliseconds",
None: "None",
Percent: "Percent",
Seconds: "Seconds",
Terabits: "Terabits",
TerabitsSecond: "Terabits/Second",
Terabytes: "Terabytes",
TerabytesSecond: "Terabytes/Second"
};
var QueryLanguage = {
CWLI: "CWLI",
PPL: "PPL",
SQL: "SQL"
};
var QueryStatus = {
Cancelled: "Cancelled",
Complete: "Complete",
Failed: "Failed",
Running: "Running",
Scheduled: "Scheduled",
Timeout: "Timeout",
Unknown: "Unknown"
};
var Distribution = {
ByLogStream: "ByLogStream",
Random: "Random"
};
var EntityRejectionErrorType = {
ENTITY_SIZE_TOO_LARGE: "EntitySizeTooLarge",
INVALID_ATTRIBUTES: "InvalidAttributes",
INVALID_ENTITY: "InvalidEntity",
INVALID_KEY_ATTRIBUTE: "InvalidKeyAttributes",
INVALID_TYPE_VALUE: "InvalidTypeValue",
MISSING_REQUIRED_FIELDS: "MissingRequiredFields",
UNSUPPORTED_LOG_GROUP_TYPE: "UnsupportedLogGroupType"
};
var FlattenedElement = {
FIRST: "first",
LAST: "last"
};
var OpenSearchResourceStatusType = {
ACTIVE: "ACTIVE",
ERROR: "ERROR",
NOT_FOUND: "NOT_FOUND"
};
var IntegrationDetails;
((IntegrationDetails2) => {
IntegrationDetails2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.openSearchIntegrationDetails !== void 0)
return visitor.openSearchIntegrationDetails(value.openSearchIntegrationDetails);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(IntegrationDetails || (IntegrationDetails = {}));
var IntegrationStatus = {
ACTIVE: "ACTIVE",
FAILED: "FAILED",
PROVISIONING: "PROVISIONING"
};
var IntegrationType = {
OPENSEARCH: "OPENSEARCH"
};
var Type = {
BOOLEAN: "boolean",
DOUBLE: "double",
INTEGER: "integer",
STRING: "string"
};
var InvalidSequenceTokenException = class _InvalidSequenceTokenException extends CloudWatchLogsServiceException {
static {
__name(this, "InvalidSequenceTokenException");
}
name = "InvalidSequenceTokenException";
$fault = "client";
expectedSequenceToken;
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidSequenceTokenException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidSequenceTokenException.prototype);
this.expectedSequenceToken = opts.expectedSequenceToken;
}
};
var SuppressionState = {
SUPPRESSED: "SUPPRESSED",
UNSUPPRESSED: "UNSUPPRESSED"
};
var ResourceConfig;
((ResourceConfig3) => {
ResourceConfig3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.openSearchResourceConfig !== void 0)
return visitor.openSearchResourceConfig(value.openSearchResourceConfig);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ResourceConfig || (ResourceConfig = {}));
var UnrecognizedClientException = class _UnrecognizedClientException extends CloudWatchLogsServiceException {
static {
__name(this, "UnrecognizedClientException");
}
name = "UnrecognizedClientException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "UnrecognizedClientException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _UnrecognizedClientException.prototype);
}
};
var SessionStreamingException = class _SessionStreamingException extends CloudWatchLogsServiceException {
static {
__name(this, "SessionStreamingException");
}
name = "SessionStreamingException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "SessionStreamingException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _SessionStreamingException.prototype);
}
};
var SessionTimeoutException = class _SessionTimeoutException extends CloudWatchLogsServiceException {
static {
__name(this, "SessionTimeoutException");
}
name = "SessionTimeoutException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "SessionTimeoutException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _SessionTimeoutException.prototype);
}
};
var StartLiveTailResponseStream;
((StartLiveTailResponseStream3) => {
StartLiveTailResponseStream3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.sessionStart !== void 0) return visitor.sessionStart(value.sessionStart);
if (value.sessionUpdate !== void 0) return visitor.sessionUpdate(value.sessionUpdate);
if (value.SessionTimeoutException !== void 0)
return visitor.SessionTimeoutException(value.SessionTimeoutException);
if (value.SessionStreamingException !== void 0)
return visitor.SessionStreamingException(value.SessionStreamingException);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(StartLiveTailResponseStream || (StartLiveTailResponseStream = {}));
var MalformedQueryException = class _MalformedQueryException extends CloudWatchLogsServiceException {
static {
__name(this, "MalformedQueryException");
}
name = "MalformedQueryException";
$fault = "client";
/**
* Reserved.
* @public
*/
queryCompileError;
/**
* @internal
*/
constructor(opts) {
super({
name: "MalformedQueryException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _MalformedQueryException.prototype);
this.queryCompileError = opts.queryCompileError;
}
};
var TooManyTagsException = class _TooManyTagsException extends CloudWatchLogsServiceException {
static {
__name(this, "TooManyTagsException");
}
name = "TooManyTagsException";
$fault = "client";
/**
* The name of the resource.
* @public
*/
resourceName;
/**
* @internal
*/
constructor(opts) {
super({
name: "TooManyTagsException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TooManyTagsException.prototype);
this.resourceName = opts.resourceName;
}
};
var SuppressionUnit = {
HOURS: "HOURS",
MINUTES: "MINUTES",
SECONDS: "SECONDS"
};
var SuppressionType = {
INFINITE: "INFINITE",
LIMITED: "LIMITED"
};
var StartLiveTailResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.sessionStart !== void 0) return { sessionStart: obj.sessionStart };
if (obj.sessionUpdate !== void 0) return { sessionUpdate: obj.sessionUpdate };
if (obj.SessionTimeoutException !== void 0) return { SessionTimeoutException: obj.SessionTimeoutException };
if (obj.SessionStreamingException !== void 0) return { SessionStreamingException: obj.SessionStreamingException };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "StartLiveTailResponseStreamFilterSensitiveLog");
var StartLiveTailResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.responseStream && { responseStream: "STREAMING_CONTENT" }
}), "StartLiveTailResponseFilterSensitiveLog");
// src/protocols/Aws_json1_1.ts
var se_AssociateKmsKeyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("AssociateKmsKey");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_AssociateKmsKeyCommand");
var se_CancelExportTaskCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("CancelExportTask");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CancelExportTaskCommand");
var se_CreateDeliveryCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("CreateDelivery");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateDeliveryCommand");
var se_CreateExportTaskCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("CreateExportTask");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateExportTaskCommand");
var se_CreateLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("CreateLogAnomalyDetector");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateLogAnomalyDetectorCommand");
var se_CreateLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("CreateLogGroup");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateLogGroupCommand");
var se_CreateLogStreamCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("CreateLogStream");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_CreateLogStreamCommand");
var se_DeleteAccountPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteAccountPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteAccountPolicyCommand");
var se_DeleteDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteDataProtectionPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteDataProtectionPolicyCommand");
var se_DeleteDeliveryCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteDelivery");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteDeliveryCommand");
var se_DeleteDeliveryDestinationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteDeliveryDestination");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteDeliveryDestinationCommand");
var se_DeleteDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteDeliveryDestinationPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteDeliveryDestinationPolicyCommand");
var se_DeleteDeliverySourceCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteDeliverySource");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteDeliverySourceCommand");
var se_DeleteDestinationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteDestination");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteDestinationCommand");
var se_DeleteIndexPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteIndexPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteIndexPolicyCommand");
var se_DeleteIntegrationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteIntegration");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteIntegrationCommand");
var se_DeleteLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteLogAnomalyDetector");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteLogAnomalyDetectorCommand");
var se_DeleteLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteLogGroup");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteLogGroupCommand");
var se_DeleteLogStreamCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteLogStream");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteLogStreamCommand");
var se_DeleteMetricFilterCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteMetricFilter");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteMetricFilterCommand");
var se_DeleteQueryDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteQueryDefinition");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteQueryDefinitionCommand");
var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteResourcePolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteResourcePolicyCommand");
var se_DeleteRetentionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteRetentionPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteRetentionPolicyCommand");
var se_DeleteSubscriptionFilterCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteSubscriptionFilter");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteSubscriptionFilterCommand");
var se_DeleteTransformerCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DeleteTransformer");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DeleteTransformerCommand");
var se_DescribeAccountPoliciesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeAccountPolicies");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeAccountPoliciesCommand");
var se_DescribeConfigurationTemplatesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeConfigurationTemplates");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeConfigurationTemplatesCommand");
var se_DescribeDeliveriesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeDeliveries");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeDeliveriesCommand");
var se_DescribeDeliveryDestinationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeDeliveryDestinations");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeDeliveryDestinationsCommand");
var se_DescribeDeliverySourcesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeDeliverySources");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeDeliverySourcesCommand");
var se_DescribeDestinationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeDestinations");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeDestinationsCommand");
var se_DescribeExportTasksCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeExportTasks");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeExportTasksCommand");
var se_DescribeFieldIndexesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeFieldIndexes");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeFieldIndexesCommand");
var se_DescribeIndexPoliciesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeIndexPolicies");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeIndexPoliciesCommand");
var se_DescribeLogGroupsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeLogGroups");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeLogGroupsCommand");
var se_DescribeLogStreamsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeLogStreams");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeLogStreamsCommand");
var se_DescribeMetricFiltersCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeMetricFilters");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeMetricFiltersCommand");
var se_DescribeQueriesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeQueries");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeQueriesCommand");
var se_DescribeQueryDefinitionsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeQueryDefinitions");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeQueryDefinitionsCommand");
var se_DescribeResourcePoliciesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeResourcePolicies");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeResourcePoliciesCommand");
var se_DescribeSubscriptionFiltersCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DescribeSubscriptionFilters");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DescribeSubscriptionFiltersCommand");
var se_DisassociateKmsKeyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("DisassociateKmsKey");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_DisassociateKmsKeyCommand");
var se_FilterLogEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("FilterLogEvents");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_FilterLogEventsCommand");
var se_GetDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetDataProtectionPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetDataProtectionPolicyCommand");
var se_GetDeliveryCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetDelivery");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetDeliveryCommand");
var se_GetDeliveryDestinationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetDeliveryDestination");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetDeliveryDestinationCommand");
var se_GetDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetDeliveryDestinationPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetDeliveryDestinationPolicyCommand");
var se_GetDeliverySourceCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetDeliverySource");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetDeliverySourceCommand");
var se_GetIntegrationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetIntegration");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetIntegrationCommand");
var se_GetLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetLogAnomalyDetector");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetLogAnomalyDetectorCommand");
var se_GetLogEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetLogEvents");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetLogEventsCommand");
var se_GetLogGroupFieldsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetLogGroupFields");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetLogGroupFieldsCommand");
var se_GetLogRecordCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetLogRecord");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetLogRecordCommand");
var se_GetQueryResultsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetQueryResults");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetQueryResultsCommand");
var se_GetTransformerCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("GetTransformer");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_GetTransformerCommand");
var se_ListAnomaliesCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("ListAnomalies");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListAnomaliesCommand");
var se_ListIntegrationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("ListIntegrations");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListIntegrationsCommand");
var se_ListLogAnomalyDetectorsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("ListLogAnomalyDetectors");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListLogAnomalyDetectorsCommand");
var se_ListLogGroupsForQueryCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("ListLogGroupsForQuery");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListLogGroupsForQueryCommand");
var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("ListTagsForResource");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListTagsForResourceCommand");
var se_ListTagsLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("ListTagsLogGroup");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_ListTagsLogGroupCommand");
var se_PutAccountPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutAccountPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutAccountPolicyCommand");
var se_PutDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutDataProtectionPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutDataProtectionPolicyCommand");
var se_PutDeliveryDestinationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutDeliveryDestination");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutDeliveryDestinationCommand");
var se_PutDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutDeliveryDestinationPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutDeliveryDestinationPolicyCommand");
var se_PutDeliverySourceCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutDeliverySource");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutDeliverySourceCommand");
var se_PutDestinationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutDestination");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutDestinationCommand");
var se_PutDestinationPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutDestinationPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutDestinationPolicyCommand");
var se_PutIndexPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutIndexPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutIndexPolicyCommand");
var se_PutIntegrationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutIntegration");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutIntegrationCommand");
var se_PutLogEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutLogEvents");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutLogEventsCommand");
var se_PutMetricFilterCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutMetricFilter");
let body;
body = JSON.stringify(se_PutMetricFilterRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutMetricFilterCommand");
var se_PutQueryDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutQueryDefinition");
let body;
body = JSON.stringify(se_PutQueryDefinitionRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutQueryDefinitionCommand");
var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutResourcePolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutResourcePolicyCommand");
var se_PutRetentionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutRetentionPolicy");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutRetentionPolicyCommand");
var se_PutSubscriptionFilterCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutSubscriptionFilter");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutSubscriptionFilterCommand");
var se_PutTransformerCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("PutTransformer");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_PutTransformerCommand");
var se_StartLiveTailCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("StartLiveTail");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
let { hostname: resolvedHostname } = await context.endpoint();
if (context.disableHostPrefix !== true) {
resolvedHostname = "streaming-" + resolvedHostname;
if (!(0, import_protocol_http.isValidHostname)(resolvedHostname)) {
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
}
}
return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
}, "se_StartLiveTailCommand");
var se_StartQueryCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("StartQuery");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_StartQueryCommand");
var se_StopQueryCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("StopQuery");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_StopQueryCommand");
var se_TagLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("TagLogGroup");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_TagLogGroupCommand");
var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("TagResource");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_TagResourceCommand");
var se_TestMetricFilterCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("TestMetricFilter");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_TestMetricFilterCommand");
var se_TestTransformerCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("TestTransformer");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_TestTransformerCommand");
var se_UntagLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("UntagLogGroup");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UntagLogGroupCommand");
var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("UntagResource");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UntagResourceCommand");
var se_UpdateAnomalyCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("UpdateAnomaly");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UpdateAnomalyCommand");
var se_UpdateDeliveryConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("UpdateDeliveryConfiguration");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UpdateDeliveryConfigurationCommand");
var se_UpdateLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = sharedHeaders("UpdateLogAnomalyDetector");
let body;
body = JSON.stringify((0, import_smithy_client._json)(input));
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_UpdateLogAnomalyDetectorCommand");
var de_AssociateKmsKeyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_AssociateKmsKeyCommand");
var de_CancelExportTaskCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_CancelExportTaskCommand");
var de_CreateDeliveryCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_CreateDeliveryCommand");
var de_CreateExportTaskCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_CreateExportTaskCommand");
var de_CreateLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_CreateLogAnomalyDetectorCommand");
var de_CreateLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_CreateLogGroupCommand");
var de_CreateLogStreamCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_CreateLogStreamCommand");
var de_DeleteAccountPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteAccountPolicyCommand");
var de_DeleteDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteDataProtectionPolicyCommand");
var de_DeleteDeliveryCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteDeliveryCommand");
var de_DeleteDeliveryDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteDeliveryDestinationCommand");
var de_DeleteDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteDeliveryDestinationPolicyCommand");
var de_DeleteDeliverySourceCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteDeliverySourceCommand");
var de_DeleteDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteDestinationCommand");
var de_DeleteIndexPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DeleteIndexPolicyCommand");
var de_DeleteIntegrationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DeleteIntegrationCommand");
var de_DeleteLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteLogAnomalyDetectorCommand");
var de_DeleteLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteLogGroupCommand");
var de_DeleteLogStreamCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteLogStreamCommand");
var de_DeleteMetricFilterCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteMetricFilterCommand");
var de_DeleteQueryDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DeleteQueryDefinitionCommand");
var de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteResourcePolicyCommand");
var de_DeleteRetentionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteRetentionPolicyCommand");
var de_DeleteSubscriptionFilterCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteSubscriptionFilterCommand");
var de_DeleteTransformerCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DeleteTransformerCommand");
var de_DescribeAccountPoliciesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeAccountPoliciesCommand");
var de_DescribeConfigurationTemplatesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeConfigurationTemplatesCommand");
var de_DescribeDeliveriesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeDeliveriesCommand");
var de_DescribeDeliveryDestinationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeDeliveryDestinationsCommand");
var de_DescribeDeliverySourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeDeliverySourcesCommand");
var de_DescribeDestinationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeDestinationsCommand");
var de_DescribeExportTasksCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeExportTasksCommand");
var de_DescribeFieldIndexesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeFieldIndexesCommand");
var de_DescribeIndexPoliciesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeIndexPoliciesCommand");
var de_DescribeLogGroupsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeLogGroupsCommand");
var de_DescribeLogStreamsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeLogStreamsCommand");
var de_DescribeMetricFiltersCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = de_DescribeMetricFiltersResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeMetricFiltersCommand");
var de_DescribeQueriesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeQueriesCommand");
var de_DescribeQueryDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeQueryDefinitionsCommand");
var de_DescribeResourcePoliciesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeResourcePoliciesCommand");
var de_DescribeSubscriptionFiltersCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_DescribeSubscriptionFiltersCommand");
var de_DisassociateKmsKeyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_DisassociateKmsKeyCommand");
var de_FilterLogEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_FilterLogEventsCommand");
var de_GetDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetDataProtectionPolicyCommand");
var de_GetDeliveryCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetDeliveryCommand");
var de_GetDeliveryDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetDeliveryDestinationCommand");
var de_GetDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetDeliveryDestinationPolicyCommand");
var de_GetDeliverySourceCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetDeliverySourceCommand");
var de_GetIntegrationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetIntegrationCommand");
var de_GetLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetLogAnomalyDetectorCommand");
var de_GetLogEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetLogEventsCommand");
var de_GetLogGroupFieldsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetLogGroupFieldsCommand");
var de_GetLogRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetLogRecordCommand");
var de_GetQueryResultsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = de_GetQueryResultsResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetQueryResultsCommand");
var de_GetTransformerCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_GetTransformerCommand");
var de_ListAnomaliesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListAnomaliesCommand");
var de_ListIntegrationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListIntegrationsCommand");
var de_ListLogAnomalyDetectorsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListLogAnomalyDetectorsCommand");
var de_ListLogGroupsForQueryCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListLogGroupsForQueryCommand");
var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListTagsForResourceCommand");
var de_ListTagsLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_ListTagsLogGroupCommand");
var de_PutAccountPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutAccountPolicyCommand");
var de_PutDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutDataProtectionPolicyCommand");
var de_PutDeliveryDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutDeliveryDestinationCommand");
var de_PutDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutDeliveryDestinationPolicyCommand");
var de_PutDeliverySourceCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutDeliverySourceCommand");
var de_PutDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutDestinationCommand");
var de_PutDestinationPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_PutDestinationPolicyCommand");
var de_PutIndexPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutIndexPolicyCommand");
var de_PutIntegrationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutIntegrationCommand");
var de_PutLogEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutLogEventsCommand");
var de_PutMetricFilterCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_PutMetricFilterCommand");
var de_PutQueryDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutQueryDefinitionCommand");
var de_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_PutResourcePolicyCommand");
var de_PutRetentionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_PutRetentionPolicyCommand");
var de_PutSubscriptionFilterCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_PutSubscriptionFilterCommand");
var de_PutTransformerCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_PutTransformerCommand");
var de_StartLiveTailCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = { responseStream: de_StartLiveTailResponseStream(output.body, context) };
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_StartLiveTailCommand");
var de_StartQueryCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_StartQueryCommand");
var de_StopQueryCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_StopQueryCommand");
var de_TagLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_TagLogGroupCommand");
var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_TagResourceCommand");
var de_TestMetricFilterCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_TestMetricFilterCommand");
var de_TestTransformerCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_TestTransformerCommand");
var de_UntagLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_UntagLogGroupCommand");
var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_UntagResourceCommand");
var de_UpdateAnomalyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_UpdateAnomalyCommand");
var de_UpdateDeliveryConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core2.parseJsonBody)(output.body, context);
let contents = {};
contents = (0, import_smithy_client._json)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_UpdateDeliveryConfigurationCommand");
var de_UpdateLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await (0, import_smithy_client.collectBody)(output.body, context);
const response = {
$metadata: deserializeMetadata(output)
};
return response;
}, "de_UpdateLogAnomalyDetectorCommand");
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
};
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
case "OperationAbortedException":
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
case "ResourceNotFoundException":
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
case "ServiceUnavailableException":
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
case "InvalidOperationException":
case "com.amazonaws.cloudwatchlogs#InvalidOperationException":
throw await de_InvalidOperationExceptionRes(parsedOutput, context);
case "AccessDeniedException":
case "com.amazonaws.cloudwatchlogs#AccessDeniedException":
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
case "ConflictException":
case "com.amazonaws.cloudwatchlogs#ConflictException":
throw await de_ConflictExceptionRes(parsedOutput, context);
case "ServiceQuotaExceededException":
case "com.amazonaws.cloudwatchlogs#ServiceQuotaExceededException":
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.cloudwatchlogs#ThrottlingException":
throw await de_ThrottlingExceptionRes(parsedOutput, context);
case "ValidationException":
case "com.amazonaws.cloudwatchlogs#ValidationException":
throw await de_ValidationExceptionRes(parsedOutput, context);
case "LimitExceededException":
case "com.amazonaws.cloudwatchlogs#LimitExceededException":
throw await de_LimitExceededExceptionRes(parsedOutput, context);
case "ResourceAlreadyExistsException":
case "com.amazonaws.cloudwatchlogs#ResourceAlreadyExistsException":
throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
case "DataAlreadyAcceptedException":
case "com.amazonaws.cloudwatchlogs#DataAlreadyAcceptedException":
throw await de_DataAlreadyAcceptedExceptionRes(parsedOutput, context);
case "InvalidSequenceTokenException":
case "com.amazonaws.cloudwatchlogs#InvalidSequenceTokenException":
throw await de_InvalidSequenceTokenExceptionRes(parsedOutput, context);
case "UnrecognizedClientException":
case "com.amazonaws.cloudwatchlogs#UnrecognizedClientException":
throw await de_UnrecognizedClientExceptionRes(parsedOutput, context);
case "MalformedQueryException":
case "com.amazonaws.cloudwatchlogs#MalformedQueryException":
throw await de_MalformedQueryExceptionRes(parsedOutput, context);
case "TooManyTagsException":
case "com.amazonaws.cloudwatchlogs#TooManyTagsException":
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode
});
}
}, "de_CommandError");
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new AccessDeniedException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_AccessDeniedExceptionRes");
var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new ConflictException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ConflictExceptionRes");
var de_DataAlreadyAcceptedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new DataAlreadyAcceptedException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_DataAlreadyAcceptedExceptionRes");
var de_InvalidOperationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new InvalidOperationException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_InvalidOperationExceptionRes");
var de_InvalidParameterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new InvalidParameterException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_InvalidParameterExceptionRes");
var de_InvalidSequenceTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new InvalidSequenceTokenException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_InvalidSequenceTokenExceptionRes");
var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new LimitExceededException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_LimitExceededExceptionRes");
var de_MalformedQueryExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new MalformedQueryException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_MalformedQueryExceptionRes");
var de_OperationAbortedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new OperationAbortedException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_OperationAbortedExceptionRes");
var de_ResourceAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new ResourceAlreadyExistsException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ResourceAlreadyExistsExceptionRes");
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new ResourceNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ResourceNotFoundExceptionRes");
var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new ServiceQuotaExceededException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ServiceQuotaExceededExceptionRes");
var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new ServiceUnavailableException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ServiceUnavailableExceptionRes");
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new ThrottlingException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ThrottlingExceptionRes");
var de_TooManyTagsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new TooManyTagsException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_TooManyTagsExceptionRes");
var de_UnrecognizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new UnrecognizedClientException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_UnrecognizedClientExceptionRes");
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new ValidationException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_ValidationExceptionRes");
var de_StartLiveTailResponseStream = /* @__PURE__ */ __name((output, context) => {
return context.eventStreamMarshaller.deserialize(output, async (event) => {
if (event["sessionStart"] != null) {
return {
sessionStart: await de_LiveTailSessionStart_event(event["sessionStart"], context)
};
}
if (event["sessionUpdate"] != null) {
return {
sessionUpdate: await de_LiveTailSessionUpdate_event(event["sessionUpdate"], context)
};
}
if (event["SessionTimeoutException"] != null) {
return {
SessionTimeoutException: await de_SessionTimeoutException_event(event["SessionTimeoutException"], context)
};
}
if (event["SessionStreamingException"] != null) {
return {
SessionStreamingException: await de_SessionStreamingException_event(
event["SessionStreamingException"],
context
)
};
}
return { $unknown: output };
});
}, "de_StartLiveTailResponseStream");
var de_LiveTailSessionStart_event = /* @__PURE__ */ __name(async (output, context) => {
const contents = {};
const data = await (0, import_core2.parseJsonBody)(output.body, context);
Object.assign(contents, (0, import_smithy_client._json)(data));
return contents;
}, "de_LiveTailSessionStart_event");
var de_LiveTailSessionUpdate_event = /* @__PURE__ */ __name(async (output, context) => {
const contents = {};
const data = await (0, import_core2.parseJsonBody)(output.body, context);
Object.assign(contents, (0, import_smithy_client._json)(data));
return contents;
}, "de_LiveTailSessionUpdate_event");
var de_SessionStreamingException_event = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await (0, import_core2.parseJsonBody)(output.body, context)
};
return de_SessionStreamingExceptionRes(parsedOutput, context);
}, "de_SessionStreamingException_event");
var de_SessionTimeoutException_event = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await (0, import_core2.parseJsonBody)(output.body, context)
};
return de_SessionTimeoutExceptionRes(parsedOutput, context);
}, "de_SessionTimeoutException_event");
var de_SessionStreamingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new SessionStreamingException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_SessionStreamingExceptionRes");
var de_SessionTimeoutExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0, import_smithy_client._json)(body);
const exception = new SessionTimeoutException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client.decorateServiceException)(exception, body);
}, "de_SessionTimeoutExceptionRes");
var se_MetricTransformation = /* @__PURE__ */ __name((input, context) => {
return (0, import_smithy_client.take)(input, {
defaultValue: import_smithy_client.serializeFloat,
dimensions: import_smithy_client._json,
metricName: [],
metricNamespace: [],
metricValue: [],
unit: []
});
}, "se_MetricTransformation");
var se_MetricTransformations = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
return se_MetricTransformation(entry, context);
});
}, "se_MetricTransformations");
var se_PutMetricFilterRequest = /* @__PURE__ */ __name((input, context) => {
return (0, import_smithy_client.take)(input, {
applyOnTransformedLogs: [],
filterName: [],
filterPattern: [],
logGroupName: [],
metricTransformations: /* @__PURE__ */ __name((_) => se_MetricTransformations(_, context), "metricTransformations")
});
}, "se_PutMetricFilterRequest");
var se_PutQueryDefinitionRequest = /* @__PURE__ */ __name((input, context) => {
return (0, import_smithy_client.take)(input, {
clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
logGroupNames: import_smithy_client._json,
name: [],
queryDefinitionId: [],
queryLanguage: [],
queryString: []
});
}, "se_PutQueryDefinitionRequest");
var de_DescribeMetricFiltersResponse = /* @__PURE__ */ __name((output, context) => {
return (0, import_smithy_client.take)(output, {
metricFilters: /* @__PURE__ */ __name((_) => de_MetricFilters(_, context), "metricFilters"),
nextToken: import_smithy_client.expectString
});
}, "de_DescribeMetricFiltersResponse");
var de_GetQueryResultsResponse = /* @__PURE__ */ __name((output, context) => {
return (0, import_smithy_client.take)(output, {
encryptionKey: import_smithy_client.expectString,
queryLanguage: import_smithy_client.expectString,
results: import_smithy_client._json,
statistics: /* @__PURE__ */ __name((_) => de_QueryStatistics(_, context), "statistics"),
status: import_smithy_client.expectString
});
}, "de_GetQueryResultsResponse");
var de_MetricFilter = /* @__PURE__ */ __name((output, context) => {
return (0, import_smithy_client.take)(output, {
applyOnTransformedLogs: import_smithy_client.expectBoolean,
creationTime: import_smithy_client.expectLong,
filterName: import_smithy_client.expectString,
filterPattern: import_smithy_client.expectString,
logGroupName: import_smithy_client.expectString,
metricTransformations: /* @__PURE__ */ __name((_) => de_MetricTransformations(_, context), "metricTransformations")
});
}, "de_MetricFilter");
var de_MetricFilters = /* @__PURE__ */ __name((output, context) => {
const retVal = (output || []).filter((e) => e != null).map((entry) => {
return de_MetricFilter(entry, context);
});
return retVal;
}, "de_MetricFilters");
var de_MetricTransformation = /* @__PURE__ */ __name((output, context) => {
return (0, import_smithy_client.take)(output, {
defaultValue: import_smithy_client.limitedParseDouble,
dimensions: import_smithy_client._json,
metricName: import_smithy_client.expectString,
metricNamespace: import_smithy_client.expectString,
metricValue: import_smithy_client.expectString,
unit: import_smithy_client.expectString
});
}, "de_MetricTransformation");
var de_MetricTransformations = /* @__PURE__ */ __name((output, context) => {
const retVal = (output || []).filter((e) => e != null).map((entry) => {
return de_MetricTransformation(entry, context);
});
return retVal;
}, "de_MetricTransformations");
var de_QueryStatistics = /* @__PURE__ */ __name((output, context) => {
return (0, import_smithy_client.take)(output, {
bytesScanned: import_smithy_client.limitedParseDouble,
estimatedBytesSkipped: import_smithy_client.limitedParseDouble,
estimatedRecordsSkipped: import_smithy_client.limitedParseDouble,
logGroupsScanned: import_smithy_client.limitedParseDouble,
recordsMatched: import_smithy_client.limitedParseDouble,
recordsScanned: import_smithy_client.limitedParseDouble
});
}, "de_QueryStatistics");
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
var throwDefaultError = (0, import_smithy_client.withBaseException)(CloudWatchLogsServiceException);
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents = {
protocol,
hostname,
port,
method: "POST",
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers
};
if (resolvedHostname !== void 0) {
contents.hostname = resolvedHostname;
}
if (body !== void 0) {
contents.body = body;
}
return new import_protocol_http.HttpRequest(contents);
}, "buildHttpRpcRequest");
function sharedHeaders(operation) {
return {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": `Logs_20140328.${operation}`
};
}
__name(sharedHeaders, "sharedHeaders");
// src/commands/AssociateKmsKeyCommand.ts
var AssociateKmsKeyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "AssociateKmsKey", {}).n("CloudWatchLogsClient", "AssociateKmsKeyCommand").f(void 0, void 0).ser(se_AssociateKmsKeyCommand).de(de_AssociateKmsKeyCommand).build() {
static {
__name(this, "AssociateKmsKeyCommand");
}
};
// src/commands/CancelExportTaskCommand.ts
var CancelExportTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "CancelExportTask", {}).n("CloudWatchLogsClient", "CancelExportTaskCommand").f(void 0, void 0).ser(se_CancelExportTaskCommand).de(de_CancelExportTaskCommand).build() {
static {
__name(this, "CancelExportTaskCommand");
}
};
// src/commands/CreateDeliveryCommand.ts
var CreateDeliveryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "CreateDelivery", {}).n("CloudWatchLogsClient", "CreateDeliveryCommand").f(void 0, void 0).ser(se_CreateDeliveryCommand).de(de_CreateDeliveryCommand).build() {
static {
__name(this, "CreateDeliveryCommand");
}
};
// src/commands/CreateExportTaskCommand.ts
var CreateExportTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "CreateExportTask", {}).n("CloudWatchLogsClient", "CreateExportTaskCommand").f(void 0, void 0).ser(se_CreateExportTaskCommand).de(de_CreateExportTaskCommand).build() {
static {
__name(this, "CreateExportTaskCommand");
}
};
// src/commands/CreateLogAnomalyDetectorCommand.ts
var CreateLogAnomalyDetectorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "CreateLogAnomalyDetector", {}).n("CloudWatchLogsClient", "CreateLogAnomalyDetectorCommand").f(void 0, void 0).ser(se_CreateLogAnomalyDetectorCommand).de(de_CreateLogAnomalyDetectorCommand).build() {
static {
__name(this, "CreateLogAnomalyDetectorCommand");
}
};
// src/commands/CreateLogGroupCommand.ts
var CreateLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "CreateLogGroup", {}).n("CloudWatchLogsClient", "CreateLogGroupCommand").f(void 0, void 0).ser(se_CreateLogGroupCommand).de(de_CreateLogGroupCommand).build() {
static {
__name(this, "CreateLogGroupCommand");
}
};
// src/commands/CreateLogStreamCommand.ts
var CreateLogStreamCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "CreateLogStream", {}).n("CloudWatchLogsClient", "CreateLogStreamCommand").f(void 0, void 0).ser(se_CreateLogStreamCommand).de(de_CreateLogStreamCommand).build() {
static {
__name(this, "CreateLogStreamCommand");
}
};
// src/commands/DeleteAccountPolicyCommand.ts
var DeleteAccountPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteAccountPolicy", {}).n("CloudWatchLogsClient", "DeleteAccountPolicyCommand").f(void 0, void 0).ser(se_DeleteAccountPolicyCommand).de(de_DeleteAccountPolicyCommand).build() {
static {
__name(this, "DeleteAccountPolicyCommand");
}
};
// src/commands/DeleteDataProtectionPolicyCommand.ts
var DeleteDataProtectionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteDataProtectionPolicy", {}).n("CloudWatchLogsClient", "DeleteDataProtectionPolicyCommand").f(void 0, void 0).ser(se_DeleteDataProtectionPolicyCommand).de(de_DeleteDataProtectionPolicyCommand).build() {
static {
__name(this, "DeleteDataProtectionPolicyCommand");
}
};
// src/commands/DeleteDeliveryCommand.ts
var DeleteDeliveryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteDelivery", {}).n("CloudWatchLogsClient", "DeleteDeliveryCommand").f(void 0, void 0).ser(se_DeleteDeliveryCommand).de(de_DeleteDeliveryCommand).build() {
static {
__name(this, "DeleteDeliveryCommand");
}
};
// src/commands/DeleteDeliveryDestinationCommand.ts
var DeleteDeliveryDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteDeliveryDestination", {}).n("CloudWatchLogsClient", "DeleteDeliveryDestinationCommand").f(void 0, void 0).ser(se_DeleteDeliveryDestinationCommand).de(de_DeleteDeliveryDestinationCommand).build() {
static {
__name(this, "DeleteDeliveryDestinationCommand");
}
};
// src/commands/DeleteDeliveryDestinationPolicyCommand.ts
var DeleteDeliveryDestinationPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteDeliveryDestinationPolicy", {}).n("CloudWatchLogsClient", "DeleteDeliveryDestinationPolicyCommand").f(void 0, void 0).ser(se_DeleteDeliveryDestinationPolicyCommand).de(de_DeleteDeliveryDestinationPolicyCommand).build() {
static {
__name(this, "DeleteDeliveryDestinationPolicyCommand");
}
};
// src/commands/DeleteDeliverySourceCommand.ts
var DeleteDeliverySourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteDeliverySource", {}).n("CloudWatchLogsClient", "DeleteDeliverySourceCommand").f(void 0, void 0).ser(se_DeleteDeliverySourceCommand).de(de_DeleteDeliverySourceCommand).build() {
static {
__name(this, "DeleteDeliverySourceCommand");
}
};
// src/commands/DeleteDestinationCommand.ts
var DeleteDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteDestination", {}).n("CloudWatchLogsClient", "DeleteDestinationCommand").f(void 0, void 0).ser(se_DeleteDestinationCommand).de(de_DeleteDestinationCommand).build() {
static {
__name(this, "DeleteDestinationCommand");
}
};
// src/commands/DeleteIndexPolicyCommand.ts
var DeleteIndexPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteIndexPolicy", {}).n("CloudWatchLogsClient", "DeleteIndexPolicyCommand").f(void 0, void 0).ser(se_DeleteIndexPolicyCommand).de(de_DeleteIndexPolicyCommand).build() {
static {
__name(this, "DeleteIndexPolicyCommand");
}
};
// src/commands/DeleteIntegrationCommand.ts
var DeleteIntegrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteIntegration", {}).n("CloudWatchLogsClient", "DeleteIntegrationCommand").f(void 0, void 0).ser(se_DeleteIntegrationCommand).de(de_DeleteIntegrationCommand).build() {
static {
__name(this, "DeleteIntegrationCommand");
}
};
// src/commands/DeleteLogAnomalyDetectorCommand.ts
var DeleteLogAnomalyDetectorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteLogAnomalyDetector", {}).n("CloudWatchLogsClient", "DeleteLogAnomalyDetectorCommand").f(void 0, void 0).ser(se_DeleteLogAnomalyDetectorCommand).de(de_DeleteLogAnomalyDetectorCommand).build() {
static {
__name(this, "DeleteLogAnomalyDetectorCommand");
}
};
// src/commands/DeleteLogGroupCommand.ts
var DeleteLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteLogGroup", {}).n("CloudWatchLogsClient", "DeleteLogGroupCommand").f(void 0, void 0).ser(se_DeleteLogGroupCommand).de(de_DeleteLogGroupCommand).build() {
static {
__name(this, "DeleteLogGroupCommand");
}
};
// src/commands/DeleteLogStreamCommand.ts
var DeleteLogStreamCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteLogStream", {}).n("CloudWatchLogsClient", "DeleteLogStreamCommand").f(void 0, void 0).ser(se_DeleteLogStreamCommand).de(de_DeleteLogStreamCommand).build() {
static {
__name(this, "DeleteLogStreamCommand");
}
};
// src/commands/DeleteMetricFilterCommand.ts
var DeleteMetricFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteMetricFilter", {}).n("CloudWatchLogsClient", "DeleteMetricFilterCommand").f(void 0, void 0).ser(se_DeleteMetricFilterCommand).de(de_DeleteMetricFilterCommand).build() {
static {
__name(this, "DeleteMetricFilterCommand");
}
};
// src/commands/DeleteQueryDefinitionCommand.ts
var DeleteQueryDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteQueryDefinition", {}).n("CloudWatchLogsClient", "DeleteQueryDefinitionCommand").f(void 0, void 0).ser(se_DeleteQueryDefinitionCommand).de(de_DeleteQueryDefinitionCommand).build() {
static {
__name(this, "DeleteQueryDefinitionCommand");
}
};
// src/commands/DeleteResourcePolicyCommand.ts
var DeleteResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteResourcePolicy", {}).n("CloudWatchLogsClient", "DeleteResourcePolicyCommand").f(void 0, void 0).ser(se_DeleteResourcePolicyCommand).de(de_DeleteResourcePolicyCommand).build() {
static {
__name(this, "DeleteResourcePolicyCommand");
}
};
// src/commands/DeleteRetentionPolicyCommand.ts
var DeleteRetentionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteRetentionPolicy", {}).n("CloudWatchLogsClient", "DeleteRetentionPolicyCommand").f(void 0, void 0).ser(se_DeleteRetentionPolicyCommand).de(de_DeleteRetentionPolicyCommand).build() {
static {
__name(this, "DeleteRetentionPolicyCommand");
}
};
// src/commands/DeleteSubscriptionFilterCommand.ts
var DeleteSubscriptionFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteSubscriptionFilter", {}).n("CloudWatchLogsClient", "DeleteSubscriptionFilterCommand").f(void 0, void 0).ser(se_DeleteSubscriptionFilterCommand).de(de_DeleteSubscriptionFilterCommand).build() {
static {
__name(this, "DeleteSubscriptionFilterCommand");
}
};
// src/commands/DeleteTransformerCommand.ts
var DeleteTransformerCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DeleteTransformer", {}).n("CloudWatchLogsClient", "DeleteTransformerCommand").f(void 0, void 0).ser(se_DeleteTransformerCommand).de(de_DeleteTransformerCommand).build() {
static {
__name(this, "DeleteTransformerCommand");
}
};
// src/commands/DescribeAccountPoliciesCommand.ts
var DescribeAccountPoliciesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeAccountPolicies", {}).n("CloudWatchLogsClient", "DescribeAccountPoliciesCommand").f(void 0, void 0).ser(se_DescribeAccountPoliciesCommand).de(de_DescribeAccountPoliciesCommand).build() {
static {
__name(this, "DescribeAccountPoliciesCommand");
}
};
// src/commands/DescribeConfigurationTemplatesCommand.ts
var DescribeConfigurationTemplatesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeConfigurationTemplates", {}).n("CloudWatchLogsClient", "DescribeConfigurationTemplatesCommand").f(void 0, void 0).ser(se_DescribeConfigurationTemplatesCommand).de(de_DescribeConfigurationTemplatesCommand).build() {
static {
__name(this, "DescribeConfigurationTemplatesCommand");
}
};
// src/commands/DescribeDeliveriesCommand.ts
var DescribeDeliveriesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeDeliveries", {}).n("CloudWatchLogsClient", "DescribeDeliveriesCommand").f(void 0, void 0).ser(se_DescribeDeliveriesCommand).de(de_DescribeDeliveriesCommand).build() {
static {
__name(this, "DescribeDeliveriesCommand");
}
};
// src/commands/DescribeDeliveryDestinationsCommand.ts
var DescribeDeliveryDestinationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeDeliveryDestinations", {}).n("CloudWatchLogsClient", "DescribeDeliveryDestinationsCommand").f(void 0, void 0).ser(se_DescribeDeliveryDestinationsCommand).de(de_DescribeDeliveryDestinationsCommand).build() {
static {
__name(this, "DescribeDeliveryDestinationsCommand");
}
};
// src/commands/DescribeDeliverySourcesCommand.ts
var DescribeDeliverySourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeDeliverySources", {}).n("CloudWatchLogsClient", "DescribeDeliverySourcesCommand").f(void 0, void 0).ser(se_DescribeDeliverySourcesCommand).de(de_DescribeDeliverySourcesCommand).build() {
static {
__name(this, "DescribeDeliverySourcesCommand");
}
};
// src/commands/DescribeDestinationsCommand.ts
var DescribeDestinationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeDestinations", {}).n("CloudWatchLogsClient", "DescribeDestinationsCommand").f(void 0, void 0).ser(se_DescribeDestinationsCommand).de(de_DescribeDestinationsCommand).build() {
static {
__name(this, "DescribeDestinationsCommand");
}
};
// src/commands/DescribeExportTasksCommand.ts
var DescribeExportTasksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeExportTasks", {}).n("CloudWatchLogsClient", "DescribeExportTasksCommand").f(void 0, void 0).ser(se_DescribeExportTasksCommand).de(de_DescribeExportTasksCommand).build() {
static {
__name(this, "DescribeExportTasksCommand");
}
};
// src/commands/DescribeFieldIndexesCommand.ts
var DescribeFieldIndexesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeFieldIndexes", {}).n("CloudWatchLogsClient", "DescribeFieldIndexesCommand").f(void 0, void 0).ser(se_DescribeFieldIndexesCommand).de(de_DescribeFieldIndexesCommand).build() {
static {
__name(this, "DescribeFieldIndexesCommand");
}
};
// src/commands/DescribeIndexPoliciesCommand.ts
var DescribeIndexPoliciesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeIndexPolicies", {}).n("CloudWatchLogsClient", "DescribeIndexPoliciesCommand").f(void 0, void 0).ser(se_DescribeIndexPoliciesCommand).de(de_DescribeIndexPoliciesCommand).build() {
static {
__name(this, "DescribeIndexPoliciesCommand");
}
};
// src/commands/DescribeLogGroupsCommand.ts
var DescribeLogGroupsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeLogGroups", {}).n("CloudWatchLogsClient", "DescribeLogGroupsCommand").f(void 0, void 0).ser(se_DescribeLogGroupsCommand).de(de_DescribeLogGroupsCommand).build() {
static {
__name(this, "DescribeLogGroupsCommand");
}
};
// src/commands/DescribeLogStreamsCommand.ts
var DescribeLogStreamsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeLogStreams", {}).n("CloudWatchLogsClient", "DescribeLogStreamsCommand").f(void 0, void 0).ser(se_DescribeLogStreamsCommand).de(de_DescribeLogStreamsCommand).build() {
static {
__name(this, "DescribeLogStreamsCommand");
}
};
// src/commands/DescribeMetricFiltersCommand.ts
var DescribeMetricFiltersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeMetricFilters", {}).n("CloudWatchLogsClient", "DescribeMetricFiltersCommand").f(void 0, void 0).ser(se_DescribeMetricFiltersCommand).de(de_DescribeMetricFiltersCommand).build() {
static {
__name(this, "DescribeMetricFiltersCommand");
}
};
// src/commands/DescribeQueriesCommand.ts
var DescribeQueriesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeQueries", {}).n("CloudWatchLogsClient", "DescribeQueriesCommand").f(void 0, void 0).ser(se_DescribeQueriesCommand).de(de_DescribeQueriesCommand).build() {
static {
__name(this, "DescribeQueriesCommand");
}
};
// src/commands/DescribeQueryDefinitionsCommand.ts
var DescribeQueryDefinitionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeQueryDefinitions", {}).n("CloudWatchLogsClient", "DescribeQueryDefinitionsCommand").f(void 0, void 0).ser(se_DescribeQueryDefinitionsCommand).de(de_DescribeQueryDefinitionsCommand).build() {
static {
__name(this, "DescribeQueryDefinitionsCommand");
}
};
// src/commands/DescribeResourcePoliciesCommand.ts
var DescribeResourcePoliciesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeResourcePolicies", {}).n("CloudWatchLogsClient", "DescribeResourcePoliciesCommand").f(void 0, void 0).ser(se_DescribeResourcePoliciesCommand).de(de_DescribeResourcePoliciesCommand).build() {
static {
__name(this, "DescribeResourcePoliciesCommand");
}
};
// src/commands/DescribeSubscriptionFiltersCommand.ts
var DescribeSubscriptionFiltersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DescribeSubscriptionFilters", {}).n("CloudWatchLogsClient", "DescribeSubscriptionFiltersCommand").f(void 0, void 0).ser(se_DescribeSubscriptionFiltersCommand).de(de_DescribeSubscriptionFiltersCommand).build() {
static {
__name(this, "DescribeSubscriptionFiltersCommand");
}
};
// src/commands/DisassociateKmsKeyCommand.ts
var DisassociateKmsKeyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "DisassociateKmsKey", {}).n("CloudWatchLogsClient", "DisassociateKmsKeyCommand").f(void 0, void 0).ser(se_DisassociateKmsKeyCommand).de(de_DisassociateKmsKeyCommand).build() {
static {
__name(this, "DisassociateKmsKeyCommand");
}
};
// src/commands/FilterLogEventsCommand.ts
var FilterLogEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "FilterLogEvents", {}).n("CloudWatchLogsClient", "FilterLogEventsCommand").f(void 0, void 0).ser(se_FilterLogEventsCommand).de(de_FilterLogEventsCommand).build() {
static {
__name(this, "FilterLogEventsCommand");
}
};
// src/commands/GetDataProtectionPolicyCommand.ts
var GetDataProtectionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetDataProtectionPolicy", {}).n("CloudWatchLogsClient", "GetDataProtectionPolicyCommand").f(void 0, void 0).ser(se_GetDataProtectionPolicyCommand).de(de_GetDataProtectionPolicyCommand).build() {
static {
__name(this, "GetDataProtectionPolicyCommand");
}
};
// src/commands/GetDeliveryCommand.ts
var GetDeliveryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetDelivery", {}).n("CloudWatchLogsClient", "GetDeliveryCommand").f(void 0, void 0).ser(se_GetDeliveryCommand).de(de_GetDeliveryCommand).build() {
static {
__name(this, "GetDeliveryCommand");
}
};
// src/commands/GetDeliveryDestinationCommand.ts
var GetDeliveryDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetDeliveryDestination", {}).n("CloudWatchLogsClient", "GetDeliveryDestinationCommand").f(void 0, void 0).ser(se_GetDeliveryDestinationCommand).de(de_GetDeliveryDestinationCommand).build() {
static {
__name(this, "GetDeliveryDestinationCommand");
}
};
// src/commands/GetDeliveryDestinationPolicyCommand.ts
var GetDeliveryDestinationPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetDeliveryDestinationPolicy", {}).n("CloudWatchLogsClient", "GetDeliveryDestinationPolicyCommand").f(void 0, void 0).ser(se_GetDeliveryDestinationPolicyCommand).de(de_GetDeliveryDestinationPolicyCommand).build() {
static {
__name(this, "GetDeliveryDestinationPolicyCommand");
}
};
// src/commands/GetDeliverySourceCommand.ts
var GetDeliverySourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetDeliverySource", {}).n("CloudWatchLogsClient", "GetDeliverySourceCommand").f(void 0, void 0).ser(se_GetDeliverySourceCommand).de(de_GetDeliverySourceCommand).build() {
static {
__name(this, "GetDeliverySourceCommand");
}
};
// src/commands/GetIntegrationCommand.ts
var GetIntegrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetIntegration", {}).n("CloudWatchLogsClient", "GetIntegrationCommand").f(void 0, void 0).ser(se_GetIntegrationCommand).de(de_GetIntegrationCommand).build() {
static {
__name(this, "GetIntegrationCommand");
}
};
// src/commands/GetLogAnomalyDetectorCommand.ts
var GetLogAnomalyDetectorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetLogAnomalyDetector", {}).n("CloudWatchLogsClient", "GetLogAnomalyDetectorCommand").f(void 0, void 0).ser(se_GetLogAnomalyDetectorCommand).de(de_GetLogAnomalyDetectorCommand).build() {
static {
__name(this, "GetLogAnomalyDetectorCommand");
}
};
// src/commands/GetLogEventsCommand.ts
var GetLogEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetLogEvents", {}).n("CloudWatchLogsClient", "GetLogEventsCommand").f(void 0, void 0).ser(se_GetLogEventsCommand).de(de_GetLogEventsCommand).build() {
static {
__name(this, "GetLogEventsCommand");
}
};
// src/commands/GetLogGroupFieldsCommand.ts
var GetLogGroupFieldsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetLogGroupFields", {}).n("CloudWatchLogsClient", "GetLogGroupFieldsCommand").f(void 0, void 0).ser(se_GetLogGroupFieldsCommand).de(de_GetLogGroupFieldsCommand).build() {
static {
__name(this, "GetLogGroupFieldsCommand");
}
};
// src/commands/GetLogRecordCommand.ts
var GetLogRecordCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetLogRecord", {}).n("CloudWatchLogsClient", "GetLogRecordCommand").f(void 0, void 0).ser(se_GetLogRecordCommand).de(de_GetLogRecordCommand).build() {
static {
__name(this, "GetLogRecordCommand");
}
};
// src/commands/GetQueryResultsCommand.ts
var GetQueryResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetQueryResults", {}).n("CloudWatchLogsClient", "GetQueryResultsCommand").f(void 0, void 0).ser(se_GetQueryResultsCommand).de(de_GetQueryResultsCommand).build() {
static {
__name(this, "GetQueryResultsCommand");
}
};
// src/commands/GetTransformerCommand.ts
var GetTransformerCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "GetTransformer", {}).n("CloudWatchLogsClient", "GetTransformerCommand").f(void 0, void 0).ser(se_GetTransformerCommand).de(de_GetTransformerCommand).build() {
static {
__name(this, "GetTransformerCommand");
}
};
// src/commands/ListAnomaliesCommand.ts
var ListAnomaliesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "ListAnomalies", {}).n("CloudWatchLogsClient", "ListAnomaliesCommand").f(void 0, void 0).ser(se_ListAnomaliesCommand).de(de_ListAnomaliesCommand).build() {
static {
__name(this, "ListAnomaliesCommand");
}
};
// src/commands/ListIntegrationsCommand.ts
var ListIntegrationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "ListIntegrations", {}).n("CloudWatchLogsClient", "ListIntegrationsCommand").f(void 0, void 0).ser(se_ListIntegrationsCommand).de(de_ListIntegrationsCommand).build() {
static {
__name(this, "ListIntegrationsCommand");
}
};
// src/commands/ListLogAnomalyDetectorsCommand.ts
var ListLogAnomalyDetectorsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "ListLogAnomalyDetectors", {}).n("CloudWatchLogsClient", "ListLogAnomalyDetectorsCommand").f(void 0, void 0).ser(se_ListLogAnomalyDetectorsCommand).de(de_ListLogAnomalyDetectorsCommand).build() {
static {
__name(this, "ListLogAnomalyDetectorsCommand");
}
};
// src/commands/ListLogGroupsForQueryCommand.ts
var ListLogGroupsForQueryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "ListLogGroupsForQuery", {}).n("CloudWatchLogsClient", "ListLogGroupsForQueryCommand").f(void 0, void 0).ser(se_ListLogGroupsForQueryCommand).de(de_ListLogGroupsForQueryCommand).build() {
static {
__name(this, "ListLogGroupsForQueryCommand");
}
};
// src/commands/ListTagsForResourceCommand.ts
var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "ListTagsForResource", {}).n("CloudWatchLogsClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
static {
__name(this, "ListTagsForResourceCommand");
}
};
// src/commands/ListTagsLogGroupCommand.ts
var ListTagsLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "ListTagsLogGroup", {}).n("CloudWatchLogsClient", "ListTagsLogGroupCommand").f(void 0, void 0).ser(se_ListTagsLogGroupCommand).de(de_ListTagsLogGroupCommand).build() {
static {
__name(this, "ListTagsLogGroupCommand");
}
};
// src/commands/PutAccountPolicyCommand.ts
var PutAccountPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutAccountPolicy", {}).n("CloudWatchLogsClient", "PutAccountPolicyCommand").f(void 0, void 0).ser(se_PutAccountPolicyCommand).de(de_PutAccountPolicyCommand).build() {
static {
__name(this, "PutAccountPolicyCommand");
}
};
// src/commands/PutDataProtectionPolicyCommand.ts
var PutDataProtectionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutDataProtectionPolicy", {}).n("CloudWatchLogsClient", "PutDataProtectionPolicyCommand").f(void 0, void 0).ser(se_PutDataProtectionPolicyCommand).de(de_PutDataProtectionPolicyCommand).build() {
static {
__name(this, "PutDataProtectionPolicyCommand");
}
};
// src/commands/PutDeliveryDestinationCommand.ts
var PutDeliveryDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutDeliveryDestination", {}).n("CloudWatchLogsClient", "PutDeliveryDestinationCommand").f(void 0, void 0).ser(se_PutDeliveryDestinationCommand).de(de_PutDeliveryDestinationCommand).build() {
static {
__name(this, "PutDeliveryDestinationCommand");
}
};
// src/commands/PutDeliveryDestinationPolicyCommand.ts
var PutDeliveryDestinationPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutDeliveryDestinationPolicy", {}).n("CloudWatchLogsClient", "PutDeliveryDestinationPolicyCommand").f(void 0, void 0).ser(se_PutDeliveryDestinationPolicyCommand).de(de_PutDeliveryDestinationPolicyCommand).build() {
static {
__name(this, "PutDeliveryDestinationPolicyCommand");
}
};
// src/commands/PutDeliverySourceCommand.ts
var PutDeliverySourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutDeliverySource", {}).n("CloudWatchLogsClient", "PutDeliverySourceCommand").f(void 0, void 0).ser(se_PutDeliverySourceCommand).de(de_PutDeliverySourceCommand).build() {
static {
__name(this, "PutDeliverySourceCommand");
}
};
// src/commands/PutDestinationCommand.ts
var PutDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutDestination", {}).n("CloudWatchLogsClient", "PutDestinationCommand").f(void 0, void 0).ser(se_PutDestinationCommand).de(de_PutDestinationCommand).build() {
static {
__name(this, "PutDestinationCommand");
}
};
// src/commands/PutDestinationPolicyCommand.ts
var PutDestinationPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutDestinationPolicy", {}).n("CloudWatchLogsClient", "PutDestinationPolicyCommand").f(void 0, void 0).ser(se_PutDestinationPolicyCommand).de(de_PutDestinationPolicyCommand).build() {
static {
__name(this, "PutDestinationPolicyCommand");
}
};
// src/commands/PutIndexPolicyCommand.ts
var PutIndexPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutIndexPolicy", {}).n("CloudWatchLogsClient", "PutIndexPolicyCommand").f(void 0, void 0).ser(se_PutIndexPolicyCommand).de(de_PutIndexPolicyCommand).build() {
static {
__name(this, "PutIndexPolicyCommand");
}
};
// src/commands/PutIntegrationCommand.ts
var PutIntegrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutIntegration", {}).n("CloudWatchLogsClient", "PutIntegrationCommand").f(void 0, void 0).ser(se_PutIntegrationCommand).de(de_PutIntegrationCommand).build() {
static {
__name(this, "PutIntegrationCommand");
}
};
// src/commands/PutLogEventsCommand.ts
var PutLogEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutLogEvents", {}).n("CloudWatchLogsClient", "PutLogEventsCommand").f(void 0, void 0).ser(se_PutLogEventsCommand).de(de_PutLogEventsCommand).build() {
static {
__name(this, "PutLogEventsCommand");
}
};
// src/commands/PutMetricFilterCommand.ts
var PutMetricFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutMetricFilter", {}).n("CloudWatchLogsClient", "PutMetricFilterCommand").f(void 0, void 0).ser(se_PutMetricFilterCommand).de(de_PutMetricFilterCommand).build() {
static {
__name(this, "PutMetricFilterCommand");
}
};
// src/commands/PutQueryDefinitionCommand.ts
var PutQueryDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutQueryDefinition", {}).n("CloudWatchLogsClient", "PutQueryDefinitionCommand").f(void 0, void 0).ser(se_PutQueryDefinitionCommand).de(de_PutQueryDefinitionCommand).build() {
static {
__name(this, "PutQueryDefinitionCommand");
}
};
// src/commands/PutResourcePolicyCommand.ts
var PutResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutResourcePolicy", {}).n("CloudWatchLogsClient", "PutResourcePolicyCommand").f(void 0, void 0).ser(se_PutResourcePolicyCommand).de(de_PutResourcePolicyCommand).build() {
static {
__name(this, "PutResourcePolicyCommand");
}
};
// src/commands/PutRetentionPolicyCommand.ts
var PutRetentionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutRetentionPolicy", {}).n("CloudWatchLogsClient", "PutRetentionPolicyCommand").f(void 0, void 0).ser(se_PutRetentionPolicyCommand).de(de_PutRetentionPolicyCommand).build() {
static {
__name(this, "PutRetentionPolicyCommand");
}
};
// src/commands/PutSubscriptionFilterCommand.ts
var PutSubscriptionFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutSubscriptionFilter", {}).n("CloudWatchLogsClient", "PutSubscriptionFilterCommand").f(void 0, void 0).ser(se_PutSubscriptionFilterCommand).de(de_PutSubscriptionFilterCommand).build() {
static {
__name(this, "PutSubscriptionFilterCommand");
}
};
// src/commands/PutTransformerCommand.ts
var PutTransformerCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "PutTransformer", {}).n("CloudWatchLogsClient", "PutTransformerCommand").f(void 0, void 0).ser(se_PutTransformerCommand).de(de_PutTransformerCommand).build() {
static {
__name(this, "PutTransformerCommand");
}
};
// src/commands/StartLiveTailCommand.ts
var StartLiveTailCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "StartLiveTail", {
/**
* @internal
*/
eventStream: {
output: true
}
}).n("CloudWatchLogsClient", "StartLiveTailCommand").f(void 0, StartLiveTailResponseFilterSensitiveLog).ser(se_StartLiveTailCommand).de(de_StartLiveTailCommand).build() {
static {
__name(this, "StartLiveTailCommand");
}
};
// src/commands/StartQueryCommand.ts
var StartQueryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "StartQuery", {}).n("CloudWatchLogsClient", "StartQueryCommand").f(void 0, void 0).ser(se_StartQueryCommand).de(de_StartQueryCommand).build() {
static {
__name(this, "StartQueryCommand");
}
};
// src/commands/StopQueryCommand.ts
var StopQueryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "StopQuery", {}).n("CloudWatchLogsClient", "StopQueryCommand").f(void 0, void 0).ser(se_StopQueryCommand).de(de_StopQueryCommand).build() {
static {
__name(this, "StopQueryCommand");
}
};
// src/commands/TagLogGroupCommand.ts
var TagLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "TagLogGroup", {}).n("CloudWatchLogsClient", "TagLogGroupCommand").f(void 0, void 0).ser(se_TagLogGroupCommand).de(de_TagLogGroupCommand).build() {
static {
__name(this, "TagLogGroupCommand");
}
};
// src/commands/TagResourceCommand.ts
var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "TagResource", {}).n("CloudWatchLogsClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
static {
__name(this, "TagResourceCommand");
}
};
// src/commands/TestMetricFilterCommand.ts
var TestMetricFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "TestMetricFilter", {}).n("CloudWatchLogsClient", "TestMetricFilterCommand").f(void 0, void 0).ser(se_TestMetricFilterCommand).de(de_TestMetricFilterCommand).build() {
static {
__name(this, "TestMetricFilterCommand");
}
};
// src/commands/TestTransformerCommand.ts
var TestTransformerCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "TestTransformer", {}).n("CloudWatchLogsClient", "TestTransformerCommand").f(void 0, void 0).ser(se_TestTransformerCommand).de(de_TestTransformerCommand).build() {
static {
__name(this, "TestTransformerCommand");
}
};
// src/commands/UntagLogGroupCommand.ts
var UntagLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "UntagLogGroup", {}).n("CloudWatchLogsClient", "UntagLogGroupCommand").f(void 0, void 0).ser(se_UntagLogGroupCommand).de(de_UntagLogGroupCommand).build() {
static {
__name(this, "UntagLogGroupCommand");
}
};
// src/commands/UntagResourceCommand.ts
var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "UntagResource", {}).n("CloudWatchLogsClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
static {
__name(this, "UntagResourceCommand");
}
};
// src/commands/UpdateAnomalyCommand.ts
var UpdateAnomalyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "UpdateAnomaly", {}).n("CloudWatchLogsClient", "UpdateAnomalyCommand").f(void 0, void 0).ser(se_UpdateAnomalyCommand).de(de_UpdateAnomalyCommand).build() {
static {
__name(this, "UpdateAnomalyCommand");
}
};
// src/commands/UpdateDeliveryConfigurationCommand.ts
var UpdateDeliveryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "UpdateDeliveryConfiguration", {}).n("CloudWatchLogsClient", "UpdateDeliveryConfigurationCommand").f(void 0, void 0).ser(se_UpdateDeliveryConfigurationCommand).de(de_UpdateDeliveryConfigurationCommand).build() {
static {
__name(this, "UpdateDeliveryConfigurationCommand");
}
};
// src/commands/UpdateLogAnomalyDetectorCommand.ts
var UpdateLogAnomalyDetectorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("Logs_20140328", "UpdateLogAnomalyDetector", {}).n("CloudWatchLogsClient", "UpdateLogAnomalyDetectorCommand").f(void 0, void 0).ser(se_UpdateLogAnomalyDetectorCommand).de(de_UpdateLogAnomalyDetectorCommand).build() {
static {
__name(this, "UpdateLogAnomalyDetectorCommand");
}
};
// src/CloudWatchLogs.ts
var commands = {
AssociateKmsKeyCommand,
CancelExportTaskCommand,
CreateDeliveryCommand,
CreateExportTaskCommand,
CreateLogAnomalyDetectorCommand,
CreateLogGroupCommand,
CreateLogStreamCommand,
DeleteAccountPolicyCommand,
DeleteDataProtectionPolicyCommand,
DeleteDeliveryCommand,
DeleteDeliveryDestinationCommand,
DeleteDeliveryDestinationPolicyCommand,
DeleteDeliverySourceCommand,
DeleteDestinationCommand,
DeleteIndexPolicyCommand,
DeleteIntegrationCommand,
DeleteLogAnomalyDetectorCommand,
DeleteLogGroupCommand,
DeleteLogStreamCommand,
DeleteMetricFilterCommand,
DeleteQueryDefinitionCommand,
DeleteResourcePolicyCommand,
DeleteRetentionPolicyCommand,
DeleteSubscriptionFilterCommand,
DeleteTransformerCommand,
DescribeAccountPoliciesCommand,
DescribeConfigurationTemplatesCommand,
DescribeDeliveriesCommand,
DescribeDeliveryDestinationsCommand,
DescribeDeliverySourcesCommand,
DescribeDestinationsCommand,
DescribeExportTasksCommand,
DescribeFieldIndexesCommand,
DescribeIndexPoliciesCommand,
DescribeLogGroupsCommand,
DescribeLogStreamsCommand,
DescribeMetricFiltersCommand,
DescribeQueriesCommand,
DescribeQueryDefinitionsCommand,
DescribeResourcePoliciesCommand,
DescribeSubscriptionFiltersCommand,
DisassociateKmsKeyCommand,
FilterLogEventsCommand,
GetDataProtectionPolicyCommand,
GetDeliveryCommand,
GetDeliveryDestinationCommand,
GetDeliveryDestinationPolicyCommand,
GetDeliverySourceCommand,
GetIntegrationCommand,
GetLogAnomalyDetectorCommand,
GetLogEventsCommand,
GetLogGroupFieldsCommand,
GetLogRecordCommand,
GetQueryResultsCommand,
GetTransformerCommand,
ListAnomaliesCommand,
ListIntegrationsCommand,
ListLogAnomalyDetectorsCommand,
ListLogGroupsForQueryCommand,
ListTagsForResourceCommand,
ListTagsLogGroupCommand,
PutAccountPolicyCommand,
PutDataProtectionPolicyCommand,
PutDeliveryDestinationCommand,
PutDeliveryDestinationPolicyCommand,
PutDeliverySourceCommand,
PutDestinationCommand,
PutDestinationPolicyCommand,
PutIndexPolicyCommand,
PutIntegrationCommand,
PutLogEventsCommand,
PutMetricFilterCommand,
PutQueryDefinitionCommand,
PutResourcePolicyCommand,
PutRetentionPolicyCommand,
PutSubscriptionFilterCommand,
PutTransformerCommand,
StartLiveTailCommand,
StartQueryCommand,
StopQueryCommand,
TagLogGroupCommand,
TagResourceCommand,
TestMetricFilterCommand,
TestTransformerCommand,
UntagLogGroupCommand,
UntagResourceCommand,
UpdateAnomalyCommand,
UpdateDeliveryConfigurationCommand,
UpdateLogAnomalyDetectorCommand
};
var CloudWatchLogs = class extends CloudWatchLogsClient {
static {
__name(this, "CloudWatchLogs");
}
};
(0, import_smithy_client.createAggregatedClient)(commands, CloudWatchLogs);
// src/pagination/DescribeConfigurationTemplatesPaginator.ts
var paginateDescribeConfigurationTemplates = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeConfigurationTemplatesCommand, "nextToken", "nextToken", "limit");
// src/pagination/DescribeDeliveriesPaginator.ts
var paginateDescribeDeliveries = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeDeliveriesCommand, "nextToken", "nextToken", "limit");
// src/pagination/DescribeDeliveryDestinationsPaginator.ts
var paginateDescribeDeliveryDestinations = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeDeliveryDestinationsCommand, "nextToken", "nextToken", "limit");
// src/pagination/DescribeDeliverySourcesPaginator.ts
var paginateDescribeDeliverySources = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeDeliverySourcesCommand, "nextToken", "nextToken", "limit");
// src/pagination/DescribeDestinationsPaginator.ts
var paginateDescribeDestinations = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeDestinationsCommand, "nextToken", "nextToken", "limit");
// src/pagination/DescribeLogGroupsPaginator.ts
var paginateDescribeLogGroups = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeLogGroupsCommand, "nextToken", "nextToken", "limit");
// src/pagination/DescribeLogStreamsPaginator.ts
var paginateDescribeLogStreams = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeLogStreamsCommand, "nextToken", "nextToken", "limit");
// src/pagination/DescribeMetricFiltersPaginator.ts
var paginateDescribeMetricFilters = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeMetricFiltersCommand, "nextToken", "nextToken", "limit");
// src/pagination/DescribeSubscriptionFiltersPaginator.ts
var paginateDescribeSubscriptionFilters = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeSubscriptionFiltersCommand, "nextToken", "nextToken", "limit");
// src/pagination/FilterLogEventsPaginator.ts
var paginateFilterLogEvents = (0, import_core.createPaginator)(CloudWatchLogsClient, FilterLogEventsCommand, "nextToken", "nextToken", "limit");
// src/pagination/GetLogEventsPaginator.ts
var paginateGetLogEvents = (0, import_core.createPaginator)(CloudWatchLogsClient, GetLogEventsCommand, "nextToken", "nextForwardToken", "limit");
// src/pagination/ListAnomaliesPaginator.ts
var paginateListAnomalies = (0, import_core.createPaginator)(CloudWatchLogsClient, ListAnomaliesCommand, "nextToken", "nextToken", "limit");
// src/pagination/ListLogAnomalyDetectorsPaginator.ts
var paginateListLogAnomalyDetectors = (0, import_core.createPaginator)(CloudWatchLogsClient, ListLogAnomalyDetectorsCommand, "nextToken", "nextToken", "limit");
// src/pagination/ListLogGroupsForQueryPaginator.ts
var paginateListLogGroupsForQuery = (0, import_core.createPaginator)(CloudWatchLogsClient, ListLogGroupsForQueryCommand, "nextToken", "nextToken", "maxResults");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 29879:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(62001));
const core_1 = __nccwpck_require__(59963);
const credential_provider_node_1 = __nccwpck_require__(75531);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const config_resolver_1 = __nccwpck_require__(53098);
const eventstream_serde_node_1 = __nccwpck_require__(77682);
const hash_node_1 = __nccwpck_require__(3081);
const middleware_retry_1 = __nccwpck_require__(96039);
const node_config_provider_1 = __nccwpck_require__(33461);
const node_http_handler_1 = __nccwpck_require__(20258);
const util_body_length_node_1 = __nccwpck_require__(68075);
const util_retry_1 = __nccwpck_require__(84902);
const runtimeConfig_shared_1 = __nccwpck_require__(18929);
const smithy_client_1 = __nccwpck_require__(63570);
const util_defaults_mode_node_1 = __nccwpck_require__(72429);
const smithy_client_2 = __nccwpck_require__(63570);
const getRuntimeConfig = (config) => {
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
const profileConfig = { profile: config?.profile };
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider,
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ??
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
(0, node_config_provider_1.loadConfig)({
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 18929:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const core_1 = __nccwpck_require__(59963);
const smithy_client_1 = __nccwpck_require__(63570);
const url_parser_1 = __nccwpck_require__(14681);
const util_base64_1 = __nccwpck_require__(75600);
const util_utf8_1 = __nccwpck_require__(41895);
const httpAuthSchemeProvider_1 = __nccwpck_require__(99784);
const endpointResolver_1 = __nccwpck_require__(49488);
const getRuntimeConfig = (config) => {
return {
apiVersion: "2014-03-28",
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudWatchLogsHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new core_1.AwsSdkSigV4Signer(),
},
],
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
serviceId: config?.serviceId ?? "CloudWatch Logs",
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 37983:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveHttpAuthSchemeConfig = exports.defaultECSHttpAuthSchemeProvider = exports.defaultECSHttpAuthSchemeParametersProvider = void 0;
const core_1 = __nccwpck_require__(59963);
const util_middleware_1 = __nccwpck_require__(2390);
const defaultECSHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
(() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
exports.defaultECSHttpAuthSchemeParametersProvider = defaultECSHttpAuthSchemeParametersProvider;
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "ecs",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
const defaultECSHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
exports.defaultECSHttpAuthSchemeProvider = defaultECSHttpAuthSchemeProvider;
const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
return Object.assign(config_0, {});
};
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
/***/ }),
/***/ 55021:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultEndpointResolver = void 0;
const util_endpoints_1 = __nccwpck_require__(13350);
const util_endpoints_2 = __nccwpck_require__(45473);
const ruleset_1 = __nccwpck_require__(83635);
const cache = new util_endpoints_2.EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});
const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
exports.defaultEndpointResolver = defaultEndpointResolver;
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
/***/ }),
/***/ 83635:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ruleSet = void 0;
const s = "required", t = "fn", u = "argv", v = "ref";
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }, { conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: "https://ecs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ endpoint: { url: "https://ecs-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: "https://ecs.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://ecs.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
exports.ruleSet = _data;
/***/ }),
/***/ 18209:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
AccessDeniedException: () => AccessDeniedException,
AgentUpdateStatus: () => AgentUpdateStatus,
ApplicationProtocol: () => ApplicationProtocol,
AssignPublicIp: () => AssignPublicIp,
AttributeLimitExceededException: () => AttributeLimitExceededException,
AvailabilityZoneRebalancing: () => AvailabilityZoneRebalancing,
BlockedException: () => BlockedException,
CPUArchitecture: () => CPUArchitecture,
CapacityProviderField: () => CapacityProviderField,
CapacityProviderStatus: () => CapacityProviderStatus,
CapacityProviderUpdateStatus: () => CapacityProviderUpdateStatus,
ClientException: () => ClientException,
ClusterContainsContainerInstancesException: () => ClusterContainsContainerInstancesException,
ClusterContainsServicesException: () => ClusterContainsServicesException,
ClusterContainsTasksException: () => ClusterContainsTasksException,
ClusterField: () => ClusterField,
ClusterNotFoundException: () => ClusterNotFoundException,
ClusterSettingName: () => ClusterSettingName,
Compatibility: () => Compatibility,
ConflictException: () => ConflictException,
Connectivity: () => Connectivity,
ContainerCondition: () => ContainerCondition,
ContainerInstanceField: () => ContainerInstanceField,
ContainerInstanceStatus: () => ContainerInstanceStatus,
CreateCapacityProviderCommand: () => CreateCapacityProviderCommand,
CreateClusterCommand: () => CreateClusterCommand,
CreateServiceCommand: () => CreateServiceCommand,
CreateTaskSetCommand: () => CreateTaskSetCommand,
DeleteAccountSettingCommand: () => DeleteAccountSettingCommand,
DeleteAttributesCommand: () => DeleteAttributesCommand,
DeleteCapacityProviderCommand: () => DeleteCapacityProviderCommand,
DeleteClusterCommand: () => DeleteClusterCommand,
DeleteServiceCommand: () => DeleteServiceCommand,
DeleteTaskDefinitionsCommand: () => DeleteTaskDefinitionsCommand,
DeleteTaskSetCommand: () => DeleteTaskSetCommand,
DeploymentControllerType: () => DeploymentControllerType,
DeploymentRolloutState: () => DeploymentRolloutState,
DeregisterContainerInstanceCommand: () => DeregisterContainerInstanceCommand,
DeregisterTaskDefinitionCommand: () => DeregisterTaskDefinitionCommand,
DescribeCapacityProvidersCommand: () => DescribeCapacityProvidersCommand,
DescribeClustersCommand: () => DescribeClustersCommand,
DescribeContainerInstancesCommand: () => DescribeContainerInstancesCommand,
DescribeServiceDeploymentsCommand: () => DescribeServiceDeploymentsCommand,
DescribeServiceRevisionsCommand: () => DescribeServiceRevisionsCommand,
DescribeServicesCommand: () => DescribeServicesCommand,
DescribeTaskDefinitionCommand: () => DescribeTaskDefinitionCommand,
DescribeTaskSetsCommand: () => DescribeTaskSetsCommand,
DescribeTasksCommand: () => DescribeTasksCommand,
DesiredStatus: () => DesiredStatus,
DeviceCgroupPermission: () => DeviceCgroupPermission,
DiscoverPollEndpointCommand: () => DiscoverPollEndpointCommand,
EBSResourceType: () => EBSResourceType,
ECS: () => ECS,
ECSClient: () => ECSClient,
ECSServiceException: () => ECSServiceException,
EFSAuthorizationConfigIAM: () => EFSAuthorizationConfigIAM,
EFSTransitEncryption: () => EFSTransitEncryption,
EnvironmentFileType: () => EnvironmentFileType,
ExecuteCommandCommand: () => ExecuteCommandCommand,
ExecuteCommandLogging: () => ExecuteCommandLogging,
ExecuteCommandResponseFilterSensitiveLog: () => ExecuteCommandResponseFilterSensitiveLog,
FirelensConfigurationType: () => FirelensConfigurationType,
GetTaskProtectionCommand: () => GetTaskProtectionCommand,
HealthStatus: () => HealthStatus,
InstanceHealthCheckState: () => InstanceHealthCheckState,
InstanceHealthCheckType: () => InstanceHealthCheckType,
InvalidParameterException: () => InvalidParameterException,
IpcMode: () => IpcMode,
LaunchType: () => LaunchType,
LimitExceededException: () => LimitExceededException,
ListAccountSettingsCommand: () => ListAccountSettingsCommand,
ListAttributesCommand: () => ListAttributesCommand,
ListClustersCommand: () => ListClustersCommand,
ListContainerInstancesCommand: () => ListContainerInstancesCommand,
ListServiceDeploymentsCommand: () => ListServiceDeploymentsCommand,
ListServicesByNamespaceCommand: () => ListServicesByNamespaceCommand,
ListServicesCommand: () => ListServicesCommand,
ListTagsForResourceCommand: () => ListTagsForResourceCommand,
ListTaskDefinitionFamiliesCommand: () => ListTaskDefinitionFamiliesCommand,
ListTaskDefinitionsCommand: () => ListTaskDefinitionsCommand,
ListTasksCommand: () => ListTasksCommand,
LogDriver: () => LogDriver,
ManagedAgentName: () => ManagedAgentName,
ManagedDraining: () => ManagedDraining,
ManagedScalingStatus: () => ManagedScalingStatus,
ManagedTerminationProtection: () => ManagedTerminationProtection,
MissingVersionException: () => MissingVersionException,
NamespaceNotFoundException: () => NamespaceNotFoundException,
NetworkMode: () => NetworkMode,
NoUpdateAvailableException: () => NoUpdateAvailableException,
OSFamily: () => OSFamily,
PidMode: () => PidMode,
PlacementConstraintType: () => PlacementConstraintType,
PlacementStrategyType: () => PlacementStrategyType,
PlatformDeviceType: () => PlatformDeviceType,
PlatformTaskDefinitionIncompatibilityException: () => PlatformTaskDefinitionIncompatibilityException,
PlatformUnknownException: () => PlatformUnknownException,
PropagateTags: () => PropagateTags,
ProxyConfigurationType: () => ProxyConfigurationType,
PutAccountSettingCommand: () => PutAccountSettingCommand,
PutAccountSettingDefaultCommand: () => PutAccountSettingDefaultCommand,
PutAttributesCommand: () => PutAttributesCommand,
PutClusterCapacityProvidersCommand: () => PutClusterCapacityProvidersCommand,
RegisterContainerInstanceCommand: () => RegisterContainerInstanceCommand,
RegisterTaskDefinitionCommand: () => RegisterTaskDefinitionCommand,
ResourceInUseException: () => ResourceInUseException,
ResourceNotFoundException: () => ResourceNotFoundException,
ResourceType: () => ResourceType,
RunTaskCommand: () => RunTaskCommand,
ScaleUnit: () => ScaleUnit,
SchedulingStrategy: () => SchedulingStrategy,
Scope: () => Scope,
ServerException: () => ServerException,
ServiceDeploymentRollbackMonitorsStatus: () => ServiceDeploymentRollbackMonitorsStatus,
ServiceDeploymentStatus: () => ServiceDeploymentStatus,
ServiceField: () => ServiceField,
ServiceNotActiveException: () => ServiceNotActiveException,
ServiceNotFoundException: () => ServiceNotFoundException,
SessionFilterSensitiveLog: () => SessionFilterSensitiveLog,
SettingName: () => SettingName,
SettingType: () => SettingType,
SortOrder: () => SortOrder,
StabilityStatus: () => StabilityStatus,
StartTaskCommand: () => StartTaskCommand,
StopTaskCommand: () => StopTaskCommand,
SubmitAttachmentStateChangesCommand: () => SubmitAttachmentStateChangesCommand,
SubmitContainerStateChangeCommand: () => SubmitContainerStateChangeCommand,
SubmitTaskStateChangeCommand: () => SubmitTaskStateChangeCommand,
TagResourceCommand: () => TagResourceCommand,
TargetNotConnectedException: () => TargetNotConnectedException,
TargetNotFoundException: () => TargetNotFoundException,
TargetType: () => TargetType,
TaskDefinitionFamilyStatus: () => TaskDefinitionFamilyStatus,
TaskDefinitionField: () => TaskDefinitionField,
TaskDefinitionPlacementConstraintType: () => TaskDefinitionPlacementConstraintType,
TaskDefinitionStatus: () => TaskDefinitionStatus,
TaskField: () => TaskField,
TaskFilesystemType: () => TaskFilesystemType,
TaskSetField: () => TaskSetField,
TaskSetNotFoundException: () => TaskSetNotFoundException,
TaskStopCode: () => TaskStopCode,
TransportProtocol: () => TransportProtocol,
UlimitName: () => UlimitName,
UnsupportedFeatureException: () => UnsupportedFeatureException,
UntagResourceCommand: () => UntagResourceCommand,
UpdateCapacityProviderCommand: () => UpdateCapacityProviderCommand,
UpdateClusterCommand: () => UpdateClusterCommand,
UpdateClusterSettingsCommand: () => UpdateClusterSettingsCommand,
UpdateContainerAgentCommand: () => UpdateContainerAgentCommand,
UpdateContainerInstancesStateCommand: () => UpdateContainerInstancesStateCommand,
UpdateInProgressException: () => UpdateInProgressException,
UpdateServiceCommand: () => UpdateServiceCommand,
UpdateServicePrimaryTaskSetCommand: () => UpdateServicePrimaryTaskSetCommand,
UpdateTaskProtectionCommand: () => UpdateTaskProtectionCommand,
UpdateTaskSetCommand: () => UpdateTaskSetCommand,
VersionConsistency: () => VersionConsistency,
__Client: () => import_smithy_client.Client,
paginateListAccountSettings: () => paginateListAccountSettings,
paginateListAttributes: () => paginateListAttributes,
paginateListClusters: () => paginateListClusters,
paginateListContainerInstances: () => paginateListContainerInstances,
paginateListServices: () => paginateListServices,
paginateListServicesByNamespace: () => paginateListServicesByNamespace,
paginateListTaskDefinitionFamilies: () => paginateListTaskDefinitionFamilies,
paginateListTaskDefinitions: () => paginateListTaskDefinitions,
paginateListTasks: () => paginateListTasks,
waitForServicesInactive: () => waitForServicesInactive,
waitForServicesStable: () => waitForServicesStable,
waitForTasksRunning: () => waitForTasksRunning,
waitForTasksStopped: () => waitForTasksStopped,
waitUntilServicesInactive: () => waitUntilServicesInactive,
waitUntilServicesStable: () => waitUntilServicesStable,
waitUntilTasksRunning: () => waitUntilTasksRunning,
waitUntilTasksStopped: () => waitUntilTasksStopped
});
module.exports = __toCommonJS(index_exports);
// src/ECSClient.ts
var import_middleware_host_header = __nccwpck_require__(22545);
var import_middleware_logger = __nccwpck_require__(20014);
var import_middleware_recursion_detection = __nccwpck_require__(85525);
var import_middleware_user_agent = __nccwpck_require__(64688);
var import_config_resolver = __nccwpck_require__(53098);
var import_core = __nccwpck_require__(55829);
var import_middleware_content_length = __nccwpck_require__(82800);
var import_middleware_endpoint = __nccwpck_require__(82918);
var import_middleware_retry = __nccwpck_require__(96039);
var import_httpAuthSchemeProvider = __nccwpck_require__(37983);
// src/endpoint/EndpointParameters.ts
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "ecs"
});
}, "resolveClientEndpointParameters");
var commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
// src/ECSClient.ts
var import_runtimeConfig = __nccwpck_require__(47246);
// src/runtimeExtensions.ts
var import_region_config_resolver = __nccwpck_require__(18156);
var import_protocol_http = __nccwpck_require__(64418);
var import_smithy_client = __nccwpck_require__(63570);
// src/auth/httpAuthExtensionConfiguration.ts
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
} else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
}
};
}, "getHttpAuthExtensionConfiguration");
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials()
};
}, "resolveHttpAuthRuntimeConfig");
// src/runtimeExtensions.ts
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
getHttpAuthExtensionConfiguration(runtimeConfig)
);
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(
runtimeConfig,
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
resolveHttpAuthRuntimeConfig(extensionConfiguration)
);
}, "resolveRuntimeExtensions");
// src/ECSClient.ts
var ECSClient = class extends import_smithy_client.Client {
static {
__name(this, "ECSClient");
}
/**
* The resolved configuration of ECSClient class. This is resolved and normalized from the {@link ECSClientConfig | constructor configuration interface}.
*/
config;
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use(
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultECSHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials
}), "identityProviderConfigProvider")
})
);
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
}
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy() {
super.destroy();
}
};
// src/ECS.ts
// src/commands/CreateCapacityProviderCommand.ts
var import_middleware_serde = __nccwpck_require__(81238);
// src/protocols/Aws_json1_1.ts
var import_core2 = __nccwpck_require__(59963);
var import_uuid = __nccwpck_require__(75840);
// src/models/ECSServiceException.ts
var ECSServiceException = class _ECSServiceException extends import_smithy_client.ServiceException {
static {
__name(this, "ECSServiceException");
}
/**
* @internal
*/
constructor(options) {
super(options);
Object.setPrototypeOf(this, _ECSServiceException.prototype);
}
};
// src/models/models_0.ts
var AccessDeniedException = class _AccessDeniedException extends ECSServiceException {
static {
__name(this, "AccessDeniedException");
}
name = "AccessDeniedException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "AccessDeniedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
}
};
var AgentUpdateStatus = {
FAILED: "FAILED",
PENDING: "PENDING",
STAGED: "STAGED",
STAGING: "STAGING",
UPDATED: "UPDATED",
UPDATING: "UPDATING"
};
var ClientException = class _ClientException extends ECSServiceException {
static {
__name(this, "ClientException");
}
name = "ClientException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ClientException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ClientException.prototype);
}
};
var ManagedDraining = {
DISABLED: "DISABLED",
ENABLED: "ENABLED"
};
var ManagedScalingStatus = {
DISABLED: "DISABLED",
ENABLED: "ENABLED"
};
var ManagedTerminationProtection = {
DISABLED: "DISABLED",
ENABLED: "ENABLED"
};
var CapacityProviderStatus = {
ACTIVE: "ACTIVE",
INACTIVE: "INACTIVE"
};
var CapacityProviderUpdateStatus = {
DELETE_COMPLETE: "DELETE_COMPLETE",
DELETE_FAILED: "DELETE_FAILED",
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
UPDATE_COMPLETE: "UPDATE_COMPLETE",
UPDATE_FAILED: "UPDATE_FAILED",
UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS"
};
var InvalidParameterException = class _InvalidParameterException extends ECSServiceException {
static {
__name(this, "InvalidParameterException");
}
name = "InvalidParameterException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidParameterException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidParameterException.prototype);
}
};
var LimitExceededException = class _LimitExceededException extends ECSServiceException {
static {
__name(this, "LimitExceededException");
}
name = "LimitExceededException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "LimitExceededException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _LimitExceededException.prototype);
}
};
var ServerException = class _ServerException extends ECSServiceException {
static {
__name(this, "ServerException");
}
name = "ServerException";
$fault = "server";
/**
* @internal
*/
constructor(opts) {
super({
name: "ServerException",
$fault: "server",
...opts
});
Object.setPrototypeOf(this, _ServerException.prototype);
}
};
var UpdateInProgressException = class _UpdateInProgressException extends ECSServiceException {
static {
__name(this, "UpdateInProgressException");
}
name = "UpdateInProgressException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "UpdateInProgressException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _UpdateInProgressException.prototype);
}
};
var ExecuteCommandLogging = {
DEFAULT: "DEFAULT",
NONE: "NONE",
OVERRIDE: "OVERRIDE"
};
var ClusterSettingName = {
CONTAINER_INSIGHTS: "containerInsights"
};
var NamespaceNotFoundException = class _NamespaceNotFoundException extends ECSServiceException {
static {
__name(this, "NamespaceNotFoundException");
}
name = "NamespaceNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "NamespaceNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _NamespaceNotFoundException.prototype);
}
};
var ClusterNotFoundException = class _ClusterNotFoundException extends ECSServiceException {
static {
__name(this, "ClusterNotFoundException");
}
name = "ClusterNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ClusterNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ClusterNotFoundException.prototype);
}
};
var AvailabilityZoneRebalancing = {
DISABLED: "DISABLED",
ENABLED: "ENABLED"
};
var DeploymentControllerType = {
CODE_DEPLOY: "CODE_DEPLOY",
ECS: "ECS",
EXTERNAL: "EXTERNAL"
};
var LaunchType = {
EC2: "EC2",
EXTERNAL: "EXTERNAL",
FARGATE: "FARGATE"
};
var AssignPublicIp = {
DISABLED: "DISABLED",
ENABLED: "ENABLED"
};
var PlacementConstraintType = {
DISTINCT_INSTANCE: "distinctInstance",
MEMBER_OF: "memberOf"
};
var PlacementStrategyType = {
BINPACK: "binpack",
RANDOM: "random",
SPREAD: "spread"
};
var PropagateTags = {
NONE: "NONE",
SERVICE: "SERVICE",
TASK_DEFINITION: "TASK_DEFINITION"
};
var SchedulingStrategy = {
DAEMON: "DAEMON",
REPLICA: "REPLICA"
};
var LogDriver = {
AWSFIRELENS: "awsfirelens",
AWSLOGS: "awslogs",
FLUENTD: "fluentd",
GELF: "gelf",
JOURNALD: "journald",
JSON_FILE: "json-file",
SPLUNK: "splunk",
SYSLOG: "syslog"
};
var TaskFilesystemType = {
EXT3: "ext3",
EXT4: "ext4",
NTFS: "ntfs",
XFS: "xfs"
};
var EBSResourceType = {
VOLUME: "volume"
};
var DeploymentRolloutState = {
COMPLETED: "COMPLETED",
FAILED: "FAILED",
IN_PROGRESS: "IN_PROGRESS"
};
var ScaleUnit = {
PERCENT: "PERCENT"
};
var StabilityStatus = {
STABILIZING: "STABILIZING",
STEADY_STATE: "STEADY_STATE"
};
var PlatformTaskDefinitionIncompatibilityException = class _PlatformTaskDefinitionIncompatibilityException extends ECSServiceException {
static {
__name(this, "PlatformTaskDefinitionIncompatibilityException");
}
name = "PlatformTaskDefinitionIncompatibilityException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "PlatformTaskDefinitionIncompatibilityException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _PlatformTaskDefinitionIncompatibilityException.prototype);
}
};
var PlatformUnknownException = class _PlatformUnknownException extends ECSServiceException {
static {
__name(this, "PlatformUnknownException");
}
name = "PlatformUnknownException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "PlatformUnknownException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _PlatformUnknownException.prototype);
}
};
var UnsupportedFeatureException = class _UnsupportedFeatureException extends ECSServiceException {
static {
__name(this, "UnsupportedFeatureException");
}
name = "UnsupportedFeatureException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "UnsupportedFeatureException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _UnsupportedFeatureException.prototype);
}
};
var ServiceNotActiveException = class _ServiceNotActiveException extends ECSServiceException {
static {
__name(this, "ServiceNotActiveException");
}
name = "ServiceNotActiveException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ServiceNotActiveException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ServiceNotActiveException.prototype);
}
};
var ServiceNotFoundException = class _ServiceNotFoundException extends ECSServiceException {
static {
__name(this, "ServiceNotFoundException");
}
name = "ServiceNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ServiceNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ServiceNotFoundException.prototype);
}
};
var SettingName = {
AWSVPC_TRUNKING: "awsvpcTrunking",
CONTAINER_INSIGHTS: "containerInsights",
CONTAINER_INSTANCE_LONG_ARN_FORMAT: "containerInstanceLongArnFormat",
FARGATE_FIPS_MODE: "fargateFIPSMode",
FARGATE_TASK_RETIREMENT_WAIT_PERIOD: "fargateTaskRetirementWaitPeriod",
GUARD_DUTY_ACTIVATE: "guardDutyActivate",
SERVICE_LONG_ARN_FORMAT: "serviceLongArnFormat",
TAG_RESOURCE_AUTHORIZATION: "tagResourceAuthorization",
TASK_LONG_ARN_FORMAT: "taskLongArnFormat"
};
var SettingType = {
AWS_MANAGED: "aws_managed",
USER: "user"
};
var TargetType = {
CONTAINER_INSTANCE: "container-instance"
};
var TargetNotFoundException = class _TargetNotFoundException extends ECSServiceException {
static {
__name(this, "TargetNotFoundException");
}
name = "TargetNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "TargetNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TargetNotFoundException.prototype);
}
};
var ClusterContainsContainerInstancesException = class _ClusterContainsContainerInstancesException extends ECSServiceException {
static {
__name(this, "ClusterContainsContainerInstancesException");
}
name = "ClusterContainsContainerInstancesException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ClusterContainsContainerInstancesException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ClusterContainsContainerInstancesException.prototype);
}
};
var ClusterContainsServicesException = class _ClusterContainsServicesException extends ECSServiceException {
static {
__name(this, "ClusterContainsServicesException");
}
name = "ClusterContainsServicesException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ClusterContainsServicesException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ClusterContainsServicesException.prototype);
}
};
var ClusterContainsTasksException = class _ClusterContainsTasksException extends ECSServiceException {
static {
__name(this, "ClusterContainsTasksException");
}
name = "ClusterContainsTasksException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ClusterContainsTasksException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ClusterContainsTasksException.prototype);
}
};
var Compatibility = {
EC2: "EC2",
EXTERNAL: "EXTERNAL",
FARGATE: "FARGATE"
};
var ContainerCondition = {
COMPLETE: "COMPLETE",
HEALTHY: "HEALTHY",
START: "START",
SUCCESS: "SUCCESS"
};
var EnvironmentFileType = {
S3: "s3"
};
var FirelensConfigurationType = {
FLUENTBIT: "fluentbit",
FLUENTD: "fluentd"
};
var DeviceCgroupPermission = {
MKNOD: "mknod",
READ: "read",
WRITE: "write"
};
var ApplicationProtocol = {
GRPC: "grpc",
HTTP: "http",
HTTP2: "http2"
};
var TransportProtocol = {
TCP: "tcp",
UDP: "udp"
};
var ResourceType = {
GPU: "GPU",
INFERENCE_ACCELERATOR: "InferenceAccelerator"
};
var UlimitName = {
CORE: "core",
CPU: "cpu",
DATA: "data",
FSIZE: "fsize",
LOCKS: "locks",
MEMLOCK: "memlock",
MSGQUEUE: "msgqueue",
NICE: "nice",
NOFILE: "nofile",
NPROC: "nproc",
RSS: "rss",
RTPRIO: "rtprio",
RTTIME: "rttime",
SIGPENDING: "sigpending",
STACK: "stack"
};
var VersionConsistency = {
DISABLED: "disabled",
ENABLED: "enabled"
};
var IpcMode = {
HOST: "host",
NONE: "none",
TASK: "task"
};
var NetworkMode = {
AWSVPC: "awsvpc",
BRIDGE: "bridge",
HOST: "host",
NONE: "none"
};
var PidMode = {
HOST: "host",
TASK: "task"
};
var TaskDefinitionPlacementConstraintType = {
MEMBER_OF: "memberOf"
};
var ProxyConfigurationType = {
APPMESH: "APPMESH"
};
var CPUArchitecture = {
ARM64: "ARM64",
X86_64: "X86_64"
};
var OSFamily = {
LINUX: "LINUX",
WINDOWS_SERVER_2004_CORE: "WINDOWS_SERVER_2004_CORE",
WINDOWS_SERVER_2016_FULL: "WINDOWS_SERVER_2016_FULL",
WINDOWS_SERVER_2019_CORE: "WINDOWS_SERVER_2019_CORE",
WINDOWS_SERVER_2019_FULL: "WINDOWS_SERVER_2019_FULL",
WINDOWS_SERVER_2022_CORE: "WINDOWS_SERVER_2022_CORE",
WINDOWS_SERVER_2022_FULL: "WINDOWS_SERVER_2022_FULL",
WINDOWS_SERVER_20H2_CORE: "WINDOWS_SERVER_20H2_CORE"
};
var TaskDefinitionStatus = {
ACTIVE: "ACTIVE",
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
INACTIVE: "INACTIVE"
};
var Scope = {
SHARED: "shared",
TASK: "task"
};
var EFSAuthorizationConfigIAM = {
DISABLED: "DISABLED",
ENABLED: "ENABLED"
};
var EFSTransitEncryption = {
DISABLED: "DISABLED",
ENABLED: "ENABLED"
};
var TaskSetNotFoundException = class _TaskSetNotFoundException extends ECSServiceException {
static {
__name(this, "TaskSetNotFoundException");
}
name = "TaskSetNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "TaskSetNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TaskSetNotFoundException.prototype);
}
};
var InstanceHealthCheckState = {
IMPAIRED: "IMPAIRED",
INITIALIZING: "INITIALIZING",
INSUFFICIENT_DATA: "INSUFFICIENT_DATA",
OK: "OK"
};
var InstanceHealthCheckType = {
CONTAINER_RUNTIME: "CONTAINER_RUNTIME"
};
var CapacityProviderField = {
TAGS: "TAGS"
};
var ClusterField = {
ATTACHMENTS: "ATTACHMENTS",
CONFIGURATIONS: "CONFIGURATIONS",
SETTINGS: "SETTINGS",
STATISTICS: "STATISTICS",
TAGS: "TAGS"
};
var ContainerInstanceField = {
CONTAINER_INSTANCE_HEALTH: "CONTAINER_INSTANCE_HEALTH",
TAGS: "TAGS"
};
var ServiceDeploymentRollbackMonitorsStatus = {
DISABLED: "DISABLED",
MONITORING: "MONITORING",
MONITORING_COMPLETE: "MONITORING_COMPLETE",
TRIGGERED: "TRIGGERED"
};
var ServiceDeploymentStatus = {
IN_PROGRESS: "IN_PROGRESS",
PENDING: "PENDING",
ROLLBACK_FAILED: "ROLLBACK_FAILED",
ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS",
ROLLBACK_SUCCESSFUL: "ROLLBACK_SUCCESSFUL",
STOPPED: "STOPPED",
STOP_REQUESTED: "STOP_REQUESTED",
SUCCESSFUL: "SUCCESSFUL"
};
var ServiceField = {
TAGS: "TAGS"
};
var TaskDefinitionField = {
TAGS: "TAGS"
};
var TaskField = {
TAGS: "TAGS"
};
var Connectivity = {
CONNECTED: "CONNECTED",
DISCONNECTED: "DISCONNECTED"
};
var HealthStatus = {
HEALTHY: "HEALTHY",
UNHEALTHY: "UNHEALTHY",
UNKNOWN: "UNKNOWN"
};
var ManagedAgentName = {
ExecuteCommandAgent: "ExecuteCommandAgent"
};
var TaskStopCode = {
ESSENTIAL_CONTAINER_EXITED: "EssentialContainerExited",
SERVICE_SCHEDULER_INITIATED: "ServiceSchedulerInitiated",
SPOT_INTERRUPTION: "SpotInterruption",
TASK_FAILED_TO_START: "TaskFailedToStart",
TERMINATION_NOTICE: "TerminationNotice",
USER_INITIATED: "UserInitiated"
};
var TaskSetField = {
TAGS: "TAGS"
};
var TargetNotConnectedException = class _TargetNotConnectedException extends ECSServiceException {
static {
__name(this, "TargetNotConnectedException");
}
name = "TargetNotConnectedException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "TargetNotConnectedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TargetNotConnectedException.prototype);
}
};
var ResourceNotFoundException = class _ResourceNotFoundException extends ECSServiceException {
static {
__name(this, "ResourceNotFoundException");
}
name = "ResourceNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
}
};
var ContainerInstanceStatus = {
ACTIVE: "ACTIVE",
DEREGISTERING: "DEREGISTERING",
DRAINING: "DRAINING",
REGISTERING: "REGISTERING",
REGISTRATION_FAILED: "REGISTRATION_FAILED"
};
var TaskDefinitionFamilyStatus = {
ACTIVE: "ACTIVE",
ALL: "ALL",
INACTIVE: "INACTIVE"
};
var SortOrder = {
ASC: "ASC",
DESC: "DESC"
};
var DesiredStatus = {
PENDING: "PENDING",
RUNNING: "RUNNING",
STOPPED: "STOPPED"
};
var AttributeLimitExceededException = class _AttributeLimitExceededException extends ECSServiceException {
static {
__name(this, "AttributeLimitExceededException");
}
name = "AttributeLimitExceededException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "AttributeLimitExceededException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _AttributeLimitExceededException.prototype);
}
};
var ResourceInUseException = class _ResourceInUseException extends ECSServiceException {
static {
__name(this, "ResourceInUseException");
}
name = "ResourceInUseException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceInUseException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceInUseException.prototype);
}
};
var PlatformDeviceType = {
GPU: "GPU"
};
var BlockedException = class _BlockedException extends ECSServiceException {
static {
__name(this, "BlockedException");
}
name = "BlockedException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "BlockedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _BlockedException.prototype);
}
};
var ConflictException = class _ConflictException extends ECSServiceException {
static {
__name(this, "ConflictException");
}
name = "ConflictException";
$fault = "client";
/**
* ` but no name was provided", [cq]: f }, bk = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: B, [cD]: "{bucketArn#region}" }] }, bl = { [cA]: [{ [cB]: true, [j]: z, [cC]: A, [cF]: ["*"] }, { [cB]: true, [j]: "sigv4", [cC]: A, [cD]: "{bucketArn#region}" }] }, bm = { [ct]: F, [cu]: [ad] }, bn = { [cx]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} }, bo = { [cx]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} }, bp = { [cx]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} }, bq = { [cx]: Q, [cy]: aF, [cE]: {} }, br = { [cx]: "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} }, bs = { [cv]: "UseObjectLambdaEndpoint" }, bt = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: J, [cD]: "{Region}" }] }, bu = { [cx]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, bv = { [cx]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, bw = { [cx]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, bx = { [cx]: t, [cy]: aF, [cE]: {} }, by = { [cx]: "https://s3.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, bz = [{ [cv]: "Region" }], bA = [{ [cv]: "Endpoint" }], bB = [ad], bC = [Y], bD = [W], bE = [Z, ah], bF = [{ [ct]: d, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }] }, { [ct]: e, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }, true] }], bG = [ak], bH = [an], bI = [aa], bJ = [X], bK = [{ [ct]: k, [cu]: [ad, 6, 14, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 14, 16, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bL = [{ [cs]: [X], [n]: { [cx]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: {} }, [cq]: n }, { [n]: { [cx]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: {} }, [cq]: n }], bM = [{ [ct]: k, [cu]: [ad, 6, 15, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 15, 17, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bN = [{ [ct]: k, [cu]: [ad, 6, 19, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 19, 21, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bO = [{ [ct]: k, [cu]: [ad, 6, 20, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 20, 22, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bP = [{ [ct]: k, [cu]: [ad, 6, 26, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 26, 28, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bQ = [{ [cs]: [X], [n]: { [cx]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }, { [n]: { [cx]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], bR = [ad, 0, 7, true], bS = [{ [ct]: k, [cu]: [ad, 7, 15, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 15, 17, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bT = [{ [ct]: k, [cu]: [ad, 7, 16, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 16, 18, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bU = [{ [ct]: k, [cu]: [ad, 7, 20, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 20, 22, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bV = [{ [ct]: k, [cu]: [ad, 7, 21, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 21, 23, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bW = [{ [ct]: k, [cu]: [ad, 7, 27, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 27, 29, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bX = [ac], bY = [{ [ct]: y, [cu]: [{ [cv]: x }, false] }], bZ = [{ [ct]: h, [cu]: [{ [cv]: v }, "beta"] }], ca = ["*"], cb = [{ [ct]: y, [cu]: [{ [cv]: "Region" }, false] }], cc = [{ [ct]: h, [cu]: [{ [cv]: "Region" }, "us-east-1"] }], cd = [{ [ct]: h, [cu]: [aU, K] }], ce = [{ [ct]: i, [cu]: [aT, "resourceId[1]"], [cw]: L }, { [ct]: r, [cu]: [{ [ct]: h, [cu]: [aW, I] }] }], cf = [aT, "resourceId[1]"], cg = [{ [ct]: r, [cu]: [{ [ct]: h, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }, I] }] }], ch = [{ [ct]: r, [cu]: [{ [ct]: d, [cu]: [{ [ct]: i, [cu]: [aT, "resourceId[2]"] }] }] }], ci = [aT, "resourceId[2]"], cj = [{ [ct]: g, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }], [cw]: "bucketPartition" }], ck = [{ [ct]: h, [cu]: [bb, { [ct]: i, [cu]: [{ [cv]: "partitionResult" }, j] }] }], cl = [{ [ct]: y, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }, true] }], cm = [{ [ct]: y, [cu]: [bc, false] }], cn = [{ [ct]: y, [cu]: [aW, false] }], co = [{ [ct]: y, [cu]: [{ [cv]: "Region" }, true] }];
const _data = { version: "1.0", parameters: { Bucket: T, Region: T, UseFIPS: U, UseDualStack: U, Endpoint: T, ForcePathStyle: U, Accelerate: U, UseGlobalEndpoint: U, UseObjectLambdaEndpoint: V, Key: T, Prefix: T, CopySource: T, DisableAccessPoints: V, DisableMultiRegionAccessPoints: U, UseArnRegion: V, UseS3ExpressControlEndpoint: V, DisableS3ExpressSessionAuth: V }, [cr]: [{ [cs]: [{ [ct]: d, [cu]: bz }], [cr]: [{ [cs]: [W, X], error: "Accelerate cannot be used with FIPS", [cq]: f }, { [cs]: [Y, Z], error: "Cannot set dual-stack in combination with a custom endpoint.", [cq]: f }, { [cs]: [Z, X], error: "A custom endpoint cannot be combined with FIPS", [cq]: f }, { [cs]: [Z, W], error: "A custom endpoint cannot be combined with S3 Accelerate", [cq]: f }, { [cs]: [X, aa, ab], error: "Partition does not support FIPS", [cq]: f }, { [cs]: [ac, { [ct]: k, [cu]: [ad, 0, a, c], [cw]: l }, { [ct]: h, [cu]: [{ [cv]: l }, "--x-s3"] }], [cr]: [ae, af, ag, { [cs]: [ap, aq], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: [ak, ar], [cr]: [{ [cs]: bJ, endpoint: { [cx]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: al, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: al, [cE]: am }, [cq]: n }], [cq]: o }], [cq]: o }], [cq]: o }, { [cs]: bH, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: bF, [cr]: [{ [cs]: bK, [cr]: bL, [cq]: o }, { [cs]: bM, [cr]: bL, [cq]: o }, { [cs]: bN, [cr]: bL, [cq]: o }, { [cs]: bO, [cr]: bL, [cq]: o }, { [cs]: bP, [cr]: bL, [cq]: o }, as], [cq]: o }, { [cs]: bK, [cr]: bQ, [cq]: o }, { [cs]: bM, [cr]: bQ, [cq]: o }, { [cs]: bN, [cr]: bQ, [cq]: o }, { [cs]: bO, [cr]: bQ, [cq]: o }, { [cs]: bP, [cr]: bQ, [cq]: o }, as], [cq]: o }], [cq]: o }, ao], [cq]: o }, { [cs]: [ac, { [ct]: k, [cu]: bR, [cw]: s }, { [ct]: h, [cu]: [{ [cv]: s }, "--xa-s3"] }], [cr]: [ae, af, ag, { [cs]: bH, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: bF, [cr]: [{ [cs]: bS, [cr]: bL, [cq]: o }, { [cs]: bT, [cr]: bL, [cq]: o }, { [cs]: bU, [cr]: bL, [cq]: o }, { [cs]: bV, [cr]: bL, [cq]: o }, { [cs]: bW, [cr]: bL, [cq]: o }, as], [cq]: o }, { [cs]: bS, [cr]: bQ, [cq]: o }, { [cs]: bT, [cr]: bQ, [cq]: o }, { [cs]: bU, [cr]: bQ, [cq]: o }, { [cs]: bV, [cr]: bQ, [cq]: o }, { [cs]: bW, [cr]: bQ, [cq]: o }, as], [cq]: o }], [cq]: o }, ao], [cq]: o }, { [cs]: [at, ap, aq], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: bE, endpoint: { [cx]: t, [cy]: al, [cE]: am }, [cq]: n }, { [cs]: bJ, endpoint: { [cx]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: am }, [cq]: n }], [cq]: o }], [cq]: o }, { [cs]: [ac, { [ct]: k, [cu]: [ad, 49, 50, c], [cw]: u }, { [ct]: k, [cu]: [ad, 8, 12, c], [cw]: v }, { [ct]: k, [cu]: bR, [cw]: w }, { [ct]: k, [cu]: [ad, 32, 49, c], [cw]: x }, { [ct]: g, [cu]: bz, [cw]: "regionPartition" }, { [ct]: h, [cu]: [{ [cv]: w }, "--op-s3"] }], [cr]: [{ [cs]: bY, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [au, "e"] }], [cr]: [{ [cs]: bZ, [cr]: [av, { [cs]: bE, endpoint: { [cx]: "https://{Bucket}.ec2.{url#authority}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { endpoint: { [cx]: "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { [cs]: [{ [ct]: h, [cu]: [au, "o"] }], [cr]: [{ [cs]: bZ, [cr]: [av, { [cs]: bE, endpoint: { [cx]: "https://{Bucket}.op-{outpostId}.{url#authority}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { endpoint: { [cx]: "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { error: "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", [cq]: f }], [cq]: o }, { error: "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", [cq]: f }], [cq]: o }, { [cs]: bX, [cr]: [{ [cs]: [Z, { [ct]: r, [cu]: [{ [ct]: d, [cu]: [{ [ct]: m, [cu]: bA }] }] }], error: "Custom endpoint `{Endpoint}` was not a valid URI", [cq]: f }, { [cs]: [ax, an], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: cb, [cr]: [{ [cs]: [W, ab], error: "S3 Accelerate cannot be used in this region", [cq]: f }, { [cs]: [Y, X, az, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, X, az, ar, aC, aD], [cr]: [{ endpoint: aE, [cq]: n }], [cq]: o }, { [cs]: [Y, X, az, ar, aC, aG], endpoint: aE, [cq]: n }, { [cs]: [aH, X, az, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, X, az, ar, aC, aD], [cr]: [{ endpoint: aI, [cq]: n }], [cq]: o }, { [cs]: [aH, X, az, ar, aC, aG], endpoint: aI, [cq]: n }, { [cs]: [Y, aJ, W, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, aJ, W, ar, aC, aD], [cr]: [{ endpoint: aK, [cq]: n }], [cq]: o }, { [cs]: [Y, aJ, W, ar, aC, aG], endpoint: aK, [cq]: n }, { [cs]: [Y, aJ, az, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, aJ, az, ar, aC, aD], [cr]: [{ endpoint: aL, [cq]: n }], [cq]: o }, { [cs]: [Y, aJ, az, ar, aC, aG], endpoint: aL, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, ai, aA], endpoint: { [cx]: C, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, aM, aA], endpoint: { [cx]: q, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, ai, aC, aD], [cr]: [{ [cs]: cc, endpoint: aN, [cq]: n }, { endpoint: aN, [cq]: n }], [cq]: o }, { [cs]: [aH, aJ, az, Z, ah, aM, aC, aD], [cr]: [{ [cs]: cc, endpoint: aO, [cq]: n }, aP], [cq]: o }, { [cs]: [aH, aJ, az, Z, ah, ai, aC, aG], endpoint: aN, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, aM, aC, aG], endpoint: aO, [cq]: n }, { [cs]: [aH, aJ, W, ar, aA], endpoint: { [cx]: D, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, W, ar, aC, aD], [cr]: [{ [cs]: cc, endpoint: aQ, [cq]: n }, { endpoint: aQ, [cq]: n }], [cq]: o }, { [cs]: [aH, aJ, W, ar, aC, aG], endpoint: aQ, [cq]: n }, { [cs]: [aH, aJ, az, ar, aA], endpoint: { [cx]: E, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, az, ar, aC, aD], [cr]: [{ [cs]: cc, endpoint: { [cx]: E, [cy]: aF, [cE]: am }, [cq]: n }, { endpoint: aR, [cq]: n }], [cq]: o }, { [cs]: [aH, aJ, az, ar, aC, aG], endpoint: aR, [cq]: n }], [cq]: o }, aS], [cq]: o }], [cq]: o }, { [cs]: [Z, ah, { [ct]: h, [cu]: [{ [ct]: i, [cu]: [aj, "scheme"] }, "http"] }, { [ct]: p, [cu]: [ad, c] }, ax, aJ, aH, az], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: cb, [cr]: [aP], [cq]: o }, aS], [cq]: o }], [cq]: o }, { [cs]: [ax, { [ct]: F, [cu]: bB, [cw]: G }], [cr]: [{ [cs]: [{ [ct]: i, [cu]: [aT, "resourceId[0]"], [cw]: H }, { [ct]: r, [cu]: [{ [ct]: h, [cu]: [aU, I] }] }], [cr]: [{ [cs]: [{ [ct]: h, [cu]: [aV, J] }], [cr]: [{ [cs]: cd, [cr]: [{ [cs]: ce, [cr]: [aX, aY, { [cs]: cg, [cr]: [aZ, { [cs]: ch, [cr]: [ba, { [cs]: cj, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: ck, [cr]: [{ [cs]: cl, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [bc, I] }], error: "Invalid ARN: Missing account id", [cq]: f }, { [cs]: cm, [cr]: [{ [cs]: cn, [cr]: [{ [cs]: bE, endpoint: { [cx]: M, [cy]: bd, [cE]: am }, [cq]: n }, { [cs]: bJ, endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bd, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bd, [cE]: am }, [cq]: n }], [cq]: o }, be], [cq]: o }, bf], [cq]: o }, bg], [cq]: o }, bh], [cq]: o }], [cq]: o }], [cq]: o }, bi], [cq]: o }, { error: "Invalid ARN: bucket ARN is missing a region", [cq]: f }], [cq]: o }, bj], [cq]: o }, { error: "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", [cq]: f }], [cq]: o }, { [cs]: cd, [cr]: [{ [cs]: ce, [cr]: [{ [cs]: cg, [cr]: [{ [cs]: cd, [cr]: [{ [cs]: cg, [cr]: [aZ, { [cs]: ch, [cr]: [ba, { [cs]: cj, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [bb, "{partitionResult#name}"] }], [cr]: [{ [cs]: cl, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [aV, B] }], [cr]: [{ [cs]: cm, [cr]: [{ [cs]: cn, [cr]: [{ [cs]: bD, error: "Access Points do not support S3 Accelerate", [cq]: f }, { [cs]: [X, Y], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [X, aH], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [aJ, Y], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH, Z, ah], endpoint: { [cx]: M, [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }], [cq]: o }, be], [cq]: o }, bf], [cq]: o }, { error: "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", [cq]: f }], [cq]: o }, bg], [cq]: o }, bh], [cq]: o }], [cq]: o }], [cq]: o }, bi], [cq]: o }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: y, [cu]: [aW, c] }], [cr]: [{ [cs]: bC, error: "S3 MRAP does not support dual-stack", [cq]: f }, { [cs]: bJ, error: "S3 MRAP does not support FIPS", [cq]: f }, { [cs]: bD, error: "S3 MRAP does not support S3 Accelerate", [cq]: f }, { [cs]: [{ [ct]: e, [cu]: [{ [cv]: "DisableMultiRegionAccessPoints" }, c] }], error: "Invalid configuration: Multi-Region Access Point ARNs are disabled.", [cq]: f }, { [cs]: [{ [ct]: g, [cu]: bz, [cw]: N }], [cr]: [{ [cs]: [{ [ct]: h, [cu]: [{ [ct]: i, [cu]: [{ [cv]: N }, j] }, { [ct]: i, [cu]: [aT, "partition"] }] }], [cr]: [{ endpoint: { [cx]: "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", [cy]: { [cA]: [{ [cB]: c, name: z, [cC]: B, [cF]: ca }] }, [cE]: am }, [cq]: n }], [cq]: o }, { error: "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", [cq]: f }], [cq]: o }], [cq]: o }, { error: "Invalid Access Point Name", [cq]: f }], [cq]: o }, bj], [cq]: o }, { [cs]: [{ [ct]: h, [cu]: [aV, A] }], [cr]: [{ [cs]: bC, error: "S3 Outposts does not support Dual-stack", [cq]: f }, { [cs]: bJ, error: "S3 Outposts does not support FIPS", [cq]: f }, { [cs]: bD, error: "S3 Outposts does not support S3 Accelerate", [cq]: f }, { [cs]: [{ [ct]: d, [cu]: [{ [ct]: i, [cu]: [aT, "resourceId[4]"] }] }], error: "Invalid Arn: Outpost Access Point ARN contains sub resources", [cq]: f }, { [cs]: [{ [ct]: i, [cu]: cf, [cw]: x }], [cr]: [{ [cs]: bY, [cr]: [ba, { [cs]: cj, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: ck, [cr]: [{ [cs]: cl, [cr]: [{ [cs]: cm, [cr]: [{ [cs]: [{ [ct]: i, [cu]: ci, [cw]: O }], [cr]: [{ [cs]: [{ [ct]: i, [cu]: [aT, "resourceId[3]"], [cw]: L }], [cr]: [{ [cs]: [{ [ct]: h, [cu]: [{ [cv]: O }, K] }], [cr]: [{ [cs]: bE, endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", [cy]: bl, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bl, [cE]: am }, [cq]: n }], [cq]: o }, { error: "Expected an outpost type `accesspoint`, found {outpostType}", [cq]: f }], [cq]: o }, { error: "Invalid ARN: expected an access point name", [cq]: f }], [cq]: o }, { error: "Invalid ARN: Expected a 4-component resource", [cq]: f }], [cq]: o }, bf], [cq]: o }, bg], [cq]: o }, bh], [cq]: o }], [cq]: o }], [cq]: o }, { error: "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", [cq]: f }], [cq]: o }, { error: "Invalid ARN: The Outpost Id was not set", [cq]: f }], [cq]: o }, { error: "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", [cq]: f }], [cq]: o }, { error: "Invalid ARN: No ARN type specified", [cq]: f }], [cq]: o }, { [cs]: [{ [ct]: k, [cu]: [ad, 0, 4, b], [cw]: P }, { [ct]: h, [cu]: [{ [cv]: P }, "arn:"] }, { [ct]: r, [cu]: [{ [ct]: d, [cu]: [bm] }] }], error: "Invalid ARN: `{Bucket}` was not a valid ARN", [cq]: f }, { [cs]: [{ [ct]: e, [cu]: [ay, c] }, bm], error: "Path-style addressing cannot be used with ARN buckets", [cq]: f }, { [cs]: bG, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: [az], [cr]: [{ [cs]: [Y, ar, X, aA], endpoint: { [cx]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, ar, X, aC, aD], [cr]: [{ endpoint: bn, [cq]: n }], [cq]: o }, { [cs]: [Y, ar, X, aC, aG], endpoint: bn, [cq]: n }, { [cs]: [aH, ar, X, aA], endpoint: { [cx]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, ar, X, aC, aD], [cr]: [{ endpoint: bo, [cq]: n }], [cq]: o }, { [cs]: [aH, ar, X, aC, aG], endpoint: bo, [cq]: n }, { [cs]: [Y, ar, aJ, aA], endpoint: { [cx]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, ar, aJ, aC, aD], [cr]: [{ endpoint: bp, [cq]: n }], [cq]: o }, { [cs]: [Y, ar, aJ, aC, aG], endpoint: bp, [cq]: n }, { [cs]: [aH, Z, ah, aJ, aA], endpoint: { [cx]: Q, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, Z, ah, aJ, aC, aD], [cr]: [{ [cs]: cc, endpoint: bq, [cq]: n }, { endpoint: bq, [cq]: n }], [cq]: o }, { [cs]: [aH, Z, ah, aJ, aC, aG], endpoint: bq, [cq]: n }, { [cs]: [aH, ar, aJ, aA], endpoint: { [cx]: R, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, ar, aJ, aC, aD], [cr]: [{ [cs]: cc, endpoint: { [cx]: R, [cy]: aF, [cE]: am }, [cq]: n }, { endpoint: br, [cq]: n }], [cq]: o }, { [cs]: [aH, ar, aJ, aC, aG], endpoint: br, [cq]: n }], [cq]: o }, { error: "Path-style addressing cannot be used with S3 Accelerate", [cq]: f }], [cq]: o }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: d, [cu]: [bs] }, { [ct]: e, [cu]: [bs, c] }], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: co, [cr]: [aX, aY, { [cs]: bE, endpoint: { [cx]: t, [cy]: bt, [cE]: am }, [cq]: n }, { [cs]: bJ, endpoint: { [cx]: "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: bt, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", [cy]: bt, [cE]: am }, [cq]: n }], [cq]: o }, aS], [cq]: o }], [cq]: o }, { [cs]: [at], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: co, [cr]: [{ [cs]: [X, Y, ar, aA], endpoint: { [cx]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [X, Y, ar, aC, aD], [cr]: [{ endpoint: bu, [cq]: n }], [cq]: o }, { [cs]: [X, Y, ar, aC, aG], endpoint: bu, [cq]: n }, { [cs]: [X, aH, ar, aA], endpoint: { [cx]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [X, aH, ar, aC, aD], [cr]: [{ endpoint: bv, [cq]: n }], [cq]: o }, { [cs]: [X, aH, ar, aC, aG], endpoint: bv, [cq]: n }, { [cs]: [aJ, Y, ar, aA], endpoint: { [cx]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aJ, Y, ar, aC, aD], [cr]: [{ endpoint: bw, [cq]: n }], [cq]: o }, { [cs]: [aJ, Y, ar, aC, aG], endpoint: bw, [cq]: n }, { [cs]: [aJ, aH, Z, ah, aA], endpoint: { [cx]: t, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH, Z, ah, aC, aD], [cr]: [{ [cs]: cc, endpoint: bx, [cq]: n }, { endpoint: bx, [cq]: n }], [cq]: o }, { [cs]: [aJ, aH, Z, ah, aC, aG], endpoint: bx, [cq]: n }, { [cs]: [aJ, aH, ar, aA], endpoint: { [cx]: S, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH, ar, aC, aD], [cr]: [{ [cs]: cc, endpoint: { [cx]: S, [cy]: aF, [cE]: am }, [cq]: n }, { endpoint: by, [cq]: n }], [cq]: o }, { [cs]: [aJ, aH, ar, aC, aG], endpoint: by, [cq]: n }], [cq]: o }, aS], [cq]: o }], [cq]: o }], [cq]: o }, { error: "A region must be set when sending requests to S3.", [cq]: f }] };
exports.ruleSet = _data;
/***/ }),
/***/ 19250:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
AbortMultipartUploadCommand: () => AbortMultipartUploadCommand,
AnalyticsFilter: () => AnalyticsFilter,
AnalyticsS3ExportFileFormat: () => AnalyticsS3ExportFileFormat,
ArchiveStatus: () => ArchiveStatus,
BucketAccelerateStatus: () => BucketAccelerateStatus,
BucketAlreadyExists: () => BucketAlreadyExists,
BucketAlreadyOwnedByYou: () => BucketAlreadyOwnedByYou,
BucketCannedACL: () => BucketCannedACL,
BucketLocationConstraint: () => BucketLocationConstraint,
BucketLogsPermission: () => BucketLogsPermission,
BucketType: () => BucketType,
BucketVersioningStatus: () => BucketVersioningStatus,
ChecksumAlgorithm: () => ChecksumAlgorithm,
ChecksumMode: () => ChecksumMode,
ChecksumType: () => ChecksumType,
CompleteMultipartUploadCommand: () => CompleteMultipartUploadCommand,
CompleteMultipartUploadOutputFilterSensitiveLog: () => CompleteMultipartUploadOutputFilterSensitiveLog,
CompleteMultipartUploadRequestFilterSensitiveLog: () => CompleteMultipartUploadRequestFilterSensitiveLog,
CompressionType: () => CompressionType,
CopyObjectCommand: () => CopyObjectCommand,
CopyObjectOutputFilterSensitiveLog: () => CopyObjectOutputFilterSensitiveLog,
CopyObjectRequestFilterSensitiveLog: () => CopyObjectRequestFilterSensitiveLog,
CreateBucketCommand: () => CreateBucketCommand,
CreateBucketMetadataTableConfigurationCommand: () => CreateBucketMetadataTableConfigurationCommand,
CreateMultipartUploadCommand: () => CreateMultipartUploadCommand,
CreateMultipartUploadOutputFilterSensitiveLog: () => CreateMultipartUploadOutputFilterSensitiveLog,
CreateMultipartUploadRequestFilterSensitiveLog: () => CreateMultipartUploadRequestFilterSensitiveLog,
CreateSessionCommand: () => CreateSessionCommand,
CreateSessionOutputFilterSensitiveLog: () => CreateSessionOutputFilterSensitiveLog,
CreateSessionRequestFilterSensitiveLog: () => CreateSessionRequestFilterSensitiveLog,
DataRedundancy: () => DataRedundancy,
DeleteBucketAnalyticsConfigurationCommand: () => DeleteBucketAnalyticsConfigurationCommand,
DeleteBucketCommand: () => DeleteBucketCommand,
DeleteBucketCorsCommand: () => DeleteBucketCorsCommand,
DeleteBucketEncryptionCommand: () => DeleteBucketEncryptionCommand,
DeleteBucketIntelligentTieringConfigurationCommand: () => DeleteBucketIntelligentTieringConfigurationCommand,
DeleteBucketInventoryConfigurationCommand: () => DeleteBucketInventoryConfigurationCommand,
DeleteBucketLifecycleCommand: () => DeleteBucketLifecycleCommand,
DeleteBucketMetadataTableConfigurationCommand: () => DeleteBucketMetadataTableConfigurationCommand,
DeleteBucketMetricsConfigurationCommand: () => DeleteBucketMetricsConfigurationCommand,
DeleteBucketOwnershipControlsCommand: () => DeleteBucketOwnershipControlsCommand,
DeleteBucketPolicyCommand: () => DeleteBucketPolicyCommand,
DeleteBucketReplicationCommand: () => DeleteBucketReplicationCommand,
DeleteBucketTaggingCommand: () => DeleteBucketTaggingCommand,
DeleteBucketWebsiteCommand: () => DeleteBucketWebsiteCommand,
DeleteMarkerReplicationStatus: () => DeleteMarkerReplicationStatus,
DeleteObjectCommand: () => DeleteObjectCommand,
DeleteObjectTaggingCommand: () => DeleteObjectTaggingCommand,
DeleteObjectsCommand: () => DeleteObjectsCommand,
DeletePublicAccessBlockCommand: () => DeletePublicAccessBlockCommand,
EncodingType: () => EncodingType,
EncryptionFilterSensitiveLog: () => EncryptionFilterSensitiveLog,
EncryptionTypeMismatch: () => EncryptionTypeMismatch,
Event: () => Event,
ExistingObjectReplicationStatus: () => ExistingObjectReplicationStatus,
ExpirationStatus: () => ExpirationStatus,
ExpressionType: () => ExpressionType,
FileHeaderInfo: () => FileHeaderInfo,
FilterRuleName: () => FilterRuleName,
GetBucketAccelerateConfigurationCommand: () => GetBucketAccelerateConfigurationCommand,
GetBucketAclCommand: () => GetBucketAclCommand,
GetBucketAnalyticsConfigurationCommand: () => GetBucketAnalyticsConfigurationCommand,
GetBucketCorsCommand: () => GetBucketCorsCommand,
GetBucketEncryptionCommand: () => GetBucketEncryptionCommand,
GetBucketEncryptionOutputFilterSensitiveLog: () => GetBucketEncryptionOutputFilterSensitiveLog,
GetBucketIntelligentTieringConfigurationCommand: () => GetBucketIntelligentTieringConfigurationCommand,
GetBucketInventoryConfigurationCommand: () => GetBucketInventoryConfigurationCommand,
GetBucketInventoryConfigurationOutputFilterSensitiveLog: () => GetBucketInventoryConfigurationOutputFilterSensitiveLog,
GetBucketLifecycleConfigurationCommand: () => GetBucketLifecycleConfigurationCommand,
GetBucketLocationCommand: () => GetBucketLocationCommand,
GetBucketLoggingCommand: () => GetBucketLoggingCommand,
GetBucketMetadataTableConfigurationCommand: () => GetBucketMetadataTableConfigurationCommand,
GetBucketMetricsConfigurationCommand: () => GetBucketMetricsConfigurationCommand,
GetBucketNotificationConfigurationCommand: () => GetBucketNotificationConfigurationCommand,
GetBucketOwnershipControlsCommand: () => GetBucketOwnershipControlsCommand,
GetBucketPolicyCommand: () => GetBucketPolicyCommand,
GetBucketPolicyStatusCommand: () => GetBucketPolicyStatusCommand,
GetBucketReplicationCommand: () => GetBucketReplicationCommand,
GetBucketRequestPaymentCommand: () => GetBucketRequestPaymentCommand,
GetBucketTaggingCommand: () => GetBucketTaggingCommand,
GetBucketVersioningCommand: () => GetBucketVersioningCommand,
GetBucketWebsiteCommand: () => GetBucketWebsiteCommand,
GetObjectAclCommand: () => GetObjectAclCommand,
GetObjectAttributesCommand: () => GetObjectAttributesCommand,
GetObjectAttributesRequestFilterSensitiveLog: () => GetObjectAttributesRequestFilterSensitiveLog,
GetObjectCommand: () => GetObjectCommand,
GetObjectLegalHoldCommand: () => GetObjectLegalHoldCommand,
GetObjectLockConfigurationCommand: () => GetObjectLockConfigurationCommand,
GetObjectOutputFilterSensitiveLog: () => GetObjectOutputFilterSensitiveLog,
GetObjectRequestFilterSensitiveLog: () => GetObjectRequestFilterSensitiveLog,
GetObjectRetentionCommand: () => GetObjectRetentionCommand,
GetObjectTaggingCommand: () => GetObjectTaggingCommand,
GetObjectTorrentCommand: () => GetObjectTorrentCommand,
GetObjectTorrentOutputFilterSensitiveLog: () => GetObjectTorrentOutputFilterSensitiveLog,
GetPublicAccessBlockCommand: () => GetPublicAccessBlockCommand,
HeadBucketCommand: () => HeadBucketCommand,
HeadObjectCommand: () => HeadObjectCommand,
HeadObjectOutputFilterSensitiveLog: () => HeadObjectOutputFilterSensitiveLog,
HeadObjectRequestFilterSensitiveLog: () => HeadObjectRequestFilterSensitiveLog,
IntelligentTieringAccessTier: () => IntelligentTieringAccessTier,
IntelligentTieringStatus: () => IntelligentTieringStatus,
InvalidObjectState: () => InvalidObjectState,
InvalidRequest: () => InvalidRequest,
InvalidWriteOffset: () => InvalidWriteOffset,
InventoryConfigurationFilterSensitiveLog: () => InventoryConfigurationFilterSensitiveLog,
InventoryDestinationFilterSensitiveLog: () => InventoryDestinationFilterSensitiveLog,
InventoryEncryptionFilterSensitiveLog: () => InventoryEncryptionFilterSensitiveLog,
InventoryFormat: () => InventoryFormat,
InventoryFrequency: () => InventoryFrequency,
InventoryIncludedObjectVersions: () => InventoryIncludedObjectVersions,
InventoryOptionalField: () => InventoryOptionalField,
InventoryS3BucketDestinationFilterSensitiveLog: () => InventoryS3BucketDestinationFilterSensitiveLog,
JSONType: () => JSONType,
ListBucketAnalyticsConfigurationsCommand: () => ListBucketAnalyticsConfigurationsCommand,
ListBucketIntelligentTieringConfigurationsCommand: () => ListBucketIntelligentTieringConfigurationsCommand,
ListBucketInventoryConfigurationsCommand: () => ListBucketInventoryConfigurationsCommand,
ListBucketInventoryConfigurationsOutputFilterSensitiveLog: () => ListBucketInventoryConfigurationsOutputFilterSensitiveLog,
ListBucketMetricsConfigurationsCommand: () => ListBucketMetricsConfigurationsCommand,
ListBucketsCommand: () => ListBucketsCommand,
ListDirectoryBucketsCommand: () => ListDirectoryBucketsCommand,
ListMultipartUploadsCommand: () => ListMultipartUploadsCommand,
ListObjectVersionsCommand: () => ListObjectVersionsCommand,
ListObjectsCommand: () => ListObjectsCommand,
ListObjectsV2Command: () => ListObjectsV2Command,
ListPartsCommand: () => ListPartsCommand,
ListPartsRequestFilterSensitiveLog: () => ListPartsRequestFilterSensitiveLog,
LocationType: () => LocationType,
MFADelete: () => MFADelete,
MFADeleteStatus: () => MFADeleteStatus,
MetadataDirective: () => MetadataDirective,
MetricsFilter: () => MetricsFilter,
MetricsStatus: () => MetricsStatus,
NoSuchBucket: () => NoSuchBucket,
NoSuchKey: () => NoSuchKey,
NoSuchUpload: () => NoSuchUpload,
NotFound: () => NotFound,
ObjectAlreadyInActiveTierError: () => ObjectAlreadyInActiveTierError,
ObjectAttributes: () => ObjectAttributes,
ObjectCannedACL: () => ObjectCannedACL,
ObjectLockEnabled: () => ObjectLockEnabled,
ObjectLockLegalHoldStatus: () => ObjectLockLegalHoldStatus,
ObjectLockMode: () => ObjectLockMode,
ObjectLockRetentionMode: () => ObjectLockRetentionMode,
ObjectNotInActiveTierError: () => ObjectNotInActiveTierError,
ObjectOwnership: () => ObjectOwnership,
ObjectStorageClass: () => ObjectStorageClass,
ObjectVersionStorageClass: () => ObjectVersionStorageClass,
OptionalObjectAttributes: () => OptionalObjectAttributes,
OutputLocationFilterSensitiveLog: () => OutputLocationFilterSensitiveLog,
OwnerOverride: () => OwnerOverride,
PartitionDateSource: () => PartitionDateSource,
Payer: () => Payer,
Permission: () => Permission,
Protocol: () => Protocol,
PutBucketAccelerateConfigurationCommand: () => PutBucketAccelerateConfigurationCommand,
PutBucketAclCommand: () => PutBucketAclCommand,
PutBucketAnalyticsConfigurationCommand: () => PutBucketAnalyticsConfigurationCommand,
PutBucketCorsCommand: () => PutBucketCorsCommand,
PutBucketEncryptionCommand: () => PutBucketEncryptionCommand,
PutBucketEncryptionRequestFilterSensitiveLog: () => PutBucketEncryptionRequestFilterSensitiveLog,
PutBucketIntelligentTieringConfigurationCommand: () => PutBucketIntelligentTieringConfigurationCommand,
PutBucketInventoryConfigurationCommand: () => PutBucketInventoryConfigurationCommand,
PutBucketInventoryConfigurationRequestFilterSensitiveLog: () => PutBucketInventoryConfigurationRequestFilterSensitiveLog,
PutBucketLifecycleConfigurationCommand: () => PutBucketLifecycleConfigurationCommand,
PutBucketLoggingCommand: () => PutBucketLoggingCommand,
PutBucketMetricsConfigurationCommand: () => PutBucketMetricsConfigurationCommand,
PutBucketNotificationConfigurationCommand: () => PutBucketNotificationConfigurationCommand,
PutBucketOwnershipControlsCommand: () => PutBucketOwnershipControlsCommand,
PutBucketPolicyCommand: () => PutBucketPolicyCommand,
PutBucketReplicationCommand: () => PutBucketReplicationCommand,
PutBucketRequestPaymentCommand: () => PutBucketRequestPaymentCommand,
PutBucketTaggingCommand: () => PutBucketTaggingCommand,
PutBucketVersioningCommand: () => PutBucketVersioningCommand,
PutBucketWebsiteCommand: () => PutBucketWebsiteCommand,
PutObjectAclCommand: () => PutObjectAclCommand,
PutObjectCommand: () => PutObjectCommand,
PutObjectLegalHoldCommand: () => PutObjectLegalHoldCommand,
PutObjectLockConfigurationCommand: () => PutObjectLockConfigurationCommand,
PutObjectOutputFilterSensitiveLog: () => PutObjectOutputFilterSensitiveLog,
PutObjectRequestFilterSensitiveLog: () => PutObjectRequestFilterSensitiveLog,
PutObjectRetentionCommand: () => PutObjectRetentionCommand,
PutObjectTaggingCommand: () => PutObjectTaggingCommand,
PutPublicAccessBlockCommand: () => PutPublicAccessBlockCommand,
QuoteFields: () => QuoteFields,
ReplicaModificationsStatus: () => ReplicaModificationsStatus,
ReplicationRuleStatus: () => ReplicationRuleStatus,
ReplicationStatus: () => ReplicationStatus,
ReplicationTimeStatus: () => ReplicationTimeStatus,
RequestCharged: () => RequestCharged,
RequestPayer: () => RequestPayer,
RestoreObjectCommand: () => RestoreObjectCommand,
RestoreObjectRequestFilterSensitiveLog: () => RestoreObjectRequestFilterSensitiveLog,
RestoreRequestFilterSensitiveLog: () => RestoreRequestFilterSensitiveLog,
RestoreRequestType: () => RestoreRequestType,
S3: () => S3,
S3Client: () => S3Client,
S3LocationFilterSensitiveLog: () => S3LocationFilterSensitiveLog,
S3ServiceException: () => S3ServiceException,
SSEKMSFilterSensitiveLog: () => SSEKMSFilterSensitiveLog,
SelectObjectContentCommand: () => SelectObjectContentCommand,
SelectObjectContentEventStream: () => SelectObjectContentEventStream,
SelectObjectContentEventStreamFilterSensitiveLog: () => SelectObjectContentEventStreamFilterSensitiveLog,
SelectObjectContentOutputFilterSensitiveLog: () => SelectObjectContentOutputFilterSensitiveLog,
SelectObjectContentRequestFilterSensitiveLog: () => SelectObjectContentRequestFilterSensitiveLog,
ServerSideEncryption: () => ServerSideEncryption,
ServerSideEncryptionByDefaultFilterSensitiveLog: () => ServerSideEncryptionByDefaultFilterSensitiveLog,
ServerSideEncryptionConfigurationFilterSensitiveLog: () => ServerSideEncryptionConfigurationFilterSensitiveLog,
ServerSideEncryptionRuleFilterSensitiveLog: () => ServerSideEncryptionRuleFilterSensitiveLog,
SessionCredentialsFilterSensitiveLog: () => SessionCredentialsFilterSensitiveLog,
SessionMode: () => SessionMode,
SseKmsEncryptedObjectsStatus: () => SseKmsEncryptedObjectsStatus,
StorageClass: () => StorageClass,
StorageClassAnalysisSchemaVersion: () => StorageClassAnalysisSchemaVersion,
TaggingDirective: () => TaggingDirective,
Tier: () => Tier,
TooManyParts: () => TooManyParts,
TransitionDefaultMinimumObjectSize: () => TransitionDefaultMinimumObjectSize,
TransitionStorageClass: () => TransitionStorageClass,
Type: () => Type,
UploadPartCommand: () => UploadPartCommand,
UploadPartCopyCommand: () => UploadPartCopyCommand,
UploadPartCopyOutputFilterSensitiveLog: () => UploadPartCopyOutputFilterSensitiveLog,
UploadPartCopyRequestFilterSensitiveLog: () => UploadPartCopyRequestFilterSensitiveLog,
UploadPartOutputFilterSensitiveLog: () => UploadPartOutputFilterSensitiveLog,
UploadPartRequestFilterSensitiveLog: () => UploadPartRequestFilterSensitiveLog,
WriteGetObjectResponseCommand: () => WriteGetObjectResponseCommand,
WriteGetObjectResponseRequestFilterSensitiveLog: () => WriteGetObjectResponseRequestFilterSensitiveLog,
__Client: () => import_smithy_client.Client,
paginateListBuckets: () => paginateListBuckets,
paginateListDirectoryBuckets: () => paginateListDirectoryBuckets,
paginateListObjectsV2: () => paginateListObjectsV2,
paginateListParts: () => paginateListParts,
waitForBucketExists: () => waitForBucketExists,
waitForBucketNotExists: () => waitForBucketNotExists,
waitForObjectExists: () => waitForObjectExists,
waitForObjectNotExists: () => waitForObjectNotExists,
waitUntilBucketExists: () => waitUntilBucketExists,
waitUntilBucketNotExists: () => waitUntilBucketNotExists,
waitUntilObjectExists: () => waitUntilObjectExists,
waitUntilObjectNotExists: () => waitUntilObjectNotExists
});
module.exports = __toCommonJS(index_exports);
// src/S3Client.ts
var import_middleware_expect_continue = __nccwpck_require__(81990);
var import_middleware_flexible_checksums = __nccwpck_require__(13799);
var import_middleware_host_header = __nccwpck_require__(22545);
var import_middleware_logger = __nccwpck_require__(20014);
var import_middleware_recursion_detection = __nccwpck_require__(85525);
var import_middleware_sdk_s32 = __nccwpck_require__(81139);
var import_middleware_user_agent = __nccwpck_require__(64688);
var import_config_resolver = __nccwpck_require__(53098);
var import_core3 = __nccwpck_require__(55829);
var import_eventstream_serde_config_resolver = __nccwpck_require__(16181);
var import_middleware_content_length = __nccwpck_require__(82800);
var import_middleware_retry = __nccwpck_require__(96039);
var import_httpAuthSchemeProvider = __nccwpck_require__(69023);
// src/commands/CreateSessionCommand.ts
var import_middleware_sdk_s3 = __nccwpck_require__(81139);
var import_middleware_endpoint = __nccwpck_require__(82918);
var import_middleware_serde = __nccwpck_require__(81238);
// src/endpoint/EndpointParameters.ts
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
return Object.assign(options, {
useFipsEndpoint: options.useFipsEndpoint ?? false,
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
forcePathStyle: options.forcePathStyle ?? false,
useAccelerateEndpoint: options.useAccelerateEndpoint ?? false,
useGlobalEndpoint: options.useGlobalEndpoint ?? false,
disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false,
defaultSigningName: "s3"
});
}, "resolveClientEndpointParameters");
var commonParams = {
ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" },
UseArnRegion: { type: "clientContextParams", name: "useArnRegion" },
DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" },
Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" },
DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" },
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
// src/models/models_0.ts
// src/models/S3ServiceException.ts
var import_smithy_client = __nccwpck_require__(63570);
var S3ServiceException = class _S3ServiceException extends import_smithy_client.ServiceException {
static {
__name(this, "S3ServiceException");
}
/**
* @internal
*/
constructor(options) {
super(options);
Object.setPrototypeOf(this, _S3ServiceException.prototype);
}
};
// src/models/models_0.ts
var RequestCharged = {
requester: "requester"
};
var RequestPayer = {
requester: "requester"
};
var NoSuchUpload = class _NoSuchUpload extends S3ServiceException {
static {
__name(this, "NoSuchUpload");
}
name = "NoSuchUpload";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "NoSuchUpload",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _NoSuchUpload.prototype);
}
};
var BucketAccelerateStatus = {
Enabled: "Enabled",
Suspended: "Suspended"
};
var Type = {
AmazonCustomerByEmail: "AmazonCustomerByEmail",
CanonicalUser: "CanonicalUser",
Group: "Group"
};
var Permission = {
FULL_CONTROL: "FULL_CONTROL",
READ: "READ",
READ_ACP: "READ_ACP",
WRITE: "WRITE",
WRITE_ACP: "WRITE_ACP"
};
var OwnerOverride = {
Destination: "Destination"
};
var ChecksumType = {
COMPOSITE: "COMPOSITE",
FULL_OBJECT: "FULL_OBJECT"
};
var ServerSideEncryption = {
AES256: "AES256",
aws_kms: "aws:kms",
aws_kms_dsse: "aws:kms:dsse"
};
var ObjectCannedACL = {
authenticated_read: "authenticated-read",
aws_exec_read: "aws-exec-read",
bucket_owner_full_control: "bucket-owner-full-control",
bucket_owner_read: "bucket-owner-read",
private: "private",
public_read: "public-read",
public_read_write: "public-read-write"
};
var ChecksumAlgorithm = {
CRC32: "CRC32",
CRC32C: "CRC32C",
CRC64NVME: "CRC64NVME",
SHA1: "SHA1",
SHA256: "SHA256"
};
var MetadataDirective = {
COPY: "COPY",
REPLACE: "REPLACE"
};
var ObjectLockLegalHoldStatus = {
OFF: "OFF",
ON: "ON"
};
var ObjectLockMode = {
COMPLIANCE: "COMPLIANCE",
GOVERNANCE: "GOVERNANCE"
};
var StorageClass = {
DEEP_ARCHIVE: "DEEP_ARCHIVE",
EXPRESS_ONEZONE: "EXPRESS_ONEZONE",
GLACIER: "GLACIER",
GLACIER_IR: "GLACIER_IR",
INTELLIGENT_TIERING: "INTELLIGENT_TIERING",
ONEZONE_IA: "ONEZONE_IA",
OUTPOSTS: "OUTPOSTS",
REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY",
SNOW: "SNOW",
STANDARD: "STANDARD",
STANDARD_IA: "STANDARD_IA"
};
var TaggingDirective = {
COPY: "COPY",
REPLACE: "REPLACE"
};
var ObjectNotInActiveTierError = class _ObjectNotInActiveTierError extends S3ServiceException {
static {
__name(this, "ObjectNotInActiveTierError");
}
name = "ObjectNotInActiveTierError";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ObjectNotInActiveTierError",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ObjectNotInActiveTierError.prototype);
}
};
var BucketAlreadyExists = class _BucketAlreadyExists extends S3ServiceException {
static {
__name(this, "BucketAlreadyExists");
}
name = "BucketAlreadyExists";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "BucketAlreadyExists",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _BucketAlreadyExists.prototype);
}
};
var BucketAlreadyOwnedByYou = class _BucketAlreadyOwnedByYou extends S3ServiceException {
static {
__name(this, "BucketAlreadyOwnedByYou");
}
name = "BucketAlreadyOwnedByYou";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "BucketAlreadyOwnedByYou",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _BucketAlreadyOwnedByYou.prototype);
}
};
var BucketCannedACL = {
authenticated_read: "authenticated-read",
private: "private",
public_read: "public-read",
public_read_write: "public-read-write"
};
var DataRedundancy = {
SingleAvailabilityZone: "SingleAvailabilityZone",
SingleLocalZone: "SingleLocalZone"
};
var BucketType = {
Directory: "Directory"
};
var LocationType = {
AvailabilityZone: "AvailabilityZone",
LocalZone: "LocalZone"
};
var BucketLocationConstraint = {
EU: "EU",
af_south_1: "af-south-1",
ap_east_1: "ap-east-1",
ap_northeast_1: "ap-northeast-1",
ap_northeast_2: "ap-northeast-2",
ap_northeast_3: "ap-northeast-3",
ap_south_1: "ap-south-1",
ap_south_2: "ap-south-2",
ap_southeast_1: "ap-southeast-1",
ap_southeast_2: "ap-southeast-2",
ap_southeast_3: "ap-southeast-3",
ap_southeast_4: "ap-southeast-4",
ap_southeast_5: "ap-southeast-5",
ca_central_1: "ca-central-1",
cn_north_1: "cn-north-1",
cn_northwest_1: "cn-northwest-1",
eu_central_1: "eu-central-1",
eu_central_2: "eu-central-2",
eu_north_1: "eu-north-1",
eu_south_1: "eu-south-1",
eu_south_2: "eu-south-2",
eu_west_1: "eu-west-1",
eu_west_2: "eu-west-2",
eu_west_3: "eu-west-3",
il_central_1: "il-central-1",
me_central_1: "me-central-1",
me_south_1: "me-south-1",
sa_east_1: "sa-east-1",
us_east_2: "us-east-2",
us_gov_east_1: "us-gov-east-1",
us_gov_west_1: "us-gov-west-1",
us_west_1: "us-west-1",
us_west_2: "us-west-2"
};
var ObjectOwnership = {
BucketOwnerEnforced: "BucketOwnerEnforced",
BucketOwnerPreferred: "BucketOwnerPreferred",
ObjectWriter: "ObjectWriter"
};
var SessionMode = {
ReadOnly: "ReadOnly",
ReadWrite: "ReadWrite"
};
var NoSuchBucket = class _NoSuchBucket extends S3ServiceException {
static {
__name(this, "NoSuchBucket");
}
name = "NoSuchBucket";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "NoSuchBucket",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _NoSuchBucket.prototype);
}
};
var AnalyticsFilter;
((AnalyticsFilter2) => {
AnalyticsFilter2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.Prefix !== void 0) return visitor.Prefix(value.Prefix);
if (value.Tag !== void 0) return visitor.Tag(value.Tag);
if (value.And !== void 0) return visitor.And(value.And);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(AnalyticsFilter || (AnalyticsFilter = {}));
var AnalyticsS3ExportFileFormat = {
CSV: "CSV"
};
var StorageClassAnalysisSchemaVersion = {
V_1: "V_1"
};
var IntelligentTieringStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var IntelligentTieringAccessTier = {
ARCHIVE_ACCESS: "ARCHIVE_ACCESS",
DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS"
};
var InventoryFormat = {
CSV: "CSV",
ORC: "ORC",
Parquet: "Parquet"
};
var InventoryIncludedObjectVersions = {
All: "All",
Current: "Current"
};
var InventoryOptionalField = {
BucketKeyStatus: "BucketKeyStatus",
ChecksumAlgorithm: "ChecksumAlgorithm",
ETag: "ETag",
EncryptionStatus: "EncryptionStatus",
IntelligentTieringAccessTier: "IntelligentTieringAccessTier",
IsMultipartUploaded: "IsMultipartUploaded",
LastModifiedDate: "LastModifiedDate",
ObjectAccessControlList: "ObjectAccessControlList",
ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus",
ObjectLockMode: "ObjectLockMode",
ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate",
ObjectOwner: "ObjectOwner",
ReplicationStatus: "ReplicationStatus",
Size: "Size",
StorageClass: "StorageClass"
};
var InventoryFrequency = {
Daily: "Daily",
Weekly: "Weekly"
};
var TransitionStorageClass = {
DEEP_ARCHIVE: "DEEP_ARCHIVE",
GLACIER: "GLACIER",
GLACIER_IR: "GLACIER_IR",
INTELLIGENT_TIERING: "INTELLIGENT_TIERING",
ONEZONE_IA: "ONEZONE_IA",
STANDARD_IA: "STANDARD_IA"
};
var ExpirationStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var TransitionDefaultMinimumObjectSize = {
all_storage_classes_128K: "all_storage_classes_128K",
varies_by_storage_class: "varies_by_storage_class"
};
var BucketLogsPermission = {
FULL_CONTROL: "FULL_CONTROL",
READ: "READ",
WRITE: "WRITE"
};
var PartitionDateSource = {
DeliveryTime: "DeliveryTime",
EventTime: "EventTime"
};
var MetricsFilter;
((MetricsFilter2) => {
MetricsFilter2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.Prefix !== void 0) return visitor.Prefix(value.Prefix);
if (value.Tag !== void 0) return visitor.Tag(value.Tag);
if (value.AccessPointArn !== void 0) return visitor.AccessPointArn(value.AccessPointArn);
if (value.And !== void 0) return visitor.And(value.And);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(MetricsFilter || (MetricsFilter = {}));
var Event = {
s3_IntelligentTiering: "s3:IntelligentTiering",
s3_LifecycleExpiration_: "s3:LifecycleExpiration:*",
s3_LifecycleExpiration_Delete: "s3:LifecycleExpiration:Delete",
s3_LifecycleExpiration_DeleteMarkerCreated: "s3:LifecycleExpiration:DeleteMarkerCreated",
s3_LifecycleTransition: "s3:LifecycleTransition",
s3_ObjectAcl_Put: "s3:ObjectAcl:Put",
s3_ObjectCreated_: "s3:ObjectCreated:*",
s3_ObjectCreated_CompleteMultipartUpload: "s3:ObjectCreated:CompleteMultipartUpload",
s3_ObjectCreated_Copy: "s3:ObjectCreated:Copy",
s3_ObjectCreated_Post: "s3:ObjectCreated:Post",
s3_ObjectCreated_Put: "s3:ObjectCreated:Put",
s3_ObjectRemoved_: "s3:ObjectRemoved:*",
s3_ObjectRemoved_Delete: "s3:ObjectRemoved:Delete",
s3_ObjectRemoved_DeleteMarkerCreated: "s3:ObjectRemoved:DeleteMarkerCreated",
s3_ObjectRestore_: "s3:ObjectRestore:*",
s3_ObjectRestore_Completed: "s3:ObjectRestore:Completed",
s3_ObjectRestore_Delete: "s3:ObjectRestore:Delete",
s3_ObjectRestore_Post: "s3:ObjectRestore:Post",
s3_ObjectTagging_: "s3:ObjectTagging:*",
s3_ObjectTagging_Delete: "s3:ObjectTagging:Delete",
s3_ObjectTagging_Put: "s3:ObjectTagging:Put",
s3_ReducedRedundancyLostObject: "s3:ReducedRedundancyLostObject",
s3_Replication_: "s3:Replication:*",
s3_Replication_OperationFailedReplication: "s3:Replication:OperationFailedReplication",
s3_Replication_OperationMissedThreshold: "s3:Replication:OperationMissedThreshold",
s3_Replication_OperationNotTracked: "s3:Replication:OperationNotTracked",
s3_Replication_OperationReplicatedAfterThreshold: "s3:Replication:OperationReplicatedAfterThreshold"
};
var FilterRuleName = {
prefix: "prefix",
suffix: "suffix"
};
var DeleteMarkerReplicationStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var MetricsStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var ReplicationTimeStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var ExistingObjectReplicationStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var ReplicaModificationsStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var SseKmsEncryptedObjectsStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var ReplicationRuleStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var Payer = {
BucketOwner: "BucketOwner",
Requester: "Requester"
};
var MFADeleteStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var BucketVersioningStatus = {
Enabled: "Enabled",
Suspended: "Suspended"
};
var Protocol = {
http: "http",
https: "https"
};
var ReplicationStatus = {
COMPLETE: "COMPLETE",
COMPLETED: "COMPLETED",
FAILED: "FAILED",
PENDING: "PENDING",
REPLICA: "REPLICA"
};
var ChecksumMode = {
ENABLED: "ENABLED"
};
var InvalidObjectState = class _InvalidObjectState extends S3ServiceException {
static {
__name(this, "InvalidObjectState");
}
name = "InvalidObjectState";
$fault = "client";
StorageClass;
AccessTier;
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidObjectState",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidObjectState.prototype);
this.StorageClass = opts.StorageClass;
this.AccessTier = opts.AccessTier;
}
};
var NoSuchKey = class _NoSuchKey extends S3ServiceException {
static {
__name(this, "NoSuchKey");
}
name = "NoSuchKey";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "NoSuchKey",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _NoSuchKey.prototype);
}
};
var ObjectAttributes = {
CHECKSUM: "Checksum",
ETAG: "ETag",
OBJECT_PARTS: "ObjectParts",
OBJECT_SIZE: "ObjectSize",
STORAGE_CLASS: "StorageClass"
};
var ObjectLockEnabled = {
Enabled: "Enabled"
};
var ObjectLockRetentionMode = {
COMPLIANCE: "COMPLIANCE",
GOVERNANCE: "GOVERNANCE"
};
var NotFound = class _NotFound extends S3ServiceException {
static {
__name(this, "NotFound");
}
name = "NotFound";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "NotFound",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _NotFound.prototype);
}
};
var ArchiveStatus = {
ARCHIVE_ACCESS: "ARCHIVE_ACCESS",
DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS"
};
var EncodingType = {
url: "url"
};
var ObjectStorageClass = {
DEEP_ARCHIVE: "DEEP_ARCHIVE",
EXPRESS_ONEZONE: "EXPRESS_ONEZONE",
GLACIER: "GLACIER",
GLACIER_IR: "GLACIER_IR",
INTELLIGENT_TIERING: "INTELLIGENT_TIERING",
ONEZONE_IA: "ONEZONE_IA",
OUTPOSTS: "OUTPOSTS",
REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY",
SNOW: "SNOW",
STANDARD: "STANDARD",
STANDARD_IA: "STANDARD_IA"
};
var OptionalObjectAttributes = {
RESTORE_STATUS: "RestoreStatus"
};
var ObjectVersionStorageClass = {
STANDARD: "STANDARD"
};
var CompleteMultipartUploadOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }
}), "CompleteMultipartUploadOutputFilterSensitiveLog");
var CompleteMultipartUploadRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }
}), "CompleteMultipartUploadRequestFilterSensitiveLog");
var CopyObjectOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING }
}), "CopyObjectOutputFilterSensitiveLog");
var CopyObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING },
...obj.CopySourceSSECustomerKey && { CopySourceSSECustomerKey: import_smithy_client.SENSITIVE_STRING }
}), "CopyObjectRequestFilterSensitiveLog");
var CreateMultipartUploadOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING }
}), "CreateMultipartUploadOutputFilterSensitiveLog");
var CreateMultipartUploadRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING }
}), "CreateMultipartUploadRequestFilterSensitiveLog");
var SessionCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client.SENSITIVE_STRING },
...obj.SessionToken && { SessionToken: import_smithy_client.SENSITIVE_STRING }
}), "SessionCredentialsFilterSensitiveLog");
var CreateSessionOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING },
...obj.Credentials && { Credentials: SessionCredentialsFilterSensitiveLog(obj.Credentials) }
}), "CreateSessionOutputFilterSensitiveLog");
var CreateSessionRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING }
}), "CreateSessionRequestFilterSensitiveLog");
var ServerSideEncryptionByDefaultFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.KMSMasterKeyID && { KMSMasterKeyID: import_smithy_client.SENSITIVE_STRING }
}), "ServerSideEncryptionByDefaultFilterSensitiveLog");
var ServerSideEncryptionRuleFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.ApplyServerSideEncryptionByDefault && {
ApplyServerSideEncryptionByDefault: ServerSideEncryptionByDefaultFilterSensitiveLog(
obj.ApplyServerSideEncryptionByDefault
)
}
}), "ServerSideEncryptionRuleFilterSensitiveLog");
var ServerSideEncryptionConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.Rules && { Rules: obj.Rules.map((item) => ServerSideEncryptionRuleFilterSensitiveLog(item)) }
}), "ServerSideEncryptionConfigurationFilterSensitiveLog");
var GetBucketEncryptionOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.ServerSideEncryptionConfiguration && {
ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationFilterSensitiveLog(
obj.ServerSideEncryptionConfiguration
)
}
}), "GetBucketEncryptionOutputFilterSensitiveLog");
var SSEKMSFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.KeyId && { KeyId: import_smithy_client.SENSITIVE_STRING }
}), "SSEKMSFilterSensitiveLog");
var InventoryEncryptionFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMS && { SSEKMS: SSEKMSFilterSensitiveLog(obj.SSEKMS) }
}), "InventoryEncryptionFilterSensitiveLog");
var InventoryS3BucketDestinationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.Encryption && { Encryption: InventoryEncryptionFilterSensitiveLog(obj.Encryption) }
}), "InventoryS3BucketDestinationFilterSensitiveLog");
var InventoryDestinationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.S3BucketDestination && {
S3BucketDestination: InventoryS3BucketDestinationFilterSensitiveLog(obj.S3BucketDestination)
}
}), "InventoryDestinationFilterSensitiveLog");
var InventoryConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.Destination && { Destination: InventoryDestinationFilterSensitiveLog(obj.Destination) }
}), "InventoryConfigurationFilterSensitiveLog");
var GetBucketInventoryConfigurationOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.InventoryConfiguration && {
InventoryConfiguration: InventoryConfigurationFilterSensitiveLog(obj.InventoryConfiguration)
}
}), "GetBucketInventoryConfigurationOutputFilterSensitiveLog");
var GetObjectOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }
}), "GetObjectOutputFilterSensitiveLog");
var GetObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }
}), "GetObjectRequestFilterSensitiveLog");
var GetObjectAttributesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }
}), "GetObjectAttributesRequestFilterSensitiveLog");
var GetObjectTorrentOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj
}), "GetObjectTorrentOutputFilterSensitiveLog");
var HeadObjectOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }
}), "HeadObjectOutputFilterSensitiveLog");
var HeadObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }
}), "HeadObjectRequestFilterSensitiveLog");
var ListBucketInventoryConfigurationsOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.InventoryConfigurationList && {
InventoryConfigurationList: obj.InventoryConfigurationList.map(
(item) => InventoryConfigurationFilterSensitiveLog(item)
)
}
}), "ListBucketInventoryConfigurationsOutputFilterSensitiveLog");
var ListPartsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }
}), "ListPartsRequestFilterSensitiveLog");
// src/protocols/Aws_restXml.ts
var import_core = __nccwpck_require__(59963);
var import_xml_builder = __nccwpck_require__(42329);
var import_core2 = __nccwpck_require__(55829);
var import_protocol_http = __nccwpck_require__(64418);
// src/models/models_1.ts
var MFADelete = {
Disabled: "Disabled",
Enabled: "Enabled"
};
var EncryptionTypeMismatch = class _EncryptionTypeMismatch extends S3ServiceException {
static {
__name(this, "EncryptionTypeMismatch");
}
name = "EncryptionTypeMismatch";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "EncryptionTypeMismatch",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _EncryptionTypeMismatch.prototype);
}
};
var InvalidRequest = class _InvalidRequest extends S3ServiceException {
static {
__name(this, "InvalidRequest");
}
name = "InvalidRequest";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidRequest",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidRequest.prototype);
}
};
var InvalidWriteOffset = class _InvalidWriteOffset extends S3ServiceException {
static {
__name(this, "InvalidWriteOffset");
}
name = "InvalidWriteOffset";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidWriteOffset",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidWriteOffset.prototype);
}
};
var TooManyParts = class _TooManyParts extends S3ServiceException {
static {
__name(this, "TooManyParts");
}
name = "TooManyParts";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "TooManyParts",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TooManyParts.prototype);
}
};
var ObjectAlreadyInActiveTierError = class _ObjectAlreadyInActiveTierError extends S3ServiceException {
static {
__name(this, "ObjectAlreadyInActiveTierError");
}
name = "ObjectAlreadyInActiveTierError";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ObjectAlreadyInActiveTierError",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ObjectAlreadyInActiveTierError.prototype);
}
};
var Tier = {
Bulk: "Bulk",
Expedited: "Expedited",
Standard: "Standard"
};
var ExpressionType = {
SQL: "SQL"
};
var CompressionType = {
BZIP2: "BZIP2",
GZIP: "GZIP",
NONE: "NONE"
};
var FileHeaderInfo = {
IGNORE: "IGNORE",
NONE: "NONE",
USE: "USE"
};
var JSONType = {
DOCUMENT: "DOCUMENT",
LINES: "LINES"
};
var QuoteFields = {
ALWAYS: "ALWAYS",
ASNEEDED: "ASNEEDED"
};
var RestoreRequestType = {
SELECT: "SELECT"
};
var SelectObjectContentEventStream;
((SelectObjectContentEventStream3) => {
SelectObjectContentEventStream3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.Records !== void 0) return visitor.Records(value.Records);
if (value.Stats !== void 0) return visitor.Stats(value.Stats);
if (value.Progress !== void 0) return visitor.Progress(value.Progress);
if (value.Cont !== void 0) return visitor.Cont(value.Cont);
if (value.End !== void 0) return visitor.End(value.End);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(SelectObjectContentEventStream || (SelectObjectContentEventStream = {}));
var PutBucketEncryptionRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.ServerSideEncryptionConfiguration && {
ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationFilterSensitiveLog(
obj.ServerSideEncryptionConfiguration
)
}
}), "PutBucketEncryptionRequestFilterSensitiveLog");
var PutBucketInventoryConfigurationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.InventoryConfiguration && {
InventoryConfiguration: InventoryConfigurationFilterSensitiveLog(obj.InventoryConfiguration)
}
}), "PutBucketInventoryConfigurationRequestFilterSensitiveLog");
var PutObjectOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING }
}), "PutObjectOutputFilterSensitiveLog");
var PutObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING }
}), "PutObjectRequestFilterSensitiveLog");
var EncryptionFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.KMSKeyId && { KMSKeyId: import_smithy_client.SENSITIVE_STRING }
}), "EncryptionFilterSensitiveLog");
var S3LocationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.Encryption && { Encryption: EncryptionFilterSensitiveLog(obj.Encryption) }
}), "S3LocationFilterSensitiveLog");
var OutputLocationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.S3 && { S3: S3LocationFilterSensitiveLog(obj.S3) }
}), "OutputLocationFilterSensitiveLog");
var RestoreRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.OutputLocation && { OutputLocation: OutputLocationFilterSensitiveLog(obj.OutputLocation) }
}), "RestoreRequestFilterSensitiveLog");
var RestoreObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.RestoreRequest && { RestoreRequest: RestoreRequestFilterSensitiveLog(obj.RestoreRequest) }
}), "RestoreObjectRequestFilterSensitiveLog");
var SelectObjectContentEventStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.Records !== void 0) return { Records: obj.Records };
if (obj.Stats !== void 0) return { Stats: obj.Stats };
if (obj.Progress !== void 0) return { Progress: obj.Progress };
if (obj.Cont !== void 0) return { Cont: obj.Cont };
if (obj.End !== void 0) return { End: obj.End };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "SelectObjectContentEventStreamFilterSensitiveLog");
var SelectObjectContentOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.Payload && { Payload: "STREAMING_CONTENT" }
}), "SelectObjectContentOutputFilterSensitiveLog");
var SelectObjectContentRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }
}), "SelectObjectContentRequestFilterSensitiveLog");
var UploadPartOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }
}), "UploadPartOutputFilterSensitiveLog");
var UploadPartRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }
}), "UploadPartRequestFilterSensitiveLog");
var UploadPartCopyOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }
}), "UploadPartCopyOutputFilterSensitiveLog");
var UploadPartCopyRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING },
...obj.CopySourceSSECustomerKey && { CopySourceSSECustomerKey: import_smithy_client.SENSITIVE_STRING }
}), "UploadPartCopyRequestFilterSensitiveLog");
var WriteGetObjectResponseRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }
}), "WriteGetObjectResponseRequestFilterSensitiveLog");
// src/protocols/Aws_restXml.ts
var se_AbortMultipartUploadCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_xaimit]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMIT]), () => (0, import_smithy_client.dateToUtcString)(input[_IMIT]).toString()]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_xi]: [, "AbortMultipartUpload"],
[_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_AbortMultipartUploadCommand");
var se_CompleteMultipartUploadCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xacc]: input[_CCRC],
[_xacc_]: input[_CCRCC],
[_xacc__]: input[_CCRCNVME],
[_xacs]: input[_CSHA],
[_xacs_]: input[_CSHAh],
[_xact]: input[_CT],
[_xamos]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_MOS]), () => input[_MOS].toString()],
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_im]: input[_IM],
[_inm]: input[_INM],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)]
});
let body;
let contents;
if (input.MultipartUpload !== void 0) {
contents = se_CompletedMultipartUpload(input.MultipartUpload, context);
contents = contents.n("CompleteMultipartUpload");
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("POST").h(headers).q(query).b(body);
return b.build();
}, "se_CompleteMultipartUploadCommand");
var se_CopyObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaa]: input[_ACL],
[_cc]: input[_CC],
[_xaca]: input[_CA],
[_cd]: input[_CD],
[_ce]: input[_CE],
[_cl]: input[_CL],
[_ct]: input[_CTo],
[_xacs__]: input[_CS],
[_xacsim]: input[_CSIM],
[_xacsims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIMS]).toString()],
[_xacsinm]: input[_CSINM],
[_xacsius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIUS]).toString()],
[_e]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
[_xagfc]: input[_GFC],
[_xagr]: input[_GR],
[_xagra]: input[_GRACP],
[_xagwa]: input[_GWACP],
[_xamd]: input[_MD],
[_xatd]: input[_TD],
[_xasse]: input[_SSE],
[_xasc]: input[_SC],
[_xawrl]: input[_WRL],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xasseakki]: input[_SSEKMSKI],
[_xassec]: input[_SSEKMSEC],
[_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()],
[_xacssseca]: input[_CSSSECA],
[_xacssseck]: input[_CSSSECK],
[_xacssseckm]: input[_CSSSECKMD],
[_xarp]: input[_RP],
[_xat]: input[_T],
[_xaolm]: input[_OLM],
[_xaolrud]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()],
[_xaollh]: input[_OLLHS],
[_xaebo]: input[_EBO],
[_xasebo]: input[_ESBO],
...input.Metadata !== void 0 && Object.keys(input.Metadata).reduce((acc, suffix) => {
acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
return acc;
}, {})
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_xi]: [, "CopyObject"]
});
let body;
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_CopyObjectCommand");
var se_CreateBucketCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaa]: input[_ACL],
[_xagfc]: input[_GFC],
[_xagr]: input[_GR],
[_xagra]: input[_GRACP],
[_xagw]: input[_GW],
[_xagwa]: input[_GWACP],
[_xabole]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLEFB]), () => input[_OLEFB].toString()],
[_xaoo]: input[_OO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
let body;
let contents;
if (input.CreateBucketConfiguration !== void 0) {
contents = se_CreateBucketConfiguration(input.CreateBucketConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).b(body);
return b.build();
}, "se_CreateBucketCommand");
var se_CreateBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_mT]: [, ""]
});
let body;
let contents;
if (input.MetadataTableConfiguration !== void 0) {
contents = se_MetadataTableConfiguration(input.MetadataTableConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("POST").h(headers).q(query).b(body);
return b.build();
}, "se_CreateBucketMetadataTableConfigurationCommand");
var se_CreateMultipartUploadCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaa]: input[_ACL],
[_cc]: input[_CC],
[_cd]: input[_CD],
[_ce]: input[_CE],
[_cl]: input[_CL],
[_ct]: input[_CTo],
[_e]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
[_xagfc]: input[_GFC],
[_xagr]: input[_GR],
[_xagra]: input[_GRACP],
[_xagwa]: input[_GWACP],
[_xasse]: input[_SSE],
[_xasc]: input[_SC],
[_xawrl]: input[_WRL],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xasseakki]: input[_SSEKMSKI],
[_xassec]: input[_SSEKMSEC],
[_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()],
[_xarp]: input[_RP],
[_xat]: input[_T],
[_xaolm]: input[_OLM],
[_xaolrud]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()],
[_xaollh]: input[_OLLHS],
[_xaebo]: input[_EBO],
[_xaca]: input[_CA],
[_xact]: input[_CT],
...input.Metadata !== void 0 && Object.keys(input.Metadata).reduce((acc, suffix) => {
acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
return acc;
}, {})
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_u]: [, ""]
});
let body;
b.m("POST").h(headers).q(query).b(body);
return b.build();
}, "se_CreateMultipartUploadCommand");
var se_CreateSessionCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xacsm]: input[_SM],
[_xasse]: input[_SSE],
[_xasseakki]: input[_SSEKMSKI],
[_xassec]: input[_SSEKMSEC],
[_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_s]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_CreateSessionCommand");
var se_DeleteBucketCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
let body;
b.m("DELETE").h(headers).b(body);
return b.build();
}, "se_DeleteBucketCommand");
var se_DeleteBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_a]: [, ""],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketAnalyticsConfigurationCommand");
var se_DeleteBucketCorsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_c]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketCorsCommand");
var se_DeleteBucketEncryptionCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_en]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketEncryptionCommand");
var se_DeleteBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = {};
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_it]: [, ""],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketIntelligentTieringConfigurationCommand");
var se_DeleteBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_in]: [, ""],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketInventoryConfigurationCommand");
var se_DeleteBucketLifecycleCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_l]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketLifecycleCommand");
var se_DeleteBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_mT]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketMetadataTableConfigurationCommand");
var se_DeleteBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_m]: [, ""],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketMetricsConfigurationCommand");
var se_DeleteBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_oC]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketOwnershipControlsCommand");
var se_DeleteBucketPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_p]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketPolicyCommand");
var se_DeleteBucketReplicationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_r]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketReplicationCommand");
var se_DeleteBucketTaggingCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_t]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketTaggingCommand");
var se_DeleteBucketWebsiteCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_w]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketWebsiteCommand");
var se_DeleteObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xam]: input[_MFA],
[_xarp]: input[_RP],
[_xabgr]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BGR]), () => input[_BGR].toString()],
[_xaebo]: input[_EBO],
[_im]: input[_IM],
[_xaimlmt]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMLMT]), () => (0, import_smithy_client.dateToUtcString)(input[_IMLMT]).toString()],
[_xaims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMS]), () => input[_IMS].toString()]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_xi]: [, "DeleteObject"],
[_vI]: [, input[_VI]]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteObjectCommand");
var se_DeleteObjectsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xam]: input[_MFA],
[_xarp]: input[_RP],
[_xabgr]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BGR]), () => input[_BGR].toString()],
[_xaebo]: input[_EBO],
[_xasca]: input[_CA]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_d]: [, ""]
});
let body;
let contents;
if (input.Delete !== void 0) {
contents = se_Delete(input.Delete, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("POST").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteObjectsCommand");
var se_DeleteObjectTaggingCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_t]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteObjectTaggingCommand");
var se_DeletePublicAccessBlockCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_pAB]: [, ""]
});
let body;
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeletePublicAccessBlockCommand");
var se_GetBucketAccelerateConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO],
[_xarp]: input[_RP]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_ac]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketAccelerateConfigurationCommand");
var se_GetBucketAclCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_acl]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketAclCommand");
var se_GetBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_a]: [, ""],
[_xi]: [, "GetBucketAnalyticsConfiguration"],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketAnalyticsConfigurationCommand");
var se_GetBucketCorsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_c]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketCorsCommand");
var se_GetBucketEncryptionCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_en]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketEncryptionCommand");
var se_GetBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = {};
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_it]: [, ""],
[_xi]: [, "GetBucketIntelligentTieringConfiguration"],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketIntelligentTieringConfigurationCommand");
var se_GetBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_in]: [, ""],
[_xi]: [, "GetBucketInventoryConfiguration"],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketInventoryConfigurationCommand");
var se_GetBucketLifecycleConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_l]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketLifecycleConfigurationCommand");
var se_GetBucketLocationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_lo]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketLocationCommand");
var se_GetBucketLoggingCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_log]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketLoggingCommand");
var se_GetBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_mT]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketMetadataTableConfigurationCommand");
var se_GetBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_m]: [, ""],
[_xi]: [, "GetBucketMetricsConfiguration"],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketMetricsConfigurationCommand");
var se_GetBucketNotificationConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_n]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketNotificationConfigurationCommand");
var se_GetBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_oC]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketOwnershipControlsCommand");
var se_GetBucketPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_p]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketPolicyCommand");
var se_GetBucketPolicyStatusCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_pS]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketPolicyStatusCommand");
var se_GetBucketReplicationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_r]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketReplicationCommand");
var se_GetBucketRequestPaymentCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_rP]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketRequestPaymentCommand");
var se_GetBucketTaggingCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_t]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketTaggingCommand");
var se_GetBucketVersioningCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_v]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketVersioningCommand");
var se_GetBucketWebsiteCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_w]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketWebsiteCommand");
var se_GetObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_im]: input[_IM],
[_ims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMSf]), () => (0, import_smithy_client.dateToUtcString)(input[_IMSf]).toString()],
[_inm]: input[_INM],
[_ius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IUS]), () => (0, import_smithy_client.dateToUtcString)(input[_IUS]).toString()],
[_ra]: input[_R],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_xacm]: input[_CM]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_xi]: [, "GetObject"],
[_rcc]: [, input[_RCC]],
[_rcd]: [, input[_RCD]],
[_rce]: [, input[_RCE]],
[_rcl]: [, input[_RCL]],
[_rct]: [, input[_RCT]],
[_re]: [() => input.ResponseExpires !== void 0, () => (0, import_smithy_client.dateToUtcString)(input[_RE]).toString()],
[_vI]: [, input[_VI]],
[_pN]: [() => input.PartNumber !== void 0, () => input[_PN].toString()]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetObjectCommand");
var se_GetObjectAclCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_acl]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetObjectAclCommand");
var se_GetObjectAttributesCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xamp]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_MP]), () => input[_MP].toString()],
[_xapnm]: input[_PNM],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_xaoa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OA]), () => (input[_OA] || []).map(import_smithy_client.quoteHeader).join(", ")]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_at]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetObjectAttributesCommand");
var se_GetObjectLegalHoldCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_lh]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetObjectLegalHoldCommand");
var se_GetObjectLockConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_ol]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetObjectLockConfigurationCommand");
var se_GetObjectRetentionCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_ret]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetObjectRetentionCommand");
var se_GetObjectTaggingCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO],
[_xarp]: input[_RP]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_t]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetObjectTaggingCommand");
var se_GetObjectTorrentCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_to]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetObjectTorrentCommand");
var se_GetPublicAccessBlockCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_pAB]: [, ""]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetPublicAccessBlockCommand");
var se_HeadBucketCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
let body;
b.m("HEAD").h(headers).b(body);
return b.build();
}, "se_HeadBucketCommand");
var se_HeadObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_im]: input[_IM],
[_ims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMSf]), () => (0, import_smithy_client.dateToUtcString)(input[_IMSf]).toString()],
[_inm]: input[_INM],
[_ius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IUS]), () => (0, import_smithy_client.dateToUtcString)(input[_IUS]).toString()],
[_ra]: input[_R],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_xacm]: input[_CM]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_rcc]: [, input[_RCC]],
[_rcd]: [, input[_RCD]],
[_rce]: [, input[_RCE]],
[_rcl]: [, input[_RCL]],
[_rct]: [, input[_RCT]],
[_re]: [() => input.ResponseExpires !== void 0, () => (0, import_smithy_client.dateToUtcString)(input[_RE]).toString()],
[_vI]: [, input[_VI]],
[_pN]: [() => input.PartNumber !== void 0, () => input[_PN].toString()]
});
let body;
b.m("HEAD").h(headers).q(query).b(body);
return b.build();
}, "se_HeadObjectCommand");
var se_ListBucketAnalyticsConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_a]: [, ""],
[_xi]: [, "ListBucketAnalyticsConfigurations"],
[_ct_]: [, input[_CTon]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketAnalyticsConfigurationsCommand");
var se_ListBucketIntelligentTieringConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = {};
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_it]: [, ""],
[_xi]: [, "ListBucketIntelligentTieringConfigurations"],
[_ct_]: [, input[_CTon]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketIntelligentTieringConfigurationsCommand");
var se_ListBucketInventoryConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_in]: [, ""],
[_xi]: [, "ListBucketInventoryConfigurations"],
[_ct_]: [, input[_CTon]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketInventoryConfigurationsCommand");
var se_ListBucketMetricsConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_m]: [, ""],
[_xi]: [, "ListBucketMetricsConfigurations"],
[_ct_]: [, input[_CTon]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketMetricsConfigurationsCommand");
var se_ListBucketsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = {};
b.bp("/");
const query = (0, import_smithy_client.map)({
[_xi]: [, "ListBuckets"],
[_mb]: [() => input.MaxBuckets !== void 0, () => input[_MB].toString()],
[_ct_]: [, input[_CTon]],
[_pr]: [, input[_P]],
[_br]: [, input[_BR]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketsCommand");
var se_ListDirectoryBucketsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = {};
b.bp("/");
const query = (0, import_smithy_client.map)({
[_xi]: [, "ListDirectoryBuckets"],
[_ct_]: [, input[_CTon]],
[_mdb]: [() => input.MaxDirectoryBuckets !== void 0, () => input[_MDB].toString()]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListDirectoryBucketsCommand");
var se_ListMultipartUploadsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO],
[_xarp]: input[_RP]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_u]: [, ""],
[_de]: [, input[_D]],
[_et]: [, input[_ET]],
[_km]: [, input[_KM]],
[_mu]: [() => input.MaxUploads !== void 0, () => input[_MU].toString()],
[_pr]: [, input[_P]],
[_uim]: [, input[_UIM]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListMultipartUploadsCommand");
var se_ListObjectsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_de]: [, input[_D]],
[_et]: [, input[_ET]],
[_ma]: [, input[_M]],
[_mk]: [() => input.MaxKeys !== void 0, () => input[_MK].toString()],
[_pr]: [, input[_P]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListObjectsCommand");
var se_ListObjectsV2Command = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_lt]: [, "2"],
[_de]: [, input[_D]],
[_et]: [, input[_ET]],
[_mk]: [() => input.MaxKeys !== void 0, () => input[_MK].toString()],
[_pr]: [, input[_P]],
[_ct_]: [, input[_CTon]],
[_fo]: [() => input.FetchOwner !== void 0, () => input[_FO].toString()],
[_sa]: [, input[_SA]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListObjectsV2Command");
var se_ListObjectVersionsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO],
[_xarp]: input[_RP],
[_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_ver]: [, ""],
[_de]: [, input[_D]],
[_et]: [, input[_ET]],
[_km]: [, input[_KM]],
[_mk]: [() => input.MaxKeys !== void 0, () => input[_MK].toString()],
[_pr]: [, input[_P]],
[_vim]: [, input[_VIM]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListObjectVersionsCommand");
var se_ListPartsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_xi]: [, "ListParts"],
[_mp]: [() => input.MaxParts !== void 0, () => input[_MP].toString()],
[_pnm]: [, input[_PNM]],
[_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListPartsCommand");
var se_PutBucketAccelerateConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO],
[_xasca]: input[_CA]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_ac]: [, ""]
});
let body;
let contents;
if (input.AccelerateConfiguration !== void 0) {
contents = se_AccelerateConfiguration(input.AccelerateConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketAccelerateConfigurationCommand");
var se_PutBucketAclCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaa]: input[_ACL],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xagfc]: input[_GFC],
[_xagr]: input[_GR],
[_xagra]: input[_GRACP],
[_xagw]: input[_GW],
[_xagwa]: input[_GWACP],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_acl]: [, ""]
});
let body;
let contents;
if (input.AccessControlPolicy !== void 0) {
contents = se_AccessControlPolicy(input.AccessControlPolicy, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketAclCommand");
var se_PutBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_a]: [, ""],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
let contents;
if (input.AnalyticsConfiguration !== void 0) {
contents = se_AnalyticsConfiguration(input.AnalyticsConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketAnalyticsConfigurationCommand");
var se_PutBucketCorsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_c]: [, ""]
});
let body;
let contents;
if (input.CORSConfiguration !== void 0) {
contents = se_CORSConfiguration(input.CORSConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketCorsCommand");
var se_PutBucketEncryptionCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_en]: [, ""]
});
let body;
let contents;
if (input.ServerSideEncryptionConfiguration !== void 0) {
contents = se_ServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketEncryptionCommand");
var se_PutBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = {
"content-type": "application/xml"
};
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_it]: [, ""],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
let contents;
if (input.IntelligentTieringConfiguration !== void 0) {
contents = se_IntelligentTieringConfiguration(input.IntelligentTieringConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketIntelligentTieringConfigurationCommand");
var se_PutBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_in]: [, ""],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
let contents;
if (input.InventoryConfiguration !== void 0) {
contents = se_InventoryConfiguration(input.InventoryConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketInventoryConfigurationCommand");
var se_PutBucketLifecycleConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xasca]: input[_CA],
[_xaebo]: input[_EBO],
[_xatdmos]: input[_TDMOS]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_l]: [, ""]
});
let body;
let contents;
if (input.LifecycleConfiguration !== void 0) {
contents = se_BucketLifecycleConfiguration(input.LifecycleConfiguration, context);
contents = contents.n("LifecycleConfiguration");
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketLifecycleConfigurationCommand");
var se_PutBucketLoggingCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_log]: [, ""]
});
let body;
let contents;
if (input.BucketLoggingStatus !== void 0) {
contents = se_BucketLoggingStatus(input.BucketLoggingStatus, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketLoggingCommand");
var se_PutBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_m]: [, ""],
[_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)]
});
let body;
let contents;
if (input.MetricsConfiguration !== void 0) {
contents = se_MetricsConfiguration(input.MetricsConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketMetricsConfigurationCommand");
var se_PutBucketNotificationConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO],
[_xasdv]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_SDV]), () => input[_SDV].toString()]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_n]: [, ""]
});
let body;
let contents;
if (input.NotificationConfiguration !== void 0) {
contents = se_NotificationConfiguration(input.NotificationConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketNotificationConfigurationCommand");
var se_PutBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_oC]: [, ""]
});
let body;
let contents;
if (input.OwnershipControls !== void 0) {
contents = se_OwnershipControls(input.OwnershipControls, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketOwnershipControlsCommand");
var se_PutBucketPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "text/plain",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xacrsba]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CRSBA]), () => input[_CRSBA].toString()],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_p]: [, ""]
});
let body;
let contents;
if (input.Policy !== void 0) {
contents = input.Policy;
body = contents;
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketPolicyCommand");
var se_PutBucketReplicationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xabolt]: input[_To],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_r]: [, ""]
});
let body;
let contents;
if (input.ReplicationConfiguration !== void 0) {
contents = se_ReplicationConfiguration(input.ReplicationConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketReplicationCommand");
var se_PutBucketRequestPaymentCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_rP]: [, ""]
});
let body;
let contents;
if (input.RequestPaymentConfiguration !== void 0) {
contents = se_RequestPaymentConfiguration(input.RequestPaymentConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketRequestPaymentCommand");
var se_PutBucketTaggingCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_t]: [, ""]
});
let body;
let contents;
if (input.Tagging !== void 0) {
contents = se_Tagging(input.Tagging, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketTaggingCommand");
var se_PutBucketVersioningCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xam]: input[_MFA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_v]: [, ""]
});
let body;
let contents;
if (input.VersioningConfiguration !== void 0) {
contents = se_VersioningConfiguration(input.VersioningConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketVersioningCommand");
var se_PutBucketWebsiteCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_w]: [, ""]
});
let body;
let contents;
if (input.WebsiteConfiguration !== void 0) {
contents = se_WebsiteConfiguration(input.WebsiteConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutBucketWebsiteCommand");
var se_PutObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_ct]: input[_CTo] || "application/octet-stream",
[_xaa]: input[_ACL],
[_cc]: input[_CC],
[_cd]: input[_CD],
[_ce]: input[_CE],
[_cl]: input[_CL],
[_cl_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CLo]), () => input[_CLo].toString()],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xacc]: input[_CCRC],
[_xacc_]: input[_CCRCC],
[_xacc__]: input[_CCRCNVME],
[_xacs]: input[_CSHA],
[_xacs_]: input[_CSHAh],
[_e]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
[_im]: input[_IM],
[_inm]: input[_INM],
[_xagfc]: input[_GFC],
[_xagr]: input[_GR],
[_xagra]: input[_GRACP],
[_xagwa]: input[_GWACP],
[_xawob]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_WOB]), () => input[_WOB].toString()],
[_xasse]: input[_SSE],
[_xasc]: input[_SC],
[_xawrl]: input[_WRL],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xasseakki]: input[_SSEKMSKI],
[_xassec]: input[_SSEKMSEC],
[_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()],
[_xarp]: input[_RP],
[_xat]: input[_T],
[_xaolm]: input[_OLM],
[_xaolrud]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()],
[_xaollh]: input[_OLLHS],
[_xaebo]: input[_EBO],
...input.Metadata !== void 0 && Object.keys(input.Metadata).reduce((acc, suffix) => {
acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
return acc;
}, {})
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_xi]: [, "PutObject"]
});
let body;
let contents;
if (input.Body !== void 0) {
contents = input.Body;
body = contents;
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutObjectCommand");
var se_PutObjectAclCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaa]: input[_ACL],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xagfc]: input[_GFC],
[_xagr]: input[_GR],
[_xagra]: input[_GRACP],
[_xagw]: input[_GW],
[_xagwa]: input[_GWACP],
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_acl]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
let contents;
if (input.AccessControlPolicy !== void 0) {
contents = se_AccessControlPolicy(input.AccessControlPolicy, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutObjectAclCommand");
var se_PutObjectLegalHoldCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xarp]: input[_RP],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_lh]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
let contents;
if (input.LegalHold !== void 0) {
contents = se_ObjectLockLegalHold(input.LegalHold, context);
contents = contents.n("LegalHold");
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutObjectLegalHoldCommand");
var se_PutObjectLockConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xarp]: input[_RP],
[_xabolt]: input[_To],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_ol]: [, ""]
});
let body;
let contents;
if (input.ObjectLockConfiguration !== void 0) {
contents = se_ObjectLockConfiguration(input.ObjectLockConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutObjectLockConfigurationCommand");
var se_PutObjectRetentionCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xarp]: input[_RP],
[_xabgr]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BGR]), () => input[_BGR].toString()],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_ret]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
let contents;
if (input.Retention !== void 0) {
contents = se_ObjectLockRetention(input.Retention, context);
contents = contents.n("Retention");
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutObjectRetentionCommand");
var se_PutObjectTaggingCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO],
[_xarp]: input[_RP]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_t]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
let contents;
if (input.Tagging !== void 0) {
contents = se_Tagging(input.Tagging, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutObjectTaggingCommand");
var se_PutPublicAccessBlockCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_pAB]: [, ""]
});
let body;
let contents;
if (input.PublicAccessBlockConfiguration !== void 0) {
contents = se_PublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutPublicAccessBlockCommand");
var se_RestoreObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xarp]: input[_RP],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_res]: [, ""],
[_vI]: [, input[_VI]]
});
let body;
let contents;
if (input.RestoreRequest !== void 0) {
contents = se_RestoreRequest(input.RestoreRequest, context);
body = _ve;
contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
body += contents.toString();
}
b.m("POST").h(headers).q(query).b(body);
return b.build();
}, "se_RestoreObjectCommand");
var se_SelectObjectContentCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_se]: [, ""],
[_st]: [, "2"]
});
let body;
body = _ve;
const bn = new import_xml_builder.XmlNode(_SOCR);
bn.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
bn.cc(input, _Ex);
bn.cc(input, _ETx);
if (input[_IS] != null) {
bn.c(se_InputSerialization(input[_IS], context).n(_IS));
}
if (input[_OS] != null) {
bn.c(se_OutputSerialization(input[_OS], context).n(_OS));
}
if (input[_RPe] != null) {
bn.c(se_RequestProgress(input[_RPe], context).n(_RPe));
}
if (input[_SR] != null) {
bn.c(se_ScanRange(input[_SR], context).n(_SR));
}
body += bn.toString();
b.m("POST").h(headers).q(query).b(body);
return b.build();
}, "se_SelectObjectContentCommand");
var se_UploadPartCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/octet-stream",
[_cl_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CLo]), () => input[_CLo].toString()],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xacc]: input[_CCRC],
[_xacc_]: input[_CCRCC],
[_xacc__]: input[_CCRCNVME],
[_xacs]: input[_CSHA],
[_xacs_]: input[_CSHAh],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_xi]: [, "UploadPart"],
[_pN]: [(0, import_smithy_client.expectNonNull)(input.PartNumber, `PartNumber`) != null, () => input[_PN].toString()],
[_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)]
});
let body;
let contents;
if (input.Body !== void 0) {
contents = input.Body;
body = contents;
}
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_UploadPartCommand");
var se_UploadPartCopyCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xacs__]: input[_CS],
[_xacsim]: input[_CSIM],
[_xacsims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIMS]).toString()],
[_xacsinm]: input[_CSINM],
[_xacsius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIUS]).toString()],
[_xacsr]: input[_CSR],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xacssseca]: input[_CSSSECA],
[_xacssseck]: input[_CSSSECK],
[_xacssseckm]: input[_CSSSECKMD],
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_xasebo]: input[_ESBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_xi]: [, "UploadPartCopy"],
[_pN]: [(0, import_smithy_client.expectNonNull)(input.PartNumber, `PartNumber`) != null, () => input[_PN].toString()],
[_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)]
});
let body;
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_UploadPartCopyCommand");
var se_WriteGetObjectResponseCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core2.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
"content-type": "application/octet-stream",
[_xarr]: input[_RR],
[_xart]: input[_RT],
[_xafs]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_SCt]), () => input[_SCt].toString()],
[_xafec]: input[_EC],
[_xafem]: input[_EM],
[_xafhar]: input[_AR],
[_xafhcc]: input[_CC],
[_xafhcd]: input[_CD],
[_xafhce]: input[_CE],
[_xafhcl]: input[_CL],
[_cl_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CLo]), () => input[_CLo].toString()],
[_xafhcr]: input[_CR],
[_xafhct]: input[_CTo],
[_xafhxacc]: input[_CCRC],
[_xafhxacc_]: input[_CCRCC],
[_xafhxacc__]: input[_CCRCNVME],
[_xafhxacs]: input[_CSHA],
[_xafhxacs_]: input[_CSHAh],
[_xafhxadm]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_DM]), () => input[_DM].toString()],
[_xafhe]: input[_ETa],
[_xafhe_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
[_xafhxae]: input[_Exp],
[_xafhlm]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_LM]), () => (0, import_smithy_client.dateToUtcString)(input[_LM]).toString()],
[_xafhxamm]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_MM]), () => input[_MM].toString()],
[_xafhxaolm]: input[_OLM],
[_xafhxaollh]: input[_OLLHS],
[_xafhxaolrud]: [
() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]),
() => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()
],
[_xafhxampc]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_PC]), () => input[_PC].toString()],
[_xafhxars]: input[_RS],
[_xafhxarc]: input[_RC],
[_xafhxar]: input[_Re],
[_xafhxasse]: input[_SSE],
[_xafhxasseca]: input[_SSECA],
[_xafhxasseakki]: input[_SSEKMSKI],
[_xafhxasseckm]: input[_SSECKMD],
[_xafhxasc]: input[_SC],
[_xafhxatc]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_TC]), () => input[_TC].toString()],
[_xafhxavi]: input[_VI],
[_xafhxassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()],
...input.Metadata !== void 0 && Object.keys(input.Metadata).reduce((acc, suffix) => {
acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
return acc;
}, {})
});
b.bp("/WriteGetObjectResponse");
let body;
let contents;
if (input.Body !== void 0) {
contents = input.Body;
body = contents;
}
let { hostname: resolvedHostname } = await context.endpoint();
if (context.disableHostPrefix !== true) {
resolvedHostname = "{RequestRoute}." + resolvedHostname;
if (input.RequestRoute === void 0) {
throw new Error("Empty value provided for input host prefix: RequestRoute.");
}
resolvedHostname = resolvedHostname.replace("{RequestRoute}", input.RequestRoute);
if (!(0, import_protocol_http.isValidHostname)(resolvedHostname)) {
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
}
}
b.hn(resolvedHostname);
b.m("POST").h(headers).b(body);
return b.build();
}, "se_WriteGetObjectResponseCommand");
var de_AbortMultipartUploadCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_AbortMultipartUploadCommand");
var de_CompleteMultipartUploadCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_Exp]: [, output.headers[_xae]],
[_SSE]: [, output.headers[_xasse]],
[_VI]: [, output.headers[_xavi]],
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(data[_B]);
}
if (data[_CCRC] != null) {
contents[_CCRC] = (0, import_smithy_client.expectString)(data[_CCRC]);
}
if (data[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(data[_CCRCC]);
}
if (data[_CCRCNVME] != null) {
contents[_CCRCNVME] = (0, import_smithy_client.expectString)(data[_CCRCNVME]);
}
if (data[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(data[_CSHA]);
}
if (data[_CSHAh] != null) {
contents[_CSHAh] = (0, import_smithy_client.expectString)(data[_CSHAh]);
}
if (data[_CT] != null) {
contents[_CT] = (0, import_smithy_client.expectString)(data[_CT]);
}
if (data[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(data[_ETa]);
}
if (data[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(data[_K]);
}
if (data[_L] != null) {
contents[_L] = (0, import_smithy_client.expectString)(data[_L]);
}
return contents;
}, "de_CompleteMultipartUploadCommand");
var de_CopyObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_Exp]: [, output.headers[_xae]],
[_CSVI]: [, output.headers[_xacsvi]],
[_VI]: [, output.headers[_xavi]],
[_SSE]: [, output.headers[_xasse]],
[_SSECA]: [, output.headers[_xasseca]],
[_SSECKMD]: [, output.headers[_xasseckm]],
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_SSEKMSEC]: [, output.headers[_xassec]],
[_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.CopyObjectResult = de_CopyObjectResult(data, context);
return contents;
}, "de_CopyObjectCommand");
var de_CreateBucketCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_L]: [, output.headers[_lo]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_CreateBucketCommand");
var de_CreateBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_CreateBucketMetadataTableConfigurationCommand");
var de_CreateMultipartUploadCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_AD]: [
() => void 0 !== output.headers[_xaad],
() => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_xaad]))
],
[_ARI]: [, output.headers[_xaari]],
[_SSE]: [, output.headers[_xasse]],
[_SSECA]: [, output.headers[_xasseca]],
[_SSECKMD]: [, output.headers[_xasseckm]],
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_SSEKMSEC]: [, output.headers[_xassec]],
[_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_RC]: [, output.headers[_xarc]],
[_CA]: [, output.headers[_xaca]],
[_CT]: [, output.headers[_xact]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(data[_B]);
}
if (data[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(data[_K]);
}
if (data[_UI] != null) {
contents[_UI] = (0, import_smithy_client.expectString)(data[_UI]);
}
return contents;
}, "de_CreateMultipartUploadCommand");
var de_CreateSessionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_SSE]: [, output.headers[_xasse]],
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_SSEKMSEC]: [, output.headers[_xassec]],
[_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_C] != null) {
contents[_C] = de_SessionCredentials(data[_C], context);
}
return contents;
}, "de_CreateSessionCommand");
var de_DeleteBucketCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketCommand");
var de_DeleteBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketAnalyticsConfigurationCommand");
var de_DeleteBucketCorsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketCorsCommand");
var de_DeleteBucketEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketEncryptionCommand");
var de_DeleteBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketIntelligentTieringConfigurationCommand");
var de_DeleteBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketInventoryConfigurationCommand");
var de_DeleteBucketLifecycleCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketLifecycleCommand");
var de_DeleteBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketMetadataTableConfigurationCommand");
var de_DeleteBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketMetricsConfigurationCommand");
var de_DeleteBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketOwnershipControlsCommand");
var de_DeleteBucketPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketPolicyCommand");
var de_DeleteBucketReplicationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketReplicationCommand");
var de_DeleteBucketTaggingCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketTaggingCommand");
var de_DeleteBucketWebsiteCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketWebsiteCommand");
var de_DeleteObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_DM]: [() => void 0 !== output.headers[_xadm], () => (0, import_smithy_client.parseBoolean)(output.headers[_xadm])],
[_VI]: [, output.headers[_xavi]],
[_RC]: [, output.headers[_xarc]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteObjectCommand");
var de_DeleteObjectsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.Deleted === "") {
contents[_De] = [];
} else if (data[_De] != null) {
contents[_De] = de_DeletedObjects((0, import_smithy_client.getArrayIfSingleItem)(data[_De]), context);
}
if (data.Error === "") {
contents[_Err] = [];
} else if (data[_Er] != null) {
contents[_Err] = de_Errors((0, import_smithy_client.getArrayIfSingleItem)(data[_Er]), context);
}
return contents;
}, "de_DeleteObjectsCommand");
var de_DeleteObjectTaggingCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_VI]: [, output.headers[_xavi]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteObjectTaggingCommand");
var de_DeletePublicAccessBlockCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeletePublicAccessBlockCommand");
var de_GetBucketAccelerateConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(data[_S]);
}
return contents;
}, "de_GetBucketAccelerateConfigurationCommand");
var de_GetBucketAclCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.AccessControlList === "") {
contents[_Gr] = [];
} else if (data[_ACLc] != null && data[_ACLc][_G] != null) {
contents[_Gr] = de_Grants((0, import_smithy_client.getArrayIfSingleItem)(data[_ACLc][_G]), context);
}
if (data[_O] != null) {
contents[_O] = de_Owner(data[_O], context);
}
return contents;
}, "de_GetBucketAclCommand");
var de_GetBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.AnalyticsConfiguration = de_AnalyticsConfiguration(data, context);
return contents;
}, "de_GetBucketAnalyticsConfigurationCommand");
var de_GetBucketCorsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.CORSRule === "") {
contents[_CORSRu] = [];
} else if (data[_CORSR] != null) {
contents[_CORSRu] = de_CORSRules((0, import_smithy_client.getArrayIfSingleItem)(data[_CORSR]), context);
}
return contents;
}, "de_GetBucketCorsCommand");
var de_GetBucketEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.ServerSideEncryptionConfiguration = de_ServerSideEncryptionConfiguration(data, context);
return contents;
}, "de_GetBucketEncryptionCommand");
var de_GetBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.IntelligentTieringConfiguration = de_IntelligentTieringConfiguration(data, context);
return contents;
}, "de_GetBucketIntelligentTieringConfigurationCommand");
var de_GetBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.InventoryConfiguration = de_InventoryConfiguration(data, context);
return contents;
}, "de_GetBucketInventoryConfigurationCommand");
var de_GetBucketLifecycleConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_TDMOS]: [, output.headers[_xatdmos]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.Rule === "") {
contents[_Rul] = [];
} else if (data[_Ru] != null) {
contents[_Rul] = de_LifecycleRules((0, import_smithy_client.getArrayIfSingleItem)(data[_Ru]), context);
}
return contents;
}, "de_GetBucketLifecycleConfigurationCommand");
var de_GetBucketLocationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_LC] != null) {
contents[_LC] = (0, import_smithy_client.expectString)(data[_LC]);
}
return contents;
}, "de_GetBucketLocationCommand");
var de_GetBucketLoggingCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_LE] != null) {
contents[_LE] = de_LoggingEnabled(data[_LE], context);
}
return contents;
}, "de_GetBucketLoggingCommand");
var de_GetBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.GetBucketMetadataTableConfigurationResult = de_GetBucketMetadataTableConfigurationResult(data, context);
return contents;
}, "de_GetBucketMetadataTableConfigurationCommand");
var de_GetBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.MetricsConfiguration = de_MetricsConfiguration(data, context);
return contents;
}, "de_GetBucketMetricsConfigurationCommand");
var de_GetBucketNotificationConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_EBC] != null) {
contents[_EBC] = de_EventBridgeConfiguration(data[_EBC], context);
}
if (data.CloudFunctionConfiguration === "") {
contents[_LFC] = [];
} else if (data[_CFC] != null) {
contents[_LFC] = de_LambdaFunctionConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_CFC]), context);
}
if (data.QueueConfiguration === "") {
contents[_QCu] = [];
} else if (data[_QC] != null) {
contents[_QCu] = de_QueueConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_QC]), context);
}
if (data.TopicConfiguration === "") {
contents[_TCop] = [];
} else if (data[_TCo] != null) {
contents[_TCop] = de_TopicConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_TCo]), context);
}
return contents;
}, "de_GetBucketNotificationConfigurationCommand");
var de_GetBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.OwnershipControls = de_OwnershipControls(data, context);
return contents;
}, "de_GetBucketOwnershipControlsCommand");
var de_GetBucketPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = await collectBodyString(output.body, context);
contents.Policy = (0, import_smithy_client.expectString)(data);
return contents;
}, "de_GetBucketPolicyCommand");
var de_GetBucketPolicyStatusCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.PolicyStatus = de_PolicyStatus(data, context);
return contents;
}, "de_GetBucketPolicyStatusCommand");
var de_GetBucketReplicationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.ReplicationConfiguration = de_ReplicationConfiguration(data, context);
return contents;
}, "de_GetBucketReplicationCommand");
var de_GetBucketRequestPaymentCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_Pa] != null) {
contents[_Pa] = (0, import_smithy_client.expectString)(data[_Pa]);
}
return contents;
}, "de_GetBucketRequestPaymentCommand");
var de_GetBucketTaggingCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.TagSet === "") {
contents[_TS] = [];
} else if (data[_TS] != null && data[_TS][_Ta] != null) {
contents[_TS] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(data[_TS][_Ta]), context);
}
return contents;
}, "de_GetBucketTaggingCommand");
var de_GetBucketVersioningCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_MDf] != null) {
contents[_MFAD] = (0, import_smithy_client.expectString)(data[_MDf]);
}
if (data[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(data[_S]);
}
return contents;
}, "de_GetBucketVersioningCommand");
var de_GetBucketWebsiteCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_ED] != null) {
contents[_ED] = de_ErrorDocument(data[_ED], context);
}
if (data[_ID] != null) {
contents[_ID] = de_IndexDocument(data[_ID], context);
}
if (data[_RART] != null) {
contents[_RART] = de_RedirectAllRequestsTo(data[_RART], context);
}
if (data.RoutingRules === "") {
contents[_RRo] = [];
} else if (data[_RRo] != null && data[_RRo][_RRou] != null) {
contents[_RRo] = de_RoutingRules((0, import_smithy_client.getArrayIfSingleItem)(data[_RRo][_RRou]), context);
}
return contents;
}, "de_GetBucketWebsiteCommand");
var de_GetObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_DM]: [() => void 0 !== output.headers[_xadm], () => (0, import_smithy_client.parseBoolean)(output.headers[_xadm])],
[_AR]: [, output.headers[_ar]],
[_Exp]: [, output.headers[_xae]],
[_Re]: [, output.headers[_xar]],
[_LM]: [() => void 0 !== output.headers[_lm], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_lm]))],
[_CLo]: [() => void 0 !== output.headers[_cl_], () => (0, import_smithy_client.strictParseLong)(output.headers[_cl_])],
[_ETa]: [, output.headers[_eta]],
[_CCRC]: [, output.headers[_xacc]],
[_CCRCC]: [, output.headers[_xacc_]],
[_CCRCNVME]: [, output.headers[_xacc__]],
[_CSHA]: [, output.headers[_xacs]],
[_CSHAh]: [, output.headers[_xacs_]],
[_CT]: [, output.headers[_xact]],
[_MM]: [() => void 0 !== output.headers[_xamm], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xamm])],
[_VI]: [, output.headers[_xavi]],
[_CC]: [, output.headers[_cc]],
[_CD]: [, output.headers[_cd]],
[_CE]: [, output.headers[_ce]],
[_CL]: [, output.headers[_cl]],
[_CR]: [, output.headers[_cr]],
[_CTo]: [, output.headers[_ct]],
[_E]: [() => void 0 !== output.headers[_e], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_e]))],
[_ES]: [, output.headers[_ex]],
[_WRL]: [, output.headers[_xawrl]],
[_SSE]: [, output.headers[_xasse]],
[_SSECA]: [, output.headers[_xasseca]],
[_SSECKMD]: [, output.headers[_xasseckm]],
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_SC]: [, output.headers[_xasc]],
[_RC]: [, output.headers[_xarc]],
[_RS]: [, output.headers[_xars]],
[_PC]: [() => void 0 !== output.headers[_xampc], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xampc])],
[_TC]: [() => void 0 !== output.headers[_xatc], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xatc])],
[_OLM]: [, output.headers[_xaolm]],
[_OLRUD]: [
() => void 0 !== output.headers[_xaolrud],
() => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output.headers[_xaolrud]))
],
[_OLLHS]: [, output.headers[_xaollh]],
Metadata: [
,
Object.keys(output.headers).filter((header) => header.startsWith("x-amz-meta-")).reduce((acc, header) => {
acc[header.substring(11)] = output.headers[header];
return acc;
}, {})
]
});
const data = output.body;
context.sdkStreamMixin(data);
contents.Body = data;
return contents;
}, "de_GetObjectCommand");
var de_GetObjectAclCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.AccessControlList === "") {
contents[_Gr] = [];
} else if (data[_ACLc] != null && data[_ACLc][_G] != null) {
contents[_Gr] = de_Grants((0, import_smithy_client.getArrayIfSingleItem)(data[_ACLc][_G]), context);
}
if (data[_O] != null) {
contents[_O] = de_Owner(data[_O], context);
}
return contents;
}, "de_GetObjectAclCommand");
var de_GetObjectAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_DM]: [() => void 0 !== output.headers[_xadm], () => (0, import_smithy_client.parseBoolean)(output.headers[_xadm])],
[_LM]: [() => void 0 !== output.headers[_lm], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_lm]))],
[_VI]: [, output.headers[_xavi]],
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_Ch] != null) {
contents[_Ch] = de_Checksum(data[_Ch], context);
}
if (data[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(data[_ETa]);
}
if (data[_OP] != null) {
contents[_OP] = de_GetObjectAttributesParts(data[_OP], context);
}
if (data[_OSb] != null) {
contents[_OSb] = (0, import_smithy_client.strictParseLong)(data[_OSb]);
}
if (data[_SC] != null) {
contents[_SC] = (0, import_smithy_client.expectString)(data[_SC]);
}
return contents;
}, "de_GetObjectAttributesCommand");
var de_GetObjectLegalHoldCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.LegalHold = de_ObjectLockLegalHold(data, context);
return contents;
}, "de_GetObjectLegalHoldCommand");
var de_GetObjectLockConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.ObjectLockConfiguration = de_ObjectLockConfiguration(data, context);
return contents;
}, "de_GetObjectLockConfigurationCommand");
var de_GetObjectRetentionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.Retention = de_ObjectLockRetention(data, context);
return contents;
}, "de_GetObjectRetentionCommand");
var de_GetObjectTaggingCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_VI]: [, output.headers[_xavi]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.TagSet === "") {
contents[_TS] = [];
} else if (data[_TS] != null && data[_TS][_Ta] != null) {
contents[_TS] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(data[_TS][_Ta]), context);
}
return contents;
}, "de_GetObjectTaggingCommand");
var de_GetObjectTorrentCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
const data = output.body;
context.sdkStreamMixin(data);
contents.Body = data;
return contents;
}, "de_GetObjectTorrentCommand");
var de_GetPublicAccessBlockCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.PublicAccessBlockConfiguration = de_PublicAccessBlockConfiguration(data, context);
return contents;
}, "de_GetPublicAccessBlockCommand");
var de_HeadBucketCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_BLT]: [, output.headers[_xablt]],
[_BLN]: [, output.headers[_xabln]],
[_BR]: [, output.headers[_xabr]],
[_APA]: [() => void 0 !== output.headers[_xaapa], () => (0, import_smithy_client.parseBoolean)(output.headers[_xaapa])]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_HeadBucketCommand");
var de_HeadObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_DM]: [() => void 0 !== output.headers[_xadm], () => (0, import_smithy_client.parseBoolean)(output.headers[_xadm])],
[_AR]: [, output.headers[_ar]],
[_Exp]: [, output.headers[_xae]],
[_Re]: [, output.headers[_xar]],
[_AS]: [, output.headers[_xaas]],
[_LM]: [() => void 0 !== output.headers[_lm], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_lm]))],
[_CLo]: [() => void 0 !== output.headers[_cl_], () => (0, import_smithy_client.strictParseLong)(output.headers[_cl_])],
[_CCRC]: [, output.headers[_xacc]],
[_CCRCC]: [, output.headers[_xacc_]],
[_CCRCNVME]: [, output.headers[_xacc__]],
[_CSHA]: [, output.headers[_xacs]],
[_CSHAh]: [, output.headers[_xacs_]],
[_CT]: [, output.headers[_xact]],
[_ETa]: [, output.headers[_eta]],
[_MM]: [() => void 0 !== output.headers[_xamm], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xamm])],
[_VI]: [, output.headers[_xavi]],
[_CC]: [, output.headers[_cc]],
[_CD]: [, output.headers[_cd]],
[_CE]: [, output.headers[_ce]],
[_CL]: [, output.headers[_cl]],
[_CTo]: [, output.headers[_ct]],
[_CR]: [, output.headers[_cr]],
[_E]: [() => void 0 !== output.headers[_e], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_e]))],
[_ES]: [, output.headers[_ex]],
[_WRL]: [, output.headers[_xawrl]],
[_SSE]: [, output.headers[_xasse]],
[_SSECA]: [, output.headers[_xasseca]],
[_SSECKMD]: [, output.headers[_xasseckm]],
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_SC]: [, output.headers[_xasc]],
[_RC]: [, output.headers[_xarc]],
[_RS]: [, output.headers[_xars]],
[_PC]: [() => void 0 !== output.headers[_xampc], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xampc])],
[_OLM]: [, output.headers[_xaolm]],
[_OLRUD]: [
() => void 0 !== output.headers[_xaolrud],
() => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output.headers[_xaolrud]))
],
[_OLLHS]: [, output.headers[_xaollh]],
Metadata: [
,
Object.keys(output.headers).filter((header) => header.startsWith("x-amz-meta-")).reduce((acc, header) => {
acc[header.substring(11)] = output.headers[header];
return acc;
}, {})
]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_HeadObjectCommand");
var de_ListBucketAnalyticsConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.AnalyticsConfiguration === "") {
contents[_ACLn] = [];
} else if (data[_AC] != null) {
contents[_ACLn] = de_AnalyticsConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_AC]), context);
}
if (data[_CTon] != null) {
contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
if (data[_NCT] != null) {
contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]);
}
return contents;
}, "de_ListBucketAnalyticsConfigurationsCommand");
var de_ListBucketIntelligentTieringConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_CTon] != null) {
contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
if (data.IntelligentTieringConfiguration === "") {
contents[_ITCL] = [];
} else if (data[_ITC] != null) {
contents[_ITCL] = de_IntelligentTieringConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_ITC]), context);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
if (data[_NCT] != null) {
contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]);
}
return contents;
}, "de_ListBucketIntelligentTieringConfigurationsCommand");
var de_ListBucketInventoryConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_CTon] != null) {
contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
if (data.InventoryConfiguration === "") {
contents[_ICL] = [];
} else if (data[_IC] != null) {
contents[_ICL] = de_InventoryConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_IC]), context);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
if (data[_NCT] != null) {
contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]);
}
return contents;
}, "de_ListBucketInventoryConfigurationsCommand");
var de_ListBucketMetricsConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_CTon] != null) {
contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
if (data.MetricsConfiguration === "") {
contents[_MCL] = [];
} else if (data[_MC] != null) {
contents[_MCL] = de_MetricsConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_MC]), context);
}
if (data[_NCT] != null) {
contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]);
}
return contents;
}, "de_ListBucketMetricsConfigurationsCommand");
var de_ListBucketsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.Buckets === "") {
contents[_Bu] = [];
} else if (data[_Bu] != null && data[_Bu][_B] != null) {
contents[_Bu] = de_Buckets((0, import_smithy_client.getArrayIfSingleItem)(data[_Bu][_B]), context);
}
if (data[_CTon] != null) {
contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
if (data[_O] != null) {
contents[_O] = de_Owner(data[_O], context);
}
if (data[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(data[_P]);
}
return contents;
}, "de_ListBucketsCommand");
var de_ListDirectoryBucketsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.Buckets === "") {
contents[_Bu] = [];
} else if (data[_Bu] != null && data[_Bu][_B] != null) {
contents[_Bu] = de_Buckets((0, import_smithy_client.getArrayIfSingleItem)(data[_Bu][_B]), context);
}
if (data[_CTon] != null) {
contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
return contents;
}, "de_ListDirectoryBucketsCommand");
var de_ListMultipartUploadsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(data[_B]);
}
if (data.CommonPrefixes === "") {
contents[_CP] = [];
} else if (data[_CP] != null) {
contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context);
}
if (data[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(data[_D]);
}
if (data[_ET] != null) {
contents[_ET] = (0, import_smithy_client.expectString)(data[_ET]);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
if (data[_KM] != null) {
contents[_KM] = (0, import_smithy_client.expectString)(data[_KM]);
}
if (data[_MU] != null) {
contents[_MU] = (0, import_smithy_client.strictParseInt32)(data[_MU]);
}
if (data[_NKM] != null) {
contents[_NKM] = (0, import_smithy_client.expectString)(data[_NKM]);
}
if (data[_NUIM] != null) {
contents[_NUIM] = (0, import_smithy_client.expectString)(data[_NUIM]);
}
if (data[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(data[_P]);
}
if (data[_UIM] != null) {
contents[_UIM] = (0, import_smithy_client.expectString)(data[_UIM]);
}
if (data.Upload === "") {
contents[_Up] = [];
} else if (data[_U] != null) {
contents[_Up] = de_MultipartUploadList((0, import_smithy_client.getArrayIfSingleItem)(data[_U]), context);
}
return contents;
}, "de_ListMultipartUploadsCommand");
var de_ListObjectsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.CommonPrefixes === "") {
contents[_CP] = [];
} else if (data[_CP] != null) {
contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context);
}
if (data.Contents === "") {
contents[_Co] = [];
} else if (data[_Co] != null) {
contents[_Co] = de_ObjectList((0, import_smithy_client.getArrayIfSingleItem)(data[_Co]), context);
}
if (data[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(data[_D]);
}
if (data[_ET] != null) {
contents[_ET] = (0, import_smithy_client.expectString)(data[_ET]);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
if (data[_M] != null) {
contents[_M] = (0, import_smithy_client.expectString)(data[_M]);
}
if (data[_MK] != null) {
contents[_MK] = (0, import_smithy_client.strictParseInt32)(data[_MK]);
}
if (data[_N] != null) {
contents[_N] = (0, import_smithy_client.expectString)(data[_N]);
}
if (data[_NM] != null) {
contents[_NM] = (0, import_smithy_client.expectString)(data[_NM]);
}
if (data[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(data[_P]);
}
return contents;
}, "de_ListObjectsCommand");
var de_ListObjectsV2Command = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.CommonPrefixes === "") {
contents[_CP] = [];
} else if (data[_CP] != null) {
contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context);
}
if (data.Contents === "") {
contents[_Co] = [];
} else if (data[_Co] != null) {
contents[_Co] = de_ObjectList((0, import_smithy_client.getArrayIfSingleItem)(data[_Co]), context);
}
if (data[_CTon] != null) {
contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
if (data[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(data[_D]);
}
if (data[_ET] != null) {
contents[_ET] = (0, import_smithy_client.expectString)(data[_ET]);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
if (data[_KC] != null) {
contents[_KC] = (0, import_smithy_client.strictParseInt32)(data[_KC]);
}
if (data[_MK] != null) {
contents[_MK] = (0, import_smithy_client.strictParseInt32)(data[_MK]);
}
if (data[_N] != null) {
contents[_N] = (0, import_smithy_client.expectString)(data[_N]);
}
if (data[_NCT] != null) {
contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]);
}
if (data[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(data[_P]);
}
if (data[_SA] != null) {
contents[_SA] = (0, import_smithy_client.expectString)(data[_SA]);
}
return contents;
}, "de_ListObjectsV2Command");
var de_ListObjectVersionsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data.CommonPrefixes === "") {
contents[_CP] = [];
} else if (data[_CP] != null) {
contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context);
}
if (data.DeleteMarker === "") {
contents[_DMe] = [];
} else if (data[_DM] != null) {
contents[_DMe] = de_DeleteMarkers((0, import_smithy_client.getArrayIfSingleItem)(data[_DM]), context);
}
if (data[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(data[_D]);
}
if (data[_ET] != null) {
contents[_ET] = (0, import_smithy_client.expectString)(data[_ET]);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
if (data[_KM] != null) {
contents[_KM] = (0, import_smithy_client.expectString)(data[_KM]);
}
if (data[_MK] != null) {
contents[_MK] = (0, import_smithy_client.strictParseInt32)(data[_MK]);
}
if (data[_N] != null) {
contents[_N] = (0, import_smithy_client.expectString)(data[_N]);
}
if (data[_NKM] != null) {
contents[_NKM] = (0, import_smithy_client.expectString)(data[_NKM]);
}
if (data[_NVIM] != null) {
contents[_NVIM] = (0, import_smithy_client.expectString)(data[_NVIM]);
}
if (data[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(data[_P]);
}
if (data[_VIM] != null) {
contents[_VIM] = (0, import_smithy_client.expectString)(data[_VIM]);
}
if (data.Version === "") {
contents[_Ve] = [];
} else if (data[_V] != null) {
contents[_Ve] = de_ObjectVersionList((0, import_smithy_client.getArrayIfSingleItem)(data[_V]), context);
}
return contents;
}, "de_ListObjectVersionsCommand");
var de_ListPartsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_AD]: [
() => void 0 !== output.headers[_xaad],
() => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_xaad]))
],
[_ARI]: [, output.headers[_xaari]],
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(data[_B]);
}
if (data[_CA] != null) {
contents[_CA] = (0, import_smithy_client.expectString)(data[_CA]);
}
if (data[_CT] != null) {
contents[_CT] = (0, import_smithy_client.expectString)(data[_CT]);
}
if (data[_In] != null) {
contents[_In] = de_Initiator(data[_In], context);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
if (data[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(data[_K]);
}
if (data[_MP] != null) {
contents[_MP] = (0, import_smithy_client.strictParseInt32)(data[_MP]);
}
if (data[_NPNM] != null) {
contents[_NPNM] = (0, import_smithy_client.expectString)(data[_NPNM]);
}
if (data[_O] != null) {
contents[_O] = de_Owner(data[_O], context);
}
if (data[_PNM] != null) {
contents[_PNM] = (0, import_smithy_client.expectString)(data[_PNM]);
}
if (data.Part === "") {
contents[_Part] = [];
} else if (data[_Par] != null) {
contents[_Part] = de_Parts((0, import_smithy_client.getArrayIfSingleItem)(data[_Par]), context);
}
if (data[_SC] != null) {
contents[_SC] = (0, import_smithy_client.expectString)(data[_SC]);
}
if (data[_UI] != null) {
contents[_UI] = (0, import_smithy_client.expectString)(data[_UI]);
}
return contents;
}, "de_ListPartsCommand");
var de_PutBucketAccelerateConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketAccelerateConfigurationCommand");
var de_PutBucketAclCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketAclCommand");
var de_PutBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketAnalyticsConfigurationCommand");
var de_PutBucketCorsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketCorsCommand");
var de_PutBucketEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketEncryptionCommand");
var de_PutBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketIntelligentTieringConfigurationCommand");
var de_PutBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketInventoryConfigurationCommand");
var de_PutBucketLifecycleConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_TDMOS]: [, output.headers[_xatdmos]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketLifecycleConfigurationCommand");
var de_PutBucketLoggingCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketLoggingCommand");
var de_PutBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketMetricsConfigurationCommand");
var de_PutBucketNotificationConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketNotificationConfigurationCommand");
var de_PutBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketOwnershipControlsCommand");
var de_PutBucketPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketPolicyCommand");
var de_PutBucketReplicationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketReplicationCommand");
var de_PutBucketRequestPaymentCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketRequestPaymentCommand");
var de_PutBucketTaggingCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketTaggingCommand");
var de_PutBucketVersioningCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketVersioningCommand");
var de_PutBucketWebsiteCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketWebsiteCommand");
var de_PutObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_Exp]: [, output.headers[_xae]],
[_ETa]: [, output.headers[_eta]],
[_CCRC]: [, output.headers[_xacc]],
[_CCRCC]: [, output.headers[_xacc_]],
[_CCRCNVME]: [, output.headers[_xacc__]],
[_CSHA]: [, output.headers[_xacs]],
[_CSHAh]: [, output.headers[_xacs_]],
[_CT]: [, output.headers[_xact]],
[_SSE]: [, output.headers[_xasse]],
[_VI]: [, output.headers[_xavi]],
[_SSECA]: [, output.headers[_xasseca]],
[_SSECKMD]: [, output.headers[_xasseckm]],
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_SSEKMSEC]: [, output.headers[_xassec]],
[_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_Si]: [() => void 0 !== output.headers[_xaos], () => (0, import_smithy_client.strictParseLong)(output.headers[_xaos])],
[_RC]: [, output.headers[_xarc]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectCommand");
var de_PutObjectAclCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectAclCommand");
var de_PutObjectLegalHoldCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectLegalHoldCommand");
var de_PutObjectLockConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectLockConfigurationCommand");
var de_PutObjectRetentionCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectRetentionCommand");
var de_PutObjectTaggingCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_VI]: [, output.headers[_xavi]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectTaggingCommand");
var de_PutPublicAccessBlockCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutPublicAccessBlockCommand");
var de_RestoreObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]],
[_ROP]: [, output.headers[_xarop]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_RestoreObjectCommand");
var de_SelectObjectContentCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = output.body;
contents.Payload = de_SelectObjectContentEventStream(data, context);
return contents;
}, "de_SelectObjectContentCommand");
var de_UploadPartCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_SSE]: [, output.headers[_xasse]],
[_ETa]: [, output.headers[_eta]],
[_CCRC]: [, output.headers[_xacc]],
[_CCRCC]: [, output.headers[_xacc_]],
[_CCRCNVME]: [, output.headers[_xacc__]],
[_CSHA]: [, output.headers[_xacs]],
[_CSHAh]: [, output.headers[_xacs_]],
[_SSECA]: [, output.headers[_xasseca]],
[_SSECKMD]: [, output.headers[_xasseckm]],
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_RC]: [, output.headers[_xarc]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_UploadPartCommand");
var de_UploadPartCopyCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_CSVI]: [, output.headers[_xacsvi]],
[_SSE]: [, output.headers[_xasse]],
[_SSECA]: [, output.headers[_xasseca]],
[_SSECKMD]: [, output.headers[_xasseckm]],
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_RC]: [, output.headers[_xarc]]
});
const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.CopyPartResult = de_CopyPartResult(data, context);
return contents;
}, "de_UploadPartCopyCommand");
var de_WriteGetObjectResponseCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_WriteGetObjectResponseCommand");
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await (0, import_core.parseXmlErrorBody)(output.body, context)
};
const errorCode = (0, import_core.loadRestXmlErrorCode)(output, parsedOutput.body);
switch (errorCode) {
case "NoSuchUpload":
case "com.amazonaws.s3#NoSuchUpload":
throw await de_NoSuchUploadRes(parsedOutput, context);
case "ObjectNotInActiveTierError":
case "com.amazonaws.s3#ObjectNotInActiveTierError":
throw await de_ObjectNotInActiveTierErrorRes(parsedOutput, context);
case "BucketAlreadyExists":
case "com.amazonaws.s3#BucketAlreadyExists":
throw await de_BucketAlreadyExistsRes(parsedOutput, context);
case "BucketAlreadyOwnedByYou":
case "com.amazonaws.s3#BucketAlreadyOwnedByYou":
throw await de_BucketAlreadyOwnedByYouRes(parsedOutput, context);
case "NoSuchBucket":
case "com.amazonaws.s3#NoSuchBucket":
throw await de_NoSuchBucketRes(parsedOutput, context);
case "InvalidObjectState":
case "com.amazonaws.s3#InvalidObjectState":
throw await de_InvalidObjectStateRes(parsedOutput, context);
case "NoSuchKey":
case "com.amazonaws.s3#NoSuchKey":
throw await de_NoSuchKeyRes(parsedOutput, context);
case "NotFound":
case "com.amazonaws.s3#NotFound":
throw await de_NotFoundRes(parsedOutput, context);
case "EncryptionTypeMismatch":
case "com.amazonaws.s3#EncryptionTypeMismatch":
throw await de_EncryptionTypeMismatchRes(parsedOutput, context);
case "InvalidRequest":
case "com.amazonaws.s3#InvalidRequest":
throw await de_InvalidRequestRes(parsedOutput, context);
case "InvalidWriteOffset":
case "com.amazonaws.s3#InvalidWriteOffset":
throw await de_InvalidWriteOffsetRes(parsedOutput, context);
case "TooManyParts":
case "com.amazonaws.s3#TooManyParts":
throw await de_TooManyPartsRes(parsedOutput, context);
case "ObjectAlreadyInActiveTierError":
case "com.amazonaws.s3#ObjectAlreadyInActiveTierError":
throw await de_ObjectAlreadyInActiveTierErrorRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode
});
}
}, "de_CommandError");
var throwDefaultError = (0, import_smithy_client.withBaseException)(S3ServiceException);
var de_BucketAlreadyExistsRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new BucketAlreadyExists({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_BucketAlreadyExistsRes");
var de_BucketAlreadyOwnedByYouRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new BucketAlreadyOwnedByYou({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_BucketAlreadyOwnedByYouRes");
var de_EncryptionTypeMismatchRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new EncryptionTypeMismatch({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_EncryptionTypeMismatchRes");
var de_InvalidObjectStateRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
if (data[_AT] != null) {
contents[_AT] = (0, import_smithy_client.expectString)(data[_AT]);
}
if (data[_SC] != null) {
contents[_SC] = (0, import_smithy_client.expectString)(data[_SC]);
}
const exception = new InvalidObjectState({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidObjectStateRes");
var de_InvalidRequestRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new InvalidRequest({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidRequestRes");
var de_InvalidWriteOffsetRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new InvalidWriteOffset({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidWriteOffsetRes");
var de_NoSuchBucketRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new NoSuchBucket({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_NoSuchBucketRes");
var de_NoSuchKeyRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new NoSuchKey({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_NoSuchKeyRes");
var de_NoSuchUploadRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new NoSuchUpload({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_NoSuchUploadRes");
var de_NotFoundRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new NotFound({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_NotFoundRes");
var de_ObjectAlreadyInActiveTierErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new ObjectAlreadyInActiveTierError({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_ObjectAlreadyInActiveTierErrorRes");
var de_ObjectNotInActiveTierErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new ObjectNotInActiveTierError({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_ObjectNotInActiveTierErrorRes");
var de_TooManyPartsRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const exception = new TooManyParts({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_TooManyPartsRes");
var de_SelectObjectContentEventStream = /* @__PURE__ */ __name((output, context) => {
return context.eventStreamMarshaller.deserialize(output, async (event) => {
if (event["Records"] != null) {
return {
Records: await de_RecordsEvent_event(event["Records"], context)
};
}
if (event["Stats"] != null) {
return {
Stats: await de_StatsEvent_event(event["Stats"], context)
};
}
if (event["Progress"] != null) {
return {
Progress: await de_ProgressEvent_event(event["Progress"], context)
};
}
if (event["Cont"] != null) {
return {
Cont: await de_ContinuationEvent_event(event["Cont"], context)
};
}
if (event["End"] != null) {
return {
End: await de_EndEvent_event(event["End"], context)
};
}
return { $unknown: output };
});
}, "de_SelectObjectContentEventStream");
var de_ContinuationEvent_event = /* @__PURE__ */ __name(async (output, context) => {
const contents = {};
const data = await (0, import_core.parseXmlBody)(output.body, context);
Object.assign(contents, de_ContinuationEvent(data, context));
return contents;
}, "de_ContinuationEvent_event");
var de_EndEvent_event = /* @__PURE__ */ __name(async (output, context) => {
const contents = {};
const data = await (0, import_core.parseXmlBody)(output.body, context);
Object.assign(contents, de_EndEvent(data, context));
return contents;
}, "de_EndEvent_event");
var de_ProgressEvent_event = /* @__PURE__ */ __name(async (output, context) => {
const contents = {};
const data = await (0, import_core.parseXmlBody)(output.body, context);
contents.Details = de_Progress(data, context);
return contents;
}, "de_ProgressEvent_event");
var de_RecordsEvent_event = /* @__PURE__ */ __name(async (output, context) => {
const contents = {};
contents.Payload = output.body;
return contents;
}, "de_RecordsEvent_event");
var de_StatsEvent_event = /* @__PURE__ */ __name(async (output, context) => {
const contents = {};
const data = await (0, import_core.parseXmlBody)(output.body, context);
contents.Details = de_Stats(data, context);
return contents;
}, "de_StatsEvent_event");
var se_AbortIncompleteMultipartUpload = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_AIMU);
if (input[_DAI] != null) {
bn.c(import_xml_builder.XmlNode.of(_DAI, String(input[_DAI])).n(_DAI));
}
return bn;
}, "se_AbortIncompleteMultipartUpload");
var se_AccelerateConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ACc);
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_BAS, input[_S]).n(_S));
}
return bn;
}, "se_AccelerateConfiguration");
var se_AccessControlPolicy = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ACP);
bn.lc(input, "Grants", "AccessControlList", () => se_Grants(input[_Gr], context));
if (input[_O] != null) {
bn.c(se_Owner(input[_O], context).n(_O));
}
return bn;
}, "se_AccessControlPolicy");
var se_AccessControlTranslation = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ACT);
if (input[_O] != null) {
bn.c(import_xml_builder.XmlNode.of(_OOw, input[_O]).n(_O));
}
return bn;
}, "se_AccessControlTranslation");
var se_AllowedHeaders = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = import_xml_builder.XmlNode.of(_AH, entry);
return n.n(_me);
});
}, "se_AllowedHeaders");
var se_AllowedMethods = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = import_xml_builder.XmlNode.of(_AM, entry);
return n.n(_me);
});
}, "se_AllowedMethods");
var se_AllowedOrigins = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = import_xml_builder.XmlNode.of(_AO, entry);
return n.n(_me);
});
}, "se_AllowedOrigins");
var se_AnalyticsAndOperator = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_AAO);
bn.cc(input, _P);
bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context));
return bn;
}, "se_AnalyticsAndOperator");
var se_AnalyticsConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_AC);
if (input[_I] != null) {
bn.c(import_xml_builder.XmlNode.of(_AI, input[_I]).n(_I));
}
if (input[_F] != null) {
bn.c(se_AnalyticsFilter(input[_F], context).n(_F));
}
if (input[_SCA] != null) {
bn.c(se_StorageClassAnalysis(input[_SCA], context).n(_SCA));
}
return bn;
}, "se_AnalyticsConfiguration");
var se_AnalyticsExportDestination = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_AED);
if (input[_SBD] != null) {
bn.c(se_AnalyticsS3BucketDestination(input[_SBD], context).n(_SBD));
}
return bn;
}, "se_AnalyticsExportDestination");
var se_AnalyticsFilter = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_AF);
AnalyticsFilter.visit(input, {
Prefix: /* @__PURE__ */ __name((value) => {
if (input[_P] != null) {
bn.c(import_xml_builder.XmlNode.of(_P, value).n(_P));
}
}, "Prefix"),
Tag: /* @__PURE__ */ __name((value) => {
if (input[_Ta] != null) {
bn.c(se_Tag(value, context).n(_Ta));
}
}, "Tag"),
And: /* @__PURE__ */ __name((value) => {
if (input[_A] != null) {
bn.c(se_AnalyticsAndOperator(value, context).n(_A));
}
}, "And"),
_: /* @__PURE__ */ __name((name, value) => {
if (!(value instanceof import_xml_builder.XmlNode || value instanceof import_xml_builder.XmlText)) {
throw new Error("Unable to serialize unknown union members in XML.");
}
bn.c(new import_xml_builder.XmlNode(name).c(value));
}, "_")
});
return bn;
}, "se_AnalyticsFilter");
var se_AnalyticsS3BucketDestination = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ASBD);
if (input[_Fo] != null) {
bn.c(import_xml_builder.XmlNode.of(_ASEFF, input[_Fo]).n(_Fo));
}
if (input[_BAI] != null) {
bn.c(import_xml_builder.XmlNode.of(_AIc, input[_BAI]).n(_BAI));
}
if (input[_B] != null) {
bn.c(import_xml_builder.XmlNode.of(_BN, input[_B]).n(_B));
}
bn.cc(input, _P);
return bn;
}, "se_AnalyticsS3BucketDestination");
var se_BucketInfo = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_BI);
bn.cc(input, _DR);
if (input[_Ty] != null) {
bn.c(import_xml_builder.XmlNode.of(_BT, input[_Ty]).n(_Ty));
}
return bn;
}, "se_BucketInfo");
var se_BucketLifecycleConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_BLC);
bn.l(input, "Rules", "Rule", () => se_LifecycleRules(input[_Rul], context));
return bn;
}, "se_BucketLifecycleConfiguration");
var se_BucketLoggingStatus = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_BLS);
if (input[_LE] != null) {
bn.c(se_LoggingEnabled(input[_LE], context).n(_LE));
}
return bn;
}, "se_BucketLoggingStatus");
var se_CompletedMultipartUpload = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_CMU);
bn.l(input, "Parts", "Part", () => se_CompletedPartList(input[_Part], context));
return bn;
}, "se_CompletedMultipartUpload");
var se_CompletedPart = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_CPo);
bn.cc(input, _ETa);
bn.cc(input, _CCRC);
bn.cc(input, _CCRCC);
bn.cc(input, _CCRCNVME);
bn.cc(input, _CSHA);
bn.cc(input, _CSHAh);
if (input[_PN] != null) {
bn.c(import_xml_builder.XmlNode.of(_PN, String(input[_PN])).n(_PN));
}
return bn;
}, "se_CompletedPart");
var se_CompletedPartList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_CompletedPart(entry, context);
return n.n(_me);
});
}, "se_CompletedPartList");
var se_Condition = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Con);
bn.cc(input, _HECRE);
bn.cc(input, _KPE);
return bn;
}, "se_Condition");
var se_CORSConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_CORSC);
bn.l(input, "CORSRules", "CORSRule", () => se_CORSRules(input[_CORSRu], context));
return bn;
}, "se_CORSConfiguration");
var se_CORSRule = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_CORSR);
bn.cc(input, _ID_);
bn.l(input, "AllowedHeaders", "AllowedHeader", () => se_AllowedHeaders(input[_AHl], context));
bn.l(input, "AllowedMethods", "AllowedMethod", () => se_AllowedMethods(input[_AMl], context));
bn.l(input, "AllowedOrigins", "AllowedOrigin", () => se_AllowedOrigins(input[_AOl], context));
bn.l(input, "ExposeHeaders", "ExposeHeader", () => se_ExposeHeaders(input[_EH], context));
if (input[_MAS] != null) {
bn.c(import_xml_builder.XmlNode.of(_MAS, String(input[_MAS])).n(_MAS));
}
return bn;
}, "se_CORSRule");
var se_CORSRules = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_CORSRule(entry, context);
return n.n(_me);
});
}, "se_CORSRules");
var se_CreateBucketConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_CBC);
if (input[_LC] != null) {
bn.c(import_xml_builder.XmlNode.of(_BLCu, input[_LC]).n(_LC));
}
if (input[_L] != null) {
bn.c(se_LocationInfo(input[_L], context).n(_L));
}
if (input[_B] != null) {
bn.c(se_BucketInfo(input[_B], context).n(_B));
}
return bn;
}, "se_CreateBucketConfiguration");
var se_CSVInput = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_CSVIn);
bn.cc(input, _FHI);
bn.cc(input, _Com);
bn.cc(input, _QEC);
bn.cc(input, _RD);
bn.cc(input, _FD);
bn.cc(input, _QCuo);
if (input[_AQRD] != null) {
bn.c(import_xml_builder.XmlNode.of(_AQRD, String(input[_AQRD])).n(_AQRD));
}
return bn;
}, "se_CSVInput");
var se_CSVOutput = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_CSVO);
bn.cc(input, _QF);
bn.cc(input, _QEC);
bn.cc(input, _RD);
bn.cc(input, _FD);
bn.cc(input, _QCuo);
return bn;
}, "se_CSVOutput");
var se_DefaultRetention = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_DRe);
if (input[_Mo] != null) {
bn.c(import_xml_builder.XmlNode.of(_OLRM, input[_Mo]).n(_Mo));
}
if (input[_Da] != null) {
bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da));
}
if (input[_Y] != null) {
bn.c(import_xml_builder.XmlNode.of(_Y, String(input[_Y])).n(_Y));
}
return bn;
}, "se_DefaultRetention");
var se_Delete = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Del);
bn.l(input, "Objects", "Object", () => se_ObjectIdentifierList(input[_Ob], context));
if (input[_Q] != null) {
bn.c(import_xml_builder.XmlNode.of(_Q, String(input[_Q])).n(_Q));
}
return bn;
}, "se_Delete");
var se_DeleteMarkerReplication = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_DMR);
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_DMRS, input[_S]).n(_S));
}
return bn;
}, "se_DeleteMarkerReplication");
var se_Destination = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Des);
if (input[_B] != null) {
bn.c(import_xml_builder.XmlNode.of(_BN, input[_B]).n(_B));
}
if (input[_Ac] != null) {
bn.c(import_xml_builder.XmlNode.of(_AIc, input[_Ac]).n(_Ac));
}
bn.cc(input, _SC);
if (input[_ACT] != null) {
bn.c(se_AccessControlTranslation(input[_ACT], context).n(_ACT));
}
if (input[_ECn] != null) {
bn.c(se_EncryptionConfiguration(input[_ECn], context).n(_ECn));
}
if (input[_RTe] != null) {
bn.c(se_ReplicationTime(input[_RTe], context).n(_RTe));
}
if (input[_Me] != null) {
bn.c(se_Metrics(input[_Me], context).n(_Me));
}
return bn;
}, "se_Destination");
var se_Encryption = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_En);
if (input[_ETn] != null) {
bn.c(import_xml_builder.XmlNode.of(_SSE, input[_ETn]).n(_ETn));
}
if (input[_KMSKI] != null) {
bn.c(import_xml_builder.XmlNode.of(_SSEKMSKI, input[_KMSKI]).n(_KMSKI));
}
bn.cc(input, _KMSC);
return bn;
}, "se_Encryption");
var se_EncryptionConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ECn);
bn.cc(input, _RKKID);
return bn;
}, "se_EncryptionConfiguration");
var se_ErrorDocument = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ED);
if (input[_K] != null) {
bn.c(import_xml_builder.XmlNode.of(_OK, input[_K]).n(_K));
}
return bn;
}, "se_ErrorDocument");
var se_EventBridgeConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_EBC);
return bn;
}, "se_EventBridgeConfiguration");
var se_EventList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = import_xml_builder.XmlNode.of(_Ev, entry);
return n.n(_me);
});
}, "se_EventList");
var se_ExistingObjectReplication = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_EOR);
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_EORS, input[_S]).n(_S));
}
return bn;
}, "se_ExistingObjectReplication");
var se_ExposeHeaders = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = import_xml_builder.XmlNode.of(_EHx, entry);
return n.n(_me);
});
}, "se_ExposeHeaders");
var se_FilterRule = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_FR);
if (input[_N] != null) {
bn.c(import_xml_builder.XmlNode.of(_FRN, input[_N]).n(_N));
}
if (input[_Va] != null) {
bn.c(import_xml_builder.XmlNode.of(_FRV, input[_Va]).n(_Va));
}
return bn;
}, "se_FilterRule");
var se_FilterRuleList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_FilterRule(entry, context);
return n.n(_me);
});
}, "se_FilterRuleList");
var se_GlacierJobParameters = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_GJP);
bn.cc(input, _Ti);
return bn;
}, "se_GlacierJobParameters");
var se_Grant = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_G);
if (input[_Gra] != null) {
const n = se_Grantee(input[_Gra], context).n(_Gra);
n.a("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
bn.c(n);
}
bn.cc(input, _Pe);
return bn;
}, "se_Grant");
var se_Grantee = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Gra);
bn.cc(input, _DN);
bn.cc(input, _EA);
bn.cc(input, _ID_);
bn.cc(input, _URI);
bn.a("xsi:type", input[_Ty]);
return bn;
}, "se_Grantee");
var se_Grants = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_Grant(entry, context);
return n.n(_G);
});
}, "se_Grants");
var se_IndexDocument = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ID);
bn.cc(input, _Su);
return bn;
}, "se_IndexDocument");
var se_InputSerialization = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_IS);
if (input[_CSV] != null) {
bn.c(se_CSVInput(input[_CSV], context).n(_CSV));
}
bn.cc(input, _CTom);
if (input[_JSON] != null) {
bn.c(se_JSONInput(input[_JSON], context).n(_JSON));
}
if (input[_Parq] != null) {
bn.c(se_ParquetInput(input[_Parq], context).n(_Parq));
}
return bn;
}, "se_InputSerialization");
var se_IntelligentTieringAndOperator = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ITAO);
bn.cc(input, _P);
bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context));
return bn;
}, "se_IntelligentTieringAndOperator");
var se_IntelligentTieringConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ITC);
if (input[_I] != null) {
bn.c(import_xml_builder.XmlNode.of(_ITI, input[_I]).n(_I));
}
if (input[_F] != null) {
bn.c(se_IntelligentTieringFilter(input[_F], context).n(_F));
}
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_ITS, input[_S]).n(_S));
}
bn.l(input, "Tierings", "Tiering", () => se_TieringList(input[_Tie], context));
return bn;
}, "se_IntelligentTieringConfiguration");
var se_IntelligentTieringFilter = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ITF);
bn.cc(input, _P);
if (input[_Ta] != null) {
bn.c(se_Tag(input[_Ta], context).n(_Ta));
}
if (input[_A] != null) {
bn.c(se_IntelligentTieringAndOperator(input[_A], context).n(_A));
}
return bn;
}, "se_IntelligentTieringFilter");
var se_InventoryConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_IC);
if (input[_Des] != null) {
bn.c(se_InventoryDestination(input[_Des], context).n(_Des));
}
if (input[_IE] != null) {
bn.c(import_xml_builder.XmlNode.of(_IE, String(input[_IE])).n(_IE));
}
if (input[_F] != null) {
bn.c(se_InventoryFilter(input[_F], context).n(_F));
}
if (input[_I] != null) {
bn.c(import_xml_builder.XmlNode.of(_II, input[_I]).n(_I));
}
if (input[_IOV] != null) {
bn.c(import_xml_builder.XmlNode.of(_IIOV, input[_IOV]).n(_IOV));
}
bn.lc(input, "OptionalFields", "OptionalFields", () => se_InventoryOptionalFields(input[_OF], context));
if (input[_Sc] != null) {
bn.c(se_InventorySchedule(input[_Sc], context).n(_Sc));
}
return bn;
}, "se_InventoryConfiguration");
var se_InventoryDestination = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_IDn);
if (input[_SBD] != null) {
bn.c(se_InventoryS3BucketDestination(input[_SBD], context).n(_SBD));
}
return bn;
}, "se_InventoryDestination");
var se_InventoryEncryption = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_IEn);
if (input[_SSES] != null) {
bn.c(se_SSES3(input[_SSES], context).n(_SS));
}
if (input[_SSEKMS] != null) {
bn.c(se_SSEKMS(input[_SSEKMS], context).n(_SK));
}
return bn;
}, "se_InventoryEncryption");
var se_InventoryFilter = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_IF);
bn.cc(input, _P);
return bn;
}, "se_InventoryFilter");
var se_InventoryOptionalFields = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = import_xml_builder.XmlNode.of(_IOF, entry);
return n.n(_Fi);
});
}, "se_InventoryOptionalFields");
var se_InventoryS3BucketDestination = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ISBD);
bn.cc(input, _AIc);
if (input[_B] != null) {
bn.c(import_xml_builder.XmlNode.of(_BN, input[_B]).n(_B));
}
if (input[_Fo] != null) {
bn.c(import_xml_builder.XmlNode.of(_IFn, input[_Fo]).n(_Fo));
}
bn.cc(input, _P);
if (input[_En] != null) {
bn.c(se_InventoryEncryption(input[_En], context).n(_En));
}
return bn;
}, "se_InventoryS3BucketDestination");
var se_InventorySchedule = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ISn);
if (input[_Fr] != null) {
bn.c(import_xml_builder.XmlNode.of(_IFnv, input[_Fr]).n(_Fr));
}
return bn;
}, "se_InventorySchedule");
var se_JSONInput = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_JSONI);
if (input[_Ty] != null) {
bn.c(import_xml_builder.XmlNode.of(_JSONT, input[_Ty]).n(_Ty));
}
return bn;
}, "se_JSONInput");
var se_JSONOutput = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_JSONO);
bn.cc(input, _RD);
return bn;
}, "se_JSONOutput");
var se_LambdaFunctionConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_LFCa);
if (input[_I] != null) {
bn.c(import_xml_builder.XmlNode.of(_NI, input[_I]).n(_I));
}
if (input[_LFA] != null) {
bn.c(import_xml_builder.XmlNode.of(_LFA, input[_LFA]).n(_CF));
}
bn.l(input, "Events", "Event", () => se_EventList(input[_Eve], context));
if (input[_F] != null) {
bn.c(se_NotificationConfigurationFilter(input[_F], context).n(_F));
}
return bn;
}, "se_LambdaFunctionConfiguration");
var se_LambdaFunctionConfigurationList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_LambdaFunctionConfiguration(entry, context);
return n.n(_me);
});
}, "se_LambdaFunctionConfigurationList");
var se_LifecycleExpiration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_LEi);
if (input[_Dat] != null) {
bn.c(import_xml_builder.XmlNode.of(_Dat, (0, import_smithy_client.serializeDateTime)(input[_Dat]).toString()).n(_Dat));
}
if (input[_Da] != null) {
bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da));
}
if (input[_EODM] != null) {
bn.c(import_xml_builder.XmlNode.of(_EODM, String(input[_EODM])).n(_EODM));
}
return bn;
}, "se_LifecycleExpiration");
var se_LifecycleRule = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_LR);
if (input[_Exp] != null) {
bn.c(se_LifecycleExpiration(input[_Exp], context).n(_Exp));
}
bn.cc(input, _ID_);
bn.cc(input, _P);
if (input[_F] != null) {
bn.c(se_LifecycleRuleFilter(input[_F], context).n(_F));
}
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_ESx, input[_S]).n(_S));
}
bn.l(input, "Transitions", "Transition", () => se_TransitionList(input[_Tr], context));
bn.l(
input,
"NoncurrentVersionTransitions",
"NoncurrentVersionTransition",
() => se_NoncurrentVersionTransitionList(input[_NVT], context)
);
if (input[_NVE] != null) {
bn.c(se_NoncurrentVersionExpiration(input[_NVE], context).n(_NVE));
}
if (input[_AIMU] != null) {
bn.c(se_AbortIncompleteMultipartUpload(input[_AIMU], context).n(_AIMU));
}
return bn;
}, "se_LifecycleRule");
var se_LifecycleRuleAndOperator = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_LRAO);
bn.cc(input, _P);
bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context));
if (input[_OSGT] != null) {
bn.c(import_xml_builder.XmlNode.of(_OSGTB, String(input[_OSGT])).n(_OSGT));
}
if (input[_OSLT] != null) {
bn.c(import_xml_builder.XmlNode.of(_OSLTB, String(input[_OSLT])).n(_OSLT));
}
return bn;
}, "se_LifecycleRuleAndOperator");
var se_LifecycleRuleFilter = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_LRF);
bn.cc(input, _P);
if (input[_Ta] != null) {
bn.c(se_Tag(input[_Ta], context).n(_Ta));
}
if (input[_OSGT] != null) {
bn.c(import_xml_builder.XmlNode.of(_OSGTB, String(input[_OSGT])).n(_OSGT));
}
if (input[_OSLT] != null) {
bn.c(import_xml_builder.XmlNode.of(_OSLTB, String(input[_OSLT])).n(_OSLT));
}
if (input[_A] != null) {
bn.c(se_LifecycleRuleAndOperator(input[_A], context).n(_A));
}
return bn;
}, "se_LifecycleRuleFilter");
var se_LifecycleRules = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_LifecycleRule(entry, context);
return n.n(_me);
});
}, "se_LifecycleRules");
var se_LocationInfo = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_LI);
if (input[_Ty] != null) {
bn.c(import_xml_builder.XmlNode.of(_LT, input[_Ty]).n(_Ty));
}
if (input[_N] != null) {
bn.c(import_xml_builder.XmlNode.of(_LNAS, input[_N]).n(_N));
}
return bn;
}, "se_LocationInfo");
var se_LoggingEnabled = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_LE);
bn.cc(input, _TB);
bn.lc(input, "TargetGrants", "TargetGrants", () => se_TargetGrants(input[_TG], context));
bn.cc(input, _TP);
if (input[_TOKF] != null) {
bn.c(se_TargetObjectKeyFormat(input[_TOKF], context).n(_TOKF));
}
return bn;
}, "se_LoggingEnabled");
var se_MetadataEntry = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ME);
if (input[_N] != null) {
bn.c(import_xml_builder.XmlNode.of(_MKe, input[_N]).n(_N));
}
if (input[_Va] != null) {
bn.c(import_xml_builder.XmlNode.of(_MV, input[_Va]).n(_Va));
}
return bn;
}, "se_MetadataEntry");
var se_MetadataTableConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_MTC);
if (input[_STD] != null) {
bn.c(se_S3TablesDestination(input[_STD], context).n(_STD));
}
return bn;
}, "se_MetadataTableConfiguration");
var se_Metrics = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Me);
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_MS, input[_S]).n(_S));
}
if (input[_ETv] != null) {
bn.c(se_ReplicationTimeValue(input[_ETv], context).n(_ETv));
}
return bn;
}, "se_Metrics");
var se_MetricsAndOperator = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_MAO);
bn.cc(input, _P);
bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context));
bn.cc(input, _APAc);
return bn;
}, "se_MetricsAndOperator");
var se_MetricsConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_MC);
if (input[_I] != null) {
bn.c(import_xml_builder.XmlNode.of(_MI, input[_I]).n(_I));
}
if (input[_F] != null) {
bn.c(se_MetricsFilter(input[_F], context).n(_F));
}
return bn;
}, "se_MetricsConfiguration");
var se_MetricsFilter = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_MF);
MetricsFilter.visit(input, {
Prefix: /* @__PURE__ */ __name((value) => {
if (input[_P] != null) {
bn.c(import_xml_builder.XmlNode.of(_P, value).n(_P));
}
}, "Prefix"),
Tag: /* @__PURE__ */ __name((value) => {
if (input[_Ta] != null) {
bn.c(se_Tag(value, context).n(_Ta));
}
}, "Tag"),
AccessPointArn: /* @__PURE__ */ __name((value) => {
if (input[_APAc] != null) {
bn.c(import_xml_builder.XmlNode.of(_APAc, value).n(_APAc));
}
}, "AccessPointArn"),
And: /* @__PURE__ */ __name((value) => {
if (input[_A] != null) {
bn.c(se_MetricsAndOperator(value, context).n(_A));
}
}, "And"),
_: /* @__PURE__ */ __name((name, value) => {
if (!(value instanceof import_xml_builder.XmlNode || value instanceof import_xml_builder.XmlText)) {
throw new Error("Unable to serialize unknown union members in XML.");
}
bn.c(new import_xml_builder.XmlNode(name).c(value));
}, "_")
});
return bn;
}, "se_MetricsFilter");
var se_NoncurrentVersionExpiration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_NVE);
if (input[_ND] != null) {
bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_ND])).n(_ND));
}
if (input[_NNV] != null) {
bn.c(import_xml_builder.XmlNode.of(_VC, String(input[_NNV])).n(_NNV));
}
return bn;
}, "se_NoncurrentVersionExpiration");
var se_NoncurrentVersionTransition = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_NVTo);
if (input[_ND] != null) {
bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_ND])).n(_ND));
}
if (input[_SC] != null) {
bn.c(import_xml_builder.XmlNode.of(_TSC, input[_SC]).n(_SC));
}
if (input[_NNV] != null) {
bn.c(import_xml_builder.XmlNode.of(_VC, String(input[_NNV])).n(_NNV));
}
return bn;
}, "se_NoncurrentVersionTransition");
var se_NoncurrentVersionTransitionList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_NoncurrentVersionTransition(entry, context);
return n.n(_me);
});
}, "se_NoncurrentVersionTransitionList");
var se_NotificationConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_NC);
bn.l(input, "TopicConfigurations", "TopicConfiguration", () => se_TopicConfigurationList(input[_TCop], context));
bn.l(input, "QueueConfigurations", "QueueConfiguration", () => se_QueueConfigurationList(input[_QCu], context));
bn.l(
input,
"LambdaFunctionConfigurations",
"CloudFunctionConfiguration",
() => se_LambdaFunctionConfigurationList(input[_LFC], context)
);
if (input[_EBC] != null) {
bn.c(se_EventBridgeConfiguration(input[_EBC], context).n(_EBC));
}
return bn;
}, "se_NotificationConfiguration");
var se_NotificationConfigurationFilter = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_NCF);
if (input[_K] != null) {
bn.c(se_S3KeyFilter(input[_K], context).n(_SKe));
}
return bn;
}, "se_NotificationConfigurationFilter");
var se_ObjectIdentifier = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_OI);
if (input[_K] != null) {
bn.c(import_xml_builder.XmlNode.of(_OK, input[_K]).n(_K));
}
if (input[_VI] != null) {
bn.c(import_xml_builder.XmlNode.of(_OVI, input[_VI]).n(_VI));
}
bn.cc(input, _ETa);
if (input[_LMT] != null) {
bn.c(import_xml_builder.XmlNode.of(_LMT, (0, import_smithy_client.dateToUtcString)(input[_LMT]).toString()).n(_LMT));
}
if (input[_Si] != null) {
bn.c(import_xml_builder.XmlNode.of(_Si, String(input[_Si])).n(_Si));
}
return bn;
}, "se_ObjectIdentifier");
var se_ObjectIdentifierList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_ObjectIdentifier(entry, context);
return n.n(_me);
});
}, "se_ObjectIdentifierList");
var se_ObjectLockConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_OLC);
bn.cc(input, _OLE);
if (input[_Ru] != null) {
bn.c(se_ObjectLockRule(input[_Ru], context).n(_Ru));
}
return bn;
}, "se_ObjectLockConfiguration");
var se_ObjectLockLegalHold = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_OLLH);
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_OLLHS, input[_S]).n(_S));
}
return bn;
}, "se_ObjectLockLegalHold");
var se_ObjectLockRetention = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_OLR);
if (input[_Mo] != null) {
bn.c(import_xml_builder.XmlNode.of(_OLRM, input[_Mo]).n(_Mo));
}
if (input[_RUD] != null) {
bn.c(import_xml_builder.XmlNode.of(_Dat, (0, import_smithy_client.serializeDateTime)(input[_RUD]).toString()).n(_RUD));
}
return bn;
}, "se_ObjectLockRetention");
var se_ObjectLockRule = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_OLRb);
if (input[_DRe] != null) {
bn.c(se_DefaultRetention(input[_DRe], context).n(_DRe));
}
return bn;
}, "se_ObjectLockRule");
var se_OutputLocation = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_OL);
if (input[_S_] != null) {
bn.c(se_S3Location(input[_S_], context).n(_S_));
}
return bn;
}, "se_OutputLocation");
var se_OutputSerialization = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_OS);
if (input[_CSV] != null) {
bn.c(se_CSVOutput(input[_CSV], context).n(_CSV));
}
if (input[_JSON] != null) {
bn.c(se_JSONOutput(input[_JSON], context).n(_JSON));
}
return bn;
}, "se_OutputSerialization");
var se_Owner = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_O);
bn.cc(input, _DN);
bn.cc(input, _ID_);
return bn;
}, "se_Owner");
var se_OwnershipControls = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_OC);
bn.l(input, "Rules", "Rule", () => se_OwnershipControlsRules(input[_Rul], context));
return bn;
}, "se_OwnershipControls");
var se_OwnershipControlsRule = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_OCR);
bn.cc(input, _OO);
return bn;
}, "se_OwnershipControlsRule");
var se_OwnershipControlsRules = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_OwnershipControlsRule(entry, context);
return n.n(_me);
});
}, "se_OwnershipControlsRules");
var se_ParquetInput = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_PI);
return bn;
}, "se_ParquetInput");
var se_PartitionedPrefix = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_PP);
bn.cc(input, _PDS);
return bn;
}, "se_PartitionedPrefix");
var se_PublicAccessBlockConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_PABC);
if (input[_BPA] != null) {
bn.c(import_xml_builder.XmlNode.of(_Se, String(input[_BPA])).n(_BPA));
}
if (input[_IPA] != null) {
bn.c(import_xml_builder.XmlNode.of(_Se, String(input[_IPA])).n(_IPA));
}
if (input[_BPP] != null) {
bn.c(import_xml_builder.XmlNode.of(_Se, String(input[_BPP])).n(_BPP));
}
if (input[_RPB] != null) {
bn.c(import_xml_builder.XmlNode.of(_Se, String(input[_RPB])).n(_RPB));
}
return bn;
}, "se_PublicAccessBlockConfiguration");
var se_QueueConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_QC);
if (input[_I] != null) {
bn.c(import_xml_builder.XmlNode.of(_NI, input[_I]).n(_I));
}
if (input[_QA] != null) {
bn.c(import_xml_builder.XmlNode.of(_QA, input[_QA]).n(_Qu));
}
bn.l(input, "Events", "Event", () => se_EventList(input[_Eve], context));
if (input[_F] != null) {
bn.c(se_NotificationConfigurationFilter(input[_F], context).n(_F));
}
return bn;
}, "se_QueueConfiguration");
var se_QueueConfigurationList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_QueueConfiguration(entry, context);
return n.n(_me);
});
}, "se_QueueConfigurationList");
var se_Redirect = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Red);
bn.cc(input, _HN);
bn.cc(input, _HRC);
bn.cc(input, _Pr);
bn.cc(input, _RKPW);
bn.cc(input, _RKW);
return bn;
}, "se_Redirect");
var se_RedirectAllRequestsTo = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RART);
bn.cc(input, _HN);
bn.cc(input, _Pr);
return bn;
}, "se_RedirectAllRequestsTo");
var se_ReplicaModifications = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RM);
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_RMS, input[_S]).n(_S));
}
return bn;
}, "se_ReplicaModifications");
var se_ReplicationConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RCe);
bn.cc(input, _Ro);
bn.l(input, "Rules", "Rule", () => se_ReplicationRules(input[_Rul], context));
return bn;
}, "se_ReplicationConfiguration");
var se_ReplicationRule = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RRe);
bn.cc(input, _ID_);
if (input[_Pri] != null) {
bn.c(import_xml_builder.XmlNode.of(_Pri, String(input[_Pri])).n(_Pri));
}
bn.cc(input, _P);
if (input[_F] != null) {
bn.c(se_ReplicationRuleFilter(input[_F], context).n(_F));
}
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_RRS, input[_S]).n(_S));
}
if (input[_SSC] != null) {
bn.c(se_SourceSelectionCriteria(input[_SSC], context).n(_SSC));
}
if (input[_EOR] != null) {
bn.c(se_ExistingObjectReplication(input[_EOR], context).n(_EOR));
}
if (input[_Des] != null) {
bn.c(se_Destination(input[_Des], context).n(_Des));
}
if (input[_DMR] != null) {
bn.c(se_DeleteMarkerReplication(input[_DMR], context).n(_DMR));
}
return bn;
}, "se_ReplicationRule");
var se_ReplicationRuleAndOperator = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RRAO);
bn.cc(input, _P);
bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context));
return bn;
}, "se_ReplicationRuleAndOperator");
var se_ReplicationRuleFilter = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RRF);
bn.cc(input, _P);
if (input[_Ta] != null) {
bn.c(se_Tag(input[_Ta], context).n(_Ta));
}
if (input[_A] != null) {
bn.c(se_ReplicationRuleAndOperator(input[_A], context).n(_A));
}
return bn;
}, "se_ReplicationRuleFilter");
var se_ReplicationRules = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_ReplicationRule(entry, context);
return n.n(_me);
});
}, "se_ReplicationRules");
var se_ReplicationTime = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RTe);
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_RTS, input[_S]).n(_S));
}
if (input[_Tim] != null) {
bn.c(se_ReplicationTimeValue(input[_Tim], context).n(_Tim));
}
return bn;
}, "se_ReplicationTime");
var se_ReplicationTimeValue = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RTV);
if (input[_Mi] != null) {
bn.c(import_xml_builder.XmlNode.of(_Mi, String(input[_Mi])).n(_Mi));
}
return bn;
}, "se_ReplicationTimeValue");
var se_RequestPaymentConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RPC);
bn.cc(input, _Pa);
return bn;
}, "se_RequestPaymentConfiguration");
var se_RequestProgress = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RPe);
if (input[_Ena] != null) {
bn.c(import_xml_builder.XmlNode.of(_ERP, String(input[_Ena])).n(_Ena));
}
return bn;
}, "se_RequestProgress");
var se_RestoreRequest = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RRes);
if (input[_Da] != null) {
bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da));
}
if (input[_GJP] != null) {
bn.c(se_GlacierJobParameters(input[_GJP], context).n(_GJP));
}
if (input[_Ty] != null) {
bn.c(import_xml_builder.XmlNode.of(_RRT, input[_Ty]).n(_Ty));
}
bn.cc(input, _Ti);
bn.cc(input, _Desc);
if (input[_SP] != null) {
bn.c(se_SelectParameters(input[_SP], context).n(_SP));
}
if (input[_OL] != null) {
bn.c(se_OutputLocation(input[_OL], context).n(_OL));
}
return bn;
}, "se_RestoreRequest");
var se_RoutingRule = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RRou);
if (input[_Con] != null) {
bn.c(se_Condition(input[_Con], context).n(_Con));
}
if (input[_Red] != null) {
bn.c(se_Redirect(input[_Red], context).n(_Red));
}
return bn;
}, "se_RoutingRule");
var se_RoutingRules = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_RoutingRule(entry, context);
return n.n(_RRou);
});
}, "se_RoutingRules");
var se_S3KeyFilter = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SKF);
bn.l(input, "FilterRules", "FilterRule", () => se_FilterRuleList(input[_FRi], context));
return bn;
}, "se_S3KeyFilter");
var se_S3Location = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SL);
bn.cc(input, _BN);
if (input[_P] != null) {
bn.c(import_xml_builder.XmlNode.of(_LP, input[_P]).n(_P));
}
if (input[_En] != null) {
bn.c(se_Encryption(input[_En], context).n(_En));
}
if (input[_CACL] != null) {
bn.c(import_xml_builder.XmlNode.of(_OCACL, input[_CACL]).n(_CACL));
}
bn.lc(input, "AccessControlList", "AccessControlList", () => se_Grants(input[_ACLc], context));
if (input[_T] != null) {
bn.c(se_Tagging(input[_T], context).n(_T));
}
bn.lc(input, "UserMetadata", "UserMetadata", () => se_UserMetadata(input[_UM], context));
bn.cc(input, _SC);
return bn;
}, "se_S3Location");
var se_S3TablesDestination = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_STD);
if (input[_TBA] != null) {
bn.c(import_xml_builder.XmlNode.of(_STBA, input[_TBA]).n(_TBA));
}
if (input[_TN] != null) {
bn.c(import_xml_builder.XmlNode.of(_STN, input[_TN]).n(_TN));
}
return bn;
}, "se_S3TablesDestination");
var se_ScanRange = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SR);
if (input[_St] != null) {
bn.c(import_xml_builder.XmlNode.of(_St, String(input[_St])).n(_St));
}
if (input[_End] != null) {
bn.c(import_xml_builder.XmlNode.of(_End, String(input[_End])).n(_End));
}
return bn;
}, "se_ScanRange");
var se_SelectParameters = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SP);
if (input[_IS] != null) {
bn.c(se_InputSerialization(input[_IS], context).n(_IS));
}
bn.cc(input, _ETx);
bn.cc(input, _Ex);
if (input[_OS] != null) {
bn.c(se_OutputSerialization(input[_OS], context).n(_OS));
}
return bn;
}, "se_SelectParameters");
var se_ServerSideEncryptionByDefault = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SSEBD);
if (input[_SSEA] != null) {
bn.c(import_xml_builder.XmlNode.of(_SSE, input[_SSEA]).n(_SSEA));
}
if (input[_KMSMKID] != null) {
bn.c(import_xml_builder.XmlNode.of(_SSEKMSKI, input[_KMSMKID]).n(_KMSMKID));
}
return bn;
}, "se_ServerSideEncryptionByDefault");
var se_ServerSideEncryptionConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SSEC);
bn.l(input, "Rules", "Rule", () => se_ServerSideEncryptionRules(input[_Rul], context));
return bn;
}, "se_ServerSideEncryptionConfiguration");
var se_ServerSideEncryptionRule = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SSER);
if (input[_ASSEBD] != null) {
bn.c(se_ServerSideEncryptionByDefault(input[_ASSEBD], context).n(_ASSEBD));
}
if (input[_BKE] != null) {
bn.c(import_xml_builder.XmlNode.of(_BKE, String(input[_BKE])).n(_BKE));
}
return bn;
}, "se_ServerSideEncryptionRule");
var se_ServerSideEncryptionRules = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_ServerSideEncryptionRule(entry, context);
return n.n(_me);
});
}, "se_ServerSideEncryptionRules");
var se_SimplePrefix = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SPi);
return bn;
}, "se_SimplePrefix");
var se_SourceSelectionCriteria = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SSC);
if (input[_SKEO] != null) {
bn.c(se_SseKmsEncryptedObjects(input[_SKEO], context).n(_SKEO));
}
if (input[_RM] != null) {
bn.c(se_ReplicaModifications(input[_RM], context).n(_RM));
}
return bn;
}, "se_SourceSelectionCriteria");
var se_SSEKMS = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SK);
if (input[_KI] != null) {
bn.c(import_xml_builder.XmlNode.of(_SSEKMSKI, input[_KI]).n(_KI));
}
return bn;
}, "se_SSEKMS");
var se_SseKmsEncryptedObjects = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SKEO);
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_SKEOS, input[_S]).n(_S));
}
return bn;
}, "se_SseKmsEncryptedObjects");
var se_SSES3 = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SS);
return bn;
}, "se_SSES3");
var se_StorageClassAnalysis = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SCA);
if (input[_DE] != null) {
bn.c(se_StorageClassAnalysisDataExport(input[_DE], context).n(_DE));
}
return bn;
}, "se_StorageClassAnalysis");
var se_StorageClassAnalysisDataExport = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SCADE);
if (input[_OSV] != null) {
bn.c(import_xml_builder.XmlNode.of(_SCASV, input[_OSV]).n(_OSV));
}
if (input[_Des] != null) {
bn.c(se_AnalyticsExportDestination(input[_Des], context).n(_Des));
}
return bn;
}, "se_StorageClassAnalysisDataExport");
var se_Tag = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Ta);
if (input[_K] != null) {
bn.c(import_xml_builder.XmlNode.of(_OK, input[_K]).n(_K));
}
bn.cc(input, _Va);
return bn;
}, "se_Tag");
var se_Tagging = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_T);
bn.lc(input, "TagSet", "TagSet", () => se_TagSet(input[_TS], context));
return bn;
}, "se_Tagging");
var se_TagSet = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_Tag(entry, context);
return n.n(_Ta);
});
}, "se_TagSet");
var se_TargetGrant = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_TGa);
if (input[_Gra] != null) {
const n = se_Grantee(input[_Gra], context).n(_Gra);
n.a("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
bn.c(n);
}
if (input[_Pe] != null) {
bn.c(import_xml_builder.XmlNode.of(_BLP, input[_Pe]).n(_Pe));
}
return bn;
}, "se_TargetGrant");
var se_TargetGrants = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_TargetGrant(entry, context);
return n.n(_G);
});
}, "se_TargetGrants");
var se_TargetObjectKeyFormat = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_TOKF);
if (input[_SPi] != null) {
bn.c(se_SimplePrefix(input[_SPi], context).n(_SPi));
}
if (input[_PP] != null) {
bn.c(se_PartitionedPrefix(input[_PP], context).n(_PP));
}
return bn;
}, "se_TargetObjectKeyFormat");
var se_Tiering = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Tier);
if (input[_Da] != null) {
bn.c(import_xml_builder.XmlNode.of(_ITD, String(input[_Da])).n(_Da));
}
if (input[_AT] != null) {
bn.c(import_xml_builder.XmlNode.of(_ITAT, input[_AT]).n(_AT));
}
return bn;
}, "se_Tiering");
var se_TieringList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_Tiering(entry, context);
return n.n(_me);
});
}, "se_TieringList");
var se_TopicConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_TCo);
if (input[_I] != null) {
bn.c(import_xml_builder.XmlNode.of(_NI, input[_I]).n(_I));
}
if (input[_TA] != null) {
bn.c(import_xml_builder.XmlNode.of(_TA, input[_TA]).n(_Top));
}
bn.l(input, "Events", "Event", () => se_EventList(input[_Eve], context));
if (input[_F] != null) {
bn.c(se_NotificationConfigurationFilter(input[_F], context).n(_F));
}
return bn;
}, "se_TopicConfiguration");
var se_TopicConfigurationList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_TopicConfiguration(entry, context);
return n.n(_me);
});
}, "se_TopicConfigurationList");
var se_Transition = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Tra);
if (input[_Dat] != null) {
bn.c(import_xml_builder.XmlNode.of(_Dat, (0, import_smithy_client.serializeDateTime)(input[_Dat]).toString()).n(_Dat));
}
if (input[_Da] != null) {
bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da));
}
if (input[_SC] != null) {
bn.c(import_xml_builder.XmlNode.of(_TSC, input[_SC]).n(_SC));
}
return bn;
}, "se_Transition");
var se_TransitionList = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_Transition(entry, context);
return n.n(_me);
});
}, "se_TransitionList");
var se_UserMetadata = /* @__PURE__ */ __name((input, context) => {
return input.filter((e) => e != null).map((entry) => {
const n = se_MetadataEntry(entry, context);
return n.n(_ME);
});
}, "se_UserMetadata");
var se_VersioningConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_VCe);
if (input[_MFAD] != null) {
bn.c(import_xml_builder.XmlNode.of(_MFAD, input[_MFAD]).n(_MDf));
}
if (input[_S] != null) {
bn.c(import_xml_builder.XmlNode.of(_BVS, input[_S]).n(_S));
}
return bn;
}, "se_VersioningConfiguration");
var se_WebsiteConfiguration = /* @__PURE__ */ __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_WC);
if (input[_ED] != null) {
bn.c(se_ErrorDocument(input[_ED], context).n(_ED));
}
if (input[_ID] != null) {
bn.c(se_IndexDocument(input[_ID], context).n(_ID));
}
if (input[_RART] != null) {
bn.c(se_RedirectAllRequestsTo(input[_RART], context).n(_RART));
}
bn.lc(input, "RoutingRules", "RoutingRules", () => se_RoutingRules(input[_RRo], context));
return bn;
}, "se_WebsiteConfiguration");
var de_AbortIncompleteMultipartUpload = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_DAI] != null) {
contents[_DAI] = (0, import_smithy_client.strictParseInt32)(output[_DAI]);
}
return contents;
}, "de_AbortIncompleteMultipartUpload");
var de_AccessControlTranslation = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_O] != null) {
contents[_O] = (0, import_smithy_client.expectString)(output[_O]);
}
return contents;
}, "de_AccessControlTranslation");
var de_AllowedHeaders = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_AllowedHeaders");
var de_AllowedMethods = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_AllowedMethods");
var de_AllowedOrigins = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_AllowedOrigins");
var de_AnalyticsAndOperator = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output.Tag === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
}
return contents;
}, "de_AnalyticsAndOperator");
var de_AnalyticsConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
if (output.Filter === "") {
} else if (output[_F] != null) {
contents[_F] = de_AnalyticsFilter((0, import_smithy_client.expectUnion)(output[_F]), context);
}
if (output[_SCA] != null) {
contents[_SCA] = de_StorageClassAnalysis(output[_SCA], context);
}
return contents;
}, "de_AnalyticsConfiguration");
var de_AnalyticsConfigurationList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_AnalyticsConfiguration(entry, context);
});
}, "de_AnalyticsConfigurationList");
var de_AnalyticsExportDestination = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SBD] != null) {
contents[_SBD] = de_AnalyticsS3BucketDestination(output[_SBD], context);
}
return contents;
}, "de_AnalyticsExportDestination");
var de_AnalyticsFilter = /* @__PURE__ */ __name((output, context) => {
if (output[_P] != null) {
return {
Prefix: (0, import_smithy_client.expectString)(output[_P])
};
}
if (output[_Ta] != null) {
return {
Tag: de_Tag(output[_Ta], context)
};
}
if (output[_A] != null) {
return {
And: de_AnalyticsAndOperator(output[_A], context)
};
}
return { $unknown: Object.entries(output)[0] };
}, "de_AnalyticsFilter");
var de_AnalyticsS3BucketDestination = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Fo] != null) {
contents[_Fo] = (0, import_smithy_client.expectString)(output[_Fo]);
}
if (output[_BAI] != null) {
contents[_BAI] = (0, import_smithy_client.expectString)(output[_BAI]);
}
if (output[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(output[_B]);
}
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
return contents;
}, "de_AnalyticsS3BucketDestination");
var de_Bucket = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_N] != null) {
contents[_N] = (0, import_smithy_client.expectString)(output[_N]);
}
if (output[_CDr] != null) {
contents[_CDr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CDr]));
}
if (output[_BR] != null) {
contents[_BR] = (0, import_smithy_client.expectString)(output[_BR]);
}
return contents;
}, "de_Bucket");
var de_Buckets = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Bucket(entry, context);
});
}, "de_Buckets");
var de_Checksum = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_CCRC] != null) {
contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]);
}
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
if (output[_CCRCNVME] != null) {
contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
}
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
if (output[_CSHAh] != null) {
contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]);
}
if (output[_CT] != null) {
contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
}
return contents;
}, "de_Checksum");
var de_ChecksumAlgorithmList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_ChecksumAlgorithmList");
var de_CommonPrefix = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
return contents;
}, "de_CommonPrefix");
var de_CommonPrefixList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_CommonPrefix(entry, context);
});
}, "de_CommonPrefixList");
var de_Condition = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_HECRE] != null) {
contents[_HECRE] = (0, import_smithy_client.expectString)(output[_HECRE]);
}
if (output[_KPE] != null) {
contents[_KPE] = (0, import_smithy_client.expectString)(output[_KPE]);
}
return contents;
}, "de_Condition");
var de_ContinuationEvent = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_ContinuationEvent");
var de_CopyObjectResult = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]);
}
if (output[_LM] != null) {
contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM]));
}
if (output[_CT] != null) {
contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
}
if (output[_CCRC] != null) {
contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]);
}
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
if (output[_CCRCNVME] != null) {
contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
}
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
if (output[_CSHAh] != null) {
contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]);
}
return contents;
}, "de_CopyObjectResult");
var de_CopyPartResult = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]);
}
if (output[_LM] != null) {
contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM]));
}
if (output[_CCRC] != null) {
contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]);
}
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
if (output[_CCRCNVME] != null) {
contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
}
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
if (output[_CSHAh] != null) {
contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]);
}
return contents;
}, "de_CopyPartResult");
var de_CORSRule = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ID_] != null) {
contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]);
}
if (output.AllowedHeader === "") {
contents[_AHl] = [];
} else if (output[_AH] != null) {
contents[_AHl] = de_AllowedHeaders((0, import_smithy_client.getArrayIfSingleItem)(output[_AH]), context);
}
if (output.AllowedMethod === "") {
contents[_AMl] = [];
} else if (output[_AM] != null) {
contents[_AMl] = de_AllowedMethods((0, import_smithy_client.getArrayIfSingleItem)(output[_AM]), context);
}
if (output.AllowedOrigin === "") {
contents[_AOl] = [];
} else if (output[_AO] != null) {
contents[_AOl] = de_AllowedOrigins((0, import_smithy_client.getArrayIfSingleItem)(output[_AO]), context);
}
if (output.ExposeHeader === "") {
contents[_EH] = [];
} else if (output[_EHx] != null) {
contents[_EH] = de_ExposeHeaders((0, import_smithy_client.getArrayIfSingleItem)(output[_EHx]), context);
}
if (output[_MAS] != null) {
contents[_MAS] = (0, import_smithy_client.strictParseInt32)(output[_MAS]);
}
return contents;
}, "de_CORSRule");
var de_CORSRules = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_CORSRule(entry, context);
});
}, "de_CORSRules");
var de_DefaultRetention = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Mo] != null) {
contents[_Mo] = (0, import_smithy_client.expectString)(output[_Mo]);
}
if (output[_Da] != null) {
contents[_Da] = (0, import_smithy_client.strictParseInt32)(output[_Da]);
}
if (output[_Y] != null) {
contents[_Y] = (0, import_smithy_client.strictParseInt32)(output[_Y]);
}
return contents;
}, "de_DefaultRetention");
var de_DeletedObject = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
if (output[_VI] != null) {
contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]);
}
if (output[_DM] != null) {
contents[_DM] = (0, import_smithy_client.parseBoolean)(output[_DM]);
}
if (output[_DMVI] != null) {
contents[_DMVI] = (0, import_smithy_client.expectString)(output[_DMVI]);
}
return contents;
}, "de_DeletedObject");
var de_DeletedObjects = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_DeletedObject(entry, context);
});
}, "de_DeletedObjects");
var de_DeleteMarkerEntry = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_O] != null) {
contents[_O] = de_Owner(output[_O], context);
}
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
if (output[_VI] != null) {
contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]);
}
if (output[_IL] != null) {
contents[_IL] = (0, import_smithy_client.parseBoolean)(output[_IL]);
}
if (output[_LM] != null) {
contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM]));
}
return contents;
}, "de_DeleteMarkerEntry");
var de_DeleteMarkerReplication = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
return contents;
}, "de_DeleteMarkerReplication");
var de_DeleteMarkers = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_DeleteMarkerEntry(entry, context);
});
}, "de_DeleteMarkers");
var de_Destination = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(output[_B]);
}
if (output[_Ac] != null) {
contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]);
}
if (output[_SC] != null) {
contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]);
}
if (output[_ACT] != null) {
contents[_ACT] = de_AccessControlTranslation(output[_ACT], context);
}
if (output[_ECn] != null) {
contents[_ECn] = de_EncryptionConfiguration(output[_ECn], context);
}
if (output[_RTe] != null) {
contents[_RTe] = de_ReplicationTime(output[_RTe], context);
}
if (output[_Me] != null) {
contents[_Me] = de_Metrics(output[_Me], context);
}
return contents;
}, "de_Destination");
var de_EncryptionConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_RKKID] != null) {
contents[_RKKID] = (0, import_smithy_client.expectString)(output[_RKKID]);
}
return contents;
}, "de_EncryptionConfiguration");
var de_EndEvent = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_EndEvent");
var de__Error = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
if (output[_VI] != null) {
contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]);
}
if (output[_Cod] != null) {
contents[_Cod] = (0, import_smithy_client.expectString)(output[_Cod]);
}
if (output[_Mes] != null) {
contents[_Mes] = (0, import_smithy_client.expectString)(output[_Mes]);
}
return contents;
}, "de__Error");
var de_ErrorDetails = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_EC] != null) {
contents[_EC] = (0, import_smithy_client.expectString)(output[_EC]);
}
if (output[_EM] != null) {
contents[_EM] = (0, import_smithy_client.expectString)(output[_EM]);
}
return contents;
}, "de_ErrorDetails");
var de_ErrorDocument = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
return contents;
}, "de_ErrorDocument");
var de_Errors = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de__Error(entry, context);
});
}, "de_Errors");
var de_EventBridgeConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_EventBridgeConfiguration");
var de_EventList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_EventList");
var de_ExistingObjectReplication = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
return contents;
}, "de_ExistingObjectReplication");
var de_ExposeHeaders = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_ExposeHeaders");
var de_FilterRule = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_N] != null) {
contents[_N] = (0, import_smithy_client.expectString)(output[_N]);
}
if (output[_Va] != null) {
contents[_Va] = (0, import_smithy_client.expectString)(output[_Va]);
}
return contents;
}, "de_FilterRule");
var de_FilterRuleList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_FilterRule(entry, context);
});
}, "de_FilterRuleList");
var de_GetBucketMetadataTableConfigurationResult = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_MTCR] != null) {
contents[_MTCR] = de_MetadataTableConfigurationResult(output[_MTCR], context);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_Er] != null) {
contents[_Er] = de_ErrorDetails(output[_Er], context);
}
return contents;
}, "de_GetBucketMetadataTableConfigurationResult");
var de_GetObjectAttributesParts = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PC] != null) {
contents[_TPC] = (0, import_smithy_client.strictParseInt32)(output[_PC]);
}
if (output[_PNM] != null) {
contents[_PNM] = (0, import_smithy_client.expectString)(output[_PNM]);
}
if (output[_NPNM] != null) {
contents[_NPNM] = (0, import_smithy_client.expectString)(output[_NPNM]);
}
if (output[_MP] != null) {
contents[_MP] = (0, import_smithy_client.strictParseInt32)(output[_MP]);
}
if (output[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(output[_IT]);
}
if (output.Part === "") {
contents[_Part] = [];
} else if (output[_Par] != null) {
contents[_Part] = de_PartsList((0, import_smithy_client.getArrayIfSingleItem)(output[_Par]), context);
}
return contents;
}, "de_GetObjectAttributesParts");
var de_Grant = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Gra] != null) {
contents[_Gra] = de_Grantee(output[_Gra], context);
}
if (output[_Pe] != null) {
contents[_Pe] = (0, import_smithy_client.expectString)(output[_Pe]);
}
return contents;
}, "de_Grant");
var de_Grantee = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_DN] != null) {
contents[_DN] = (0, import_smithy_client.expectString)(output[_DN]);
}
if (output[_EA] != null) {
contents[_EA] = (0, import_smithy_client.expectString)(output[_EA]);
}
if (output[_ID_] != null) {
contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]);
}
if (output[_URI] != null) {
contents[_URI] = (0, import_smithy_client.expectString)(output[_URI]);
}
if (output[_x] != null) {
contents[_Ty] = (0, import_smithy_client.expectString)(output[_x]);
}
return contents;
}, "de_Grantee");
var de_Grants = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Grant(entry, context);
});
}, "de_Grants");
var de_IndexDocument = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Su] != null) {
contents[_Su] = (0, import_smithy_client.expectString)(output[_Su]);
}
return contents;
}, "de_IndexDocument");
var de_Initiator = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ID_] != null) {
contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]);
}
if (output[_DN] != null) {
contents[_DN] = (0, import_smithy_client.expectString)(output[_DN]);
}
return contents;
}, "de_Initiator");
var de_IntelligentTieringAndOperator = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output.Tag === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
}
return contents;
}, "de_IntelligentTieringAndOperator");
var de_IntelligentTieringConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
if (output[_F] != null) {
contents[_F] = de_IntelligentTieringFilter(output[_F], context);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output.Tiering === "") {
contents[_Tie] = [];
} else if (output[_Tier] != null) {
contents[_Tie] = de_TieringList((0, import_smithy_client.getArrayIfSingleItem)(output[_Tier]), context);
}
return contents;
}, "de_IntelligentTieringConfiguration");
var de_IntelligentTieringConfigurationList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_IntelligentTieringConfiguration(entry, context);
});
}, "de_IntelligentTieringConfigurationList");
var de_IntelligentTieringFilter = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output[_Ta] != null) {
contents[_Ta] = de_Tag(output[_Ta], context);
}
if (output[_A] != null) {
contents[_A] = de_IntelligentTieringAndOperator(output[_A], context);
}
return contents;
}, "de_IntelligentTieringFilter");
var de_InventoryConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Des] != null) {
contents[_Des] = de_InventoryDestination(output[_Des], context);
}
if (output[_IE] != null) {
contents[_IE] = (0, import_smithy_client.parseBoolean)(output[_IE]);
}
if (output[_F] != null) {
contents[_F] = de_InventoryFilter(output[_F], context);
}
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
if (output[_IOV] != null) {
contents[_IOV] = (0, import_smithy_client.expectString)(output[_IOV]);
}
if (output.OptionalFields === "") {
contents[_OF] = [];
} else if (output[_OF] != null && output[_OF][_Fi] != null) {
contents[_OF] = de_InventoryOptionalFields((0, import_smithy_client.getArrayIfSingleItem)(output[_OF][_Fi]), context);
}
if (output[_Sc] != null) {
contents[_Sc] = de_InventorySchedule(output[_Sc], context);
}
return contents;
}, "de_InventoryConfiguration");
var de_InventoryConfigurationList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_InventoryConfiguration(entry, context);
});
}, "de_InventoryConfigurationList");
var de_InventoryDestination = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SBD] != null) {
contents[_SBD] = de_InventoryS3BucketDestination(output[_SBD], context);
}
return contents;
}, "de_InventoryDestination");
var de_InventoryEncryption = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SS] != null) {
contents[_SSES] = de_SSES3(output[_SS], context);
}
if (output[_SK] != null) {
contents[_SSEKMS] = de_SSEKMS(output[_SK], context);
}
return contents;
}, "de_InventoryEncryption");
var de_InventoryFilter = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
return contents;
}, "de_InventoryFilter");
var de_InventoryOptionalFields = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return (0, import_smithy_client.expectString)(entry);
});
}, "de_InventoryOptionalFields");
var de_InventoryS3BucketDestination = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_AIc] != null) {
contents[_AIc] = (0, import_smithy_client.expectString)(output[_AIc]);
}
if (output[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(output[_B]);
}
if (output[_Fo] != null) {
contents[_Fo] = (0, import_smithy_client.expectString)(output[_Fo]);
}
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output[_En] != null) {
contents[_En] = de_InventoryEncryption(output[_En], context);
}
return contents;
}, "de_InventoryS3BucketDestination");
var de_InventorySchedule = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Fr] != null) {
contents[_Fr] = (0, import_smithy_client.expectString)(output[_Fr]);
}
return contents;
}, "de_InventorySchedule");
var de_LambdaFunctionConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
if (output[_CF] != null) {
contents[_LFA] = (0, import_smithy_client.expectString)(output[_CF]);
}
if (output.Event === "") {
contents[_Eve] = [];
} else if (output[_Ev] != null) {
contents[_Eve] = de_EventList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ev]), context);
}
if (output[_F] != null) {
contents[_F] = de_NotificationConfigurationFilter(output[_F], context);
}
return contents;
}, "de_LambdaFunctionConfiguration");
var de_LambdaFunctionConfigurationList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_LambdaFunctionConfiguration(entry, context);
});
}, "de_LambdaFunctionConfigurationList");
var de_LifecycleExpiration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Dat] != null) {
contents[_Dat] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Dat]));
}
if (output[_Da] != null) {
contents[_Da] = (0, import_smithy_client.strictParseInt32)(output[_Da]);
}
if (output[_EODM] != null) {
contents[_EODM] = (0, import_smithy_client.parseBoolean)(output[_EODM]);
}
return contents;
}, "de_LifecycleExpiration");
var de_LifecycleRule = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Exp] != null) {
contents[_Exp] = de_LifecycleExpiration(output[_Exp], context);
}
if (output[_ID_] != null) {
contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]);
}
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output[_F] != null) {
contents[_F] = de_LifecycleRuleFilter(output[_F], context);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output.Transition === "") {
contents[_Tr] = [];
} else if (output[_Tra] != null) {
contents[_Tr] = de_TransitionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Tra]), context);
}
if (output.NoncurrentVersionTransition === "") {
contents[_NVT] = [];
} else if (output[_NVTo] != null) {
contents[_NVT] = de_NoncurrentVersionTransitionList((0, import_smithy_client.getArrayIfSingleItem)(output[_NVTo]), context);
}
if (output[_NVE] != null) {
contents[_NVE] = de_NoncurrentVersionExpiration(output[_NVE], context);
}
if (output[_AIMU] != null) {
contents[_AIMU] = de_AbortIncompleteMultipartUpload(output[_AIMU], context);
}
return contents;
}, "de_LifecycleRule");
var de_LifecycleRuleAndOperator = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output.Tag === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
}
if (output[_OSGT] != null) {
contents[_OSGT] = (0, import_smithy_client.strictParseLong)(output[_OSGT]);
}
if (output[_OSLT] != null) {
contents[_OSLT] = (0, import_smithy_client.strictParseLong)(output[_OSLT]);
}
return contents;
}, "de_LifecycleRuleAndOperator");
var de_LifecycleRuleFilter = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output[_Ta] != null) {
contents[_Ta] = de_Tag(output[_Ta], context);
}
if (output[_OSGT] != null) {
contents[_OSGT] = (0, import_smithy_client.strictParseLong)(output[_OSGT]);
}
if (output[_OSLT] != null) {
contents[_OSLT] = (0, import_smithy_client.strictParseLong)(output[_OSLT]);
}
if (output[_A] != null) {
contents[_A] = de_LifecycleRuleAndOperator(output[_A], context);
}
return contents;
}, "de_LifecycleRuleFilter");
var de_LifecycleRules = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_LifecycleRule(entry, context);
});
}, "de_LifecycleRules");
var de_LoggingEnabled = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_TB] != null) {
contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);
}
if (output.TargetGrants === "") {
contents[_TG] = [];
} else if (output[_TG] != null && output[_TG][_G] != null) {
contents[_TG] = de_TargetGrants((0, import_smithy_client.getArrayIfSingleItem)(output[_TG][_G]), context);
}
if (output[_TP] != null) {
contents[_TP] = (0, import_smithy_client.expectString)(output[_TP]);
}
if (output[_TOKF] != null) {
contents[_TOKF] = de_TargetObjectKeyFormat(output[_TOKF], context);
}
return contents;
}, "de_LoggingEnabled");
var de_MetadataTableConfigurationResult = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_STDR] != null) {
contents[_STDR] = de_S3TablesDestinationResult(output[_STDR], context);
}
return contents;
}, "de_MetadataTableConfigurationResult");
var de_Metrics = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_ETv] != null) {
contents[_ETv] = de_ReplicationTimeValue(output[_ETv], context);
}
return contents;
}, "de_Metrics");
var de_MetricsAndOperator = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output.Tag === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
}
if (output[_APAc] != null) {
contents[_APAc] = (0, import_smithy_client.expectString)(output[_APAc]);
}
return contents;
}, "de_MetricsAndOperator");
var de_MetricsConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
if (output.Filter === "") {
} else if (output[_F] != null) {
contents[_F] = de_MetricsFilter((0, import_smithy_client.expectUnion)(output[_F]), context);
}
return contents;
}, "de_MetricsConfiguration");
var de_MetricsConfigurationList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_MetricsConfiguration(entry, context);
});
}, "de_MetricsConfigurationList");
var de_MetricsFilter = /* @__PURE__ */ __name((output, context) => {
if (output[_P] != null) {
return {
Prefix: (0, import_smithy_client.expectString)(output[_P])
};
}
if (output[_Ta] != null) {
return {
Tag: de_Tag(output[_Ta], context)
};
}
if (output[_APAc] != null) {
return {
AccessPointArn: (0, import_smithy_client.expectString)(output[_APAc])
};
}
if (output[_A] != null) {
return {
And: de_MetricsAndOperator(output[_A], context)
};
}
return { $unknown: Object.entries(output)[0] };
}, "de_MetricsFilter");
var de_MultipartUpload = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_UI] != null) {
contents[_UI] = (0, import_smithy_client.expectString)(output[_UI]);
}
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
if (output[_Ini] != null) {
contents[_Ini] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ini]));
}
if (output[_SC] != null) {
contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]);
}
if (output[_O] != null) {
contents[_O] = de_Owner(output[_O], context);
}
if (output[_In] != null) {
contents[_In] = de_Initiator(output[_In], context);
}
if (output[_CA] != null) {
contents[_CA] = (0, import_smithy_client.expectString)(output[_CA]);
}
if (output[_CT] != null) {
contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
}
return contents;
}, "de_MultipartUpload");
var de_MultipartUploadList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_MultipartUpload(entry, context);
});
}, "de_MultipartUploadList");
var de_NoncurrentVersionExpiration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ND] != null) {
contents[_ND] = (0, import_smithy_client.strictParseInt32)(output[_ND]);
}
if (output[_NNV] != null) {
contents[_NNV] = (0, import_smithy_client.strictParseInt32)(output[_NNV]);
}
return contents;
}, "de_NoncurrentVersionExpiration");
var de_NoncurrentVersionTransition = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ND] != null) {
contents[_ND] = (0, import_smithy_client.strictParseInt32)(output[_ND]);
}
if (output[_SC] != null) {
contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]);
}
if (output[_NNV] != null) {
contents[_NNV] = (0, import_smithy_client.strictParseInt32)(output[_NNV]);
}
return contents;
}, "de_NoncurrentVersionTransition");
var de_NoncurrentVersionTransitionList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_NoncurrentVersionTransition(entry, context);
});
}, "de_NoncurrentVersionTransitionList");
var de_NotificationConfigurationFilter = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SKe] != null) {
contents[_K] = de_S3KeyFilter(output[_SKe], context);
}
return contents;
}, "de_NotificationConfigurationFilter");
var de__Object = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
if (output[_LM] != null) {
contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM]));
}
if (output[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]);
}
if (output.ChecksumAlgorithm === "") {
contents[_CA] = [];
} else if (output[_CA] != null) {
contents[_CA] = de_ChecksumAlgorithmList((0, import_smithy_client.getArrayIfSingleItem)(output[_CA]), context);
}
if (output[_CT] != null) {
contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
}
if (output[_Si] != null) {
contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]);
}
if (output[_SC] != null) {
contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]);
}
if (output[_O] != null) {
contents[_O] = de_Owner(output[_O], context);
}
if (output[_RSe] != null) {
contents[_RSe] = de_RestoreStatus(output[_RSe], context);
}
return contents;
}, "de__Object");
var de_ObjectList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de__Object(entry, context);
});
}, "de_ObjectList");
var de_ObjectLockConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OLE] != null) {
contents[_OLE] = (0, import_smithy_client.expectString)(output[_OLE]);
}
if (output[_Ru] != null) {
contents[_Ru] = de_ObjectLockRule(output[_Ru], context);
}
return contents;
}, "de_ObjectLockConfiguration");
var de_ObjectLockLegalHold = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
return contents;
}, "de_ObjectLockLegalHold");
var de_ObjectLockRetention = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Mo] != null) {
contents[_Mo] = (0, import_smithy_client.expectString)(output[_Mo]);
}
if (output[_RUD] != null) {
contents[_RUD] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_RUD]));
}
return contents;
}, "de_ObjectLockRetention");
var de_ObjectLockRule = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_DRe] != null) {
contents[_DRe] = de_DefaultRetention(output[_DRe], context);
}
return contents;
}, "de_ObjectLockRule");
var de_ObjectPart = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PN] != null) {
contents[_PN] = (0, import_smithy_client.strictParseInt32)(output[_PN]);
}
if (output[_Si] != null) {
contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]);
}
if (output[_CCRC] != null) {
contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]);
}
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
if (output[_CCRCNVME] != null) {
contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
}
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
if (output[_CSHAh] != null) {
contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]);
}
return contents;
}, "de_ObjectPart");
var de_ObjectVersion = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]);
}
if (output.ChecksumAlgorithm === "") {
contents[_CA] = [];
} else if (output[_CA] != null) {
contents[_CA] = de_ChecksumAlgorithmList((0, import_smithy_client.getArrayIfSingleItem)(output[_CA]), context);
}
if (output[_CT] != null) {
contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
}
if (output[_Si] != null) {
contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]);
}
if (output[_SC] != null) {
contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]);
}
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
if (output[_VI] != null) {
contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]);
}
if (output[_IL] != null) {
contents[_IL] = (0, import_smithy_client.parseBoolean)(output[_IL]);
}
if (output[_LM] != null) {
contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM]));
}
if (output[_O] != null) {
contents[_O] = de_Owner(output[_O], context);
}
if (output[_RSe] != null) {
contents[_RSe] = de_RestoreStatus(output[_RSe], context);
}
return contents;
}, "de_ObjectVersion");
var de_ObjectVersionList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ObjectVersion(entry, context);
});
}, "de_ObjectVersionList");
var de_Owner = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_DN] != null) {
contents[_DN] = (0, import_smithy_client.expectString)(output[_DN]);
}
if (output[_ID_] != null) {
contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]);
}
return contents;
}, "de_Owner");
var de_OwnershipControls = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Rule === "") {
contents[_Rul] = [];
} else if (output[_Ru] != null) {
contents[_Rul] = de_OwnershipControlsRules((0, import_smithy_client.getArrayIfSingleItem)(output[_Ru]), context);
}
return contents;
}, "de_OwnershipControls");
var de_OwnershipControlsRule = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OO] != null) {
contents[_OO] = (0, import_smithy_client.expectString)(output[_OO]);
}
return contents;
}, "de_OwnershipControlsRule");
var de_OwnershipControlsRules = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_OwnershipControlsRule(entry, context);
});
}, "de_OwnershipControlsRules");
var de_Part = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PN] != null) {
contents[_PN] = (0, import_smithy_client.strictParseInt32)(output[_PN]);
}
if (output[_LM] != null) {
contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM]));
}
if (output[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]);
}
if (output[_Si] != null) {
contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]);
}
if (output[_CCRC] != null) {
contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]);
}
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
if (output[_CCRCNVME] != null) {
contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
}
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
if (output[_CSHAh] != null) {
contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]);
}
return contents;
}, "de_Part");
var de_PartitionedPrefix = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_PDS] != null) {
contents[_PDS] = (0, import_smithy_client.expectString)(output[_PDS]);
}
return contents;
}, "de_PartitionedPrefix");
var de_Parts = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Part(entry, context);
});
}, "de_Parts");
var de_PartsList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ObjectPart(entry, context);
});
}, "de_PartsList");
var de_PolicyStatus = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_IP] != null) {
contents[_IP] = (0, import_smithy_client.parseBoolean)(output[_IP]);
}
return contents;
}, "de_PolicyStatus");
var de_Progress = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_BS] != null) {
contents[_BS] = (0, import_smithy_client.strictParseLong)(output[_BS]);
}
if (output[_BP] != null) {
contents[_BP] = (0, import_smithy_client.strictParseLong)(output[_BP]);
}
if (output[_BRy] != null) {
contents[_BRy] = (0, import_smithy_client.strictParseLong)(output[_BRy]);
}
return contents;
}, "de_Progress");
var de_PublicAccessBlockConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_BPA] != null) {
contents[_BPA] = (0, import_smithy_client.parseBoolean)(output[_BPA]);
}
if (output[_IPA] != null) {
contents[_IPA] = (0, import_smithy_client.parseBoolean)(output[_IPA]);
}
if (output[_BPP] != null) {
contents[_BPP] = (0, import_smithy_client.parseBoolean)(output[_BPP]);
}
if (output[_RPB] != null) {
contents[_RPB] = (0, import_smithy_client.parseBoolean)(output[_RPB]);
}
return contents;
}, "de_PublicAccessBlockConfiguration");
var de_QueueConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
if (output[_Qu] != null) {
contents[_QA] = (0, import_smithy_client.expectString)(output[_Qu]);
}
if (output.Event === "") {
contents[_Eve] = [];
} else if (output[_Ev] != null) {
contents[_Eve] = de_EventList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ev]), context);
}
if (output[_F] != null) {
contents[_F] = de_NotificationConfigurationFilter(output[_F], context);
}
return contents;
}, "de_QueueConfiguration");
var de_QueueConfigurationList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_QueueConfiguration(entry, context);
});
}, "de_QueueConfigurationList");
var de_Redirect = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_HN] != null) {
contents[_HN] = (0, import_smithy_client.expectString)(output[_HN]);
}
if (output[_HRC] != null) {
contents[_HRC] = (0, import_smithy_client.expectString)(output[_HRC]);
}
if (output[_Pr] != null) {
contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]);
}
if (output[_RKPW] != null) {
contents[_RKPW] = (0, import_smithy_client.expectString)(output[_RKPW]);
}
if (output[_RKW] != null) {
contents[_RKW] = (0, import_smithy_client.expectString)(output[_RKW]);
}
return contents;
}, "de_Redirect");
var de_RedirectAllRequestsTo = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_HN] != null) {
contents[_HN] = (0, import_smithy_client.expectString)(output[_HN]);
}
if (output[_Pr] != null) {
contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]);
}
return contents;
}, "de_RedirectAllRequestsTo");
var de_ReplicaModifications = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
return contents;
}, "de_ReplicaModifications");
var de_ReplicationConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Ro] != null) {
contents[_Ro] = (0, import_smithy_client.expectString)(output[_Ro]);
}
if (output.Rule === "") {
contents[_Rul] = [];
} else if (output[_Ru] != null) {
contents[_Rul] = de_ReplicationRules((0, import_smithy_client.getArrayIfSingleItem)(output[_Ru]), context);
}
return contents;
}, "de_ReplicationConfiguration");
var de_ReplicationRule = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ID_] != null) {
contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]);
}
if (output[_Pri] != null) {
contents[_Pri] = (0, import_smithy_client.strictParseInt32)(output[_Pri]);
}
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output[_F] != null) {
contents[_F] = de_ReplicationRuleFilter(output[_F], context);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_SSC] != null) {
contents[_SSC] = de_SourceSelectionCriteria(output[_SSC], context);
}
if (output[_EOR] != null) {
contents[_EOR] = de_ExistingObjectReplication(output[_EOR], context);
}
if (output[_Des] != null) {
contents[_Des] = de_Destination(output[_Des], context);
}
if (output[_DMR] != null) {
contents[_DMR] = de_DeleteMarkerReplication(output[_DMR], context);
}
return contents;
}, "de_ReplicationRule");
var de_ReplicationRuleAndOperator = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output.Tag === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
}
return contents;
}, "de_ReplicationRuleAndOperator");
var de_ReplicationRuleFilter = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output[_Ta] != null) {
contents[_Ta] = de_Tag(output[_Ta], context);
}
if (output[_A] != null) {
contents[_A] = de_ReplicationRuleAndOperator(output[_A], context);
}
return contents;
}, "de_ReplicationRuleFilter");
var de_ReplicationRules = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ReplicationRule(entry, context);
});
}, "de_ReplicationRules");
var de_ReplicationTime = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
if (output[_Tim] != null) {
contents[_Tim] = de_ReplicationTimeValue(output[_Tim], context);
}
return contents;
}, "de_ReplicationTime");
var de_ReplicationTimeValue = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Mi] != null) {
contents[_Mi] = (0, import_smithy_client.strictParseInt32)(output[_Mi]);
}
return contents;
}, "de_ReplicationTimeValue");
var de_RestoreStatus = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_IRIP] != null) {
contents[_IRIP] = (0, import_smithy_client.parseBoolean)(output[_IRIP]);
}
if (output[_RED] != null) {
contents[_RED] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_RED]));
}
return contents;
}, "de_RestoreStatus");
var de_RoutingRule = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Con] != null) {
contents[_Con] = de_Condition(output[_Con], context);
}
if (output[_Red] != null) {
contents[_Red] = de_Redirect(output[_Red], context);
}
return contents;
}, "de_RoutingRule");
var de_RoutingRules = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_RoutingRule(entry, context);
});
}, "de_RoutingRules");
var de_S3KeyFilter = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.FilterRule === "") {
contents[_FRi] = [];
} else if (output[_FR] != null) {
contents[_FRi] = de_FilterRuleList((0, import_smithy_client.getArrayIfSingleItem)(output[_FR]), context);
}
return contents;
}, "de_S3KeyFilter");
var de_S3TablesDestinationResult = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_TBA] != null) {
contents[_TBA] = (0, import_smithy_client.expectString)(output[_TBA]);
}
if (output[_TN] != null) {
contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
}
if (output[_TAa] != null) {
contents[_TAa] = (0, import_smithy_client.expectString)(output[_TAa]);
}
if (output[_TNa] != null) {
contents[_TNa] = (0, import_smithy_client.expectString)(output[_TNa]);
}
return contents;
}, "de_S3TablesDestinationResult");
var de_ServerSideEncryptionByDefault = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SSEA] != null) {
contents[_SSEA] = (0, import_smithy_client.expectString)(output[_SSEA]);
}
if (output[_KMSMKID] != null) {
contents[_KMSMKID] = (0, import_smithy_client.expectString)(output[_KMSMKID]);
}
return contents;
}, "de_ServerSideEncryptionByDefault");
var de_ServerSideEncryptionConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output.Rule === "") {
contents[_Rul] = [];
} else if (output[_Ru] != null) {
contents[_Rul] = de_ServerSideEncryptionRules((0, import_smithy_client.getArrayIfSingleItem)(output[_Ru]), context);
}
return contents;
}, "de_ServerSideEncryptionConfiguration");
var de_ServerSideEncryptionRule = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ASSEBD] != null) {
contents[_ASSEBD] = de_ServerSideEncryptionByDefault(output[_ASSEBD], context);
}
if (output[_BKE] != null) {
contents[_BKE] = (0, import_smithy_client.parseBoolean)(output[_BKE]);
}
return contents;
}, "de_ServerSideEncryptionRule");
var de_ServerSideEncryptionRules = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_ServerSideEncryptionRule(entry, context);
});
}, "de_ServerSideEncryptionRules");
var de_SessionCredentials = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_AKI] != null) {
contents[_AKI] = (0, import_smithy_client.expectString)(output[_AKI]);
}
if (output[_SAK] != null) {
contents[_SAK] = (0, import_smithy_client.expectString)(output[_SAK]);
}
if (output[_ST] != null) {
contents[_ST] = (0, import_smithy_client.expectString)(output[_ST]);
}
if (output[_Exp] != null) {
contents[_Exp] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Exp]));
}
return contents;
}, "de_SessionCredentials");
var de_SimplePrefix = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_SimplePrefix");
var de_SourceSelectionCriteria = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SKEO] != null) {
contents[_SKEO] = de_SseKmsEncryptedObjects(output[_SKEO], context);
}
if (output[_RM] != null) {
contents[_RM] = de_ReplicaModifications(output[_RM], context);
}
return contents;
}, "de_SourceSelectionCriteria");
var de_SSEKMS = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_KI] != null) {
contents[_KI] = (0, import_smithy_client.expectString)(output[_KI]);
}
return contents;
}, "de_SSEKMS");
var de_SseKmsEncryptedObjects = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
return contents;
}, "de_SseKmsEncryptedObjects");
var de_SSES3 = /* @__PURE__ */ __name((output, context) => {
const contents = {};
return contents;
}, "de_SSES3");
var de_Stats = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_BS] != null) {
contents[_BS] = (0, import_smithy_client.strictParseLong)(output[_BS]);
}
if (output[_BP] != null) {
contents[_BP] = (0, import_smithy_client.strictParseLong)(output[_BP]);
}
if (output[_BRy] != null) {
contents[_BRy] = (0, import_smithy_client.strictParseLong)(output[_BRy]);
}
return contents;
}, "de_Stats");
var de_StorageClassAnalysis = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_DE] != null) {
contents[_DE] = de_StorageClassAnalysisDataExport(output[_DE], context);
}
return contents;
}, "de_StorageClassAnalysis");
var de_StorageClassAnalysisDataExport = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_OSV] != null) {
contents[_OSV] = (0, import_smithy_client.expectString)(output[_OSV]);
}
if (output[_Des] != null) {
contents[_Des] = de_AnalyticsExportDestination(output[_Des], context);
}
return contents;
}, "de_StorageClassAnalysisDataExport");
var de_Tag = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_K] != null) {
contents[_K] = (0, import_smithy_client.expectString)(output[_K]);
}
if (output[_Va] != null) {
contents[_Va] = (0, import_smithy_client.expectString)(output[_Va]);
}
return contents;
}, "de_Tag");
var de_TagSet = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Tag(entry, context);
});
}, "de_TagSet");
var de_TargetGrant = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Gra] != null) {
contents[_Gra] = de_Grantee(output[_Gra], context);
}
if (output[_Pe] != null) {
contents[_Pe] = (0, import_smithy_client.expectString)(output[_Pe]);
}
return contents;
}, "de_TargetGrant");
var de_TargetGrants = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_TargetGrant(entry, context);
});
}, "de_TargetGrants");
var de_TargetObjectKeyFormat = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_SPi] != null) {
contents[_SPi] = de_SimplePrefix(output[_SPi], context);
}
if (output[_PP] != null) {
contents[_PP] = de_PartitionedPrefix(output[_PP], context);
}
return contents;
}, "de_TargetObjectKeyFormat");
var de_Tiering = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Da] != null) {
contents[_Da] = (0, import_smithy_client.strictParseInt32)(output[_Da]);
}
if (output[_AT] != null) {
contents[_AT] = (0, import_smithy_client.expectString)(output[_AT]);
}
return contents;
}, "de_Tiering");
var de_TieringList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Tiering(entry, context);
});
}, "de_TieringList");
var de_TopicConfiguration = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
if (output[_Top] != null) {
contents[_TA] = (0, import_smithy_client.expectString)(output[_Top]);
}
if (output.Event === "") {
contents[_Eve] = [];
} else if (output[_Ev] != null) {
contents[_Eve] = de_EventList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ev]), context);
}
if (output[_F] != null) {
contents[_F] = de_NotificationConfigurationFilter(output[_F], context);
}
return contents;
}, "de_TopicConfiguration");
var de_TopicConfigurationList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_TopicConfiguration(entry, context);
});
}, "de_TopicConfigurationList");
var de_Transition = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_Dat] != null) {
contents[_Dat] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Dat]));
}
if (output[_Da] != null) {
contents[_Da] = (0, import_smithy_client.strictParseInt32)(output[_Da]);
}
if (output[_SC] != null) {
contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]);
}
return contents;
}, "de_Transition");
var de_TransitionList = /* @__PURE__ */ __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
return de_Transition(entry, context);
});
}, "de_TransitionList");
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
var _A = "And";
var _AAO = "AnalyticsAndOperator";
var _AC = "AnalyticsConfiguration";
var _ACL = "ACL";
var _ACLc = "AccessControlList";
var _ACLn = "AnalyticsConfigurationList";
var _ACP = "AccessControlPolicy";
var _ACT = "AccessControlTranslation";
var _ACc = "AccelerateConfiguration";
var _AD = "AbortDate";
var _AED = "AnalyticsExportDestination";
var _AF = "AnalyticsFilter";
var _AH = "AllowedHeader";
var _AHl = "AllowedHeaders";
var _AI = "AnalyticsId";
var _AIMU = "AbortIncompleteMultipartUpload";
var _AIc = "AccountId";
var _AKI = "AccessKeyId";
var _AM = "AllowedMethod";
var _AMl = "AllowedMethods";
var _AO = "AllowedOrigin";
var _AOl = "AllowedOrigins";
var _APA = "AccessPointAlias";
var _APAc = "AccessPointArn";
var _AQRD = "AllowQuotedRecordDelimiter";
var _AR = "AcceptRanges";
var _ARI = "AbortRuleId";
var _AS = "ArchiveStatus";
var _ASBD = "AnalyticsS3BucketDestination";
var _ASEFF = "AnalyticsS3ExportFileFormat";
var _ASSEBD = "ApplyServerSideEncryptionByDefault";
var _AT = "AccessTier";
var _Ac = "Account";
var _B = "Bucket";
var _BAI = "BucketAccountId";
var _BAS = "BucketAccelerateStatus";
var _BGR = "BypassGovernanceRetention";
var _BI = "BucketInfo";
var _BKE = "BucketKeyEnabled";
var _BLC = "BucketLifecycleConfiguration";
var _BLCu = "BucketLocationConstraint";
var _BLN = "BucketLocationName";
var _BLP = "BucketLogsPermission";
var _BLS = "BucketLoggingStatus";
var _BLT = "BucketLocationType";
var _BN = "BucketName";
var _BP = "BytesProcessed";
var _BPA = "BlockPublicAcls";
var _BPP = "BlockPublicPolicy";
var _BR = "BucketRegion";
var _BRy = "BytesReturned";
var _BS = "BytesScanned";
var _BT = "BucketType";
var _BVS = "BucketVersioningStatus";
var _Bu = "Buckets";
var _C = "Credentials";
var _CA = "ChecksumAlgorithm";
var _CACL = "CannedACL";
var _CBC = "CreateBucketConfiguration";
var _CC = "CacheControl";
var _CCRC = "ChecksumCRC32";
var _CCRCC = "ChecksumCRC32C";
var _CCRCNVME = "ChecksumCRC64NVME";
var _CD = "ContentDisposition";
var _CDr = "CreationDate";
var _CE = "ContentEncoding";
var _CF = "CloudFunction";
var _CFC = "CloudFunctionConfiguration";
var _CL = "ContentLanguage";
var _CLo = "ContentLength";
var _CM = "ChecksumMode";
var _CMD = "ContentMD5";
var _CMU = "CompletedMultipartUpload";
var _CORSC = "CORSConfiguration";
var _CORSR = "CORSRule";
var _CORSRu = "CORSRules";
var _CP = "CommonPrefixes";
var _CPo = "CompletedPart";
var _CR = "ContentRange";
var _CRSBA = "ConfirmRemoveSelfBucketAccess";
var _CS = "CopySource";
var _CSHA = "ChecksumSHA1";
var _CSHAh = "ChecksumSHA256";
var _CSIM = "CopySourceIfMatch";
var _CSIMS = "CopySourceIfModifiedSince";
var _CSINM = "CopySourceIfNoneMatch";
var _CSIUS = "CopySourceIfUnmodifiedSince";
var _CSR = "CopySourceRange";
var _CSSSECA = "CopySourceSSECustomerAlgorithm";
var _CSSSECK = "CopySourceSSECustomerKey";
var _CSSSECKMD = "CopySourceSSECustomerKeyMD5";
var _CSV = "CSV";
var _CSVI = "CopySourceVersionId";
var _CSVIn = "CSVInput";
var _CSVO = "CSVOutput";
var _CT = "ChecksumType";
var _CTo = "ContentType";
var _CTom = "CompressionType";
var _CTon = "ContinuationToken";
var _Ch = "Checksum";
var _Co = "Contents";
var _Cod = "Code";
var _Com = "Comments";
var _Con = "Condition";
var _D = "Delimiter";
var _DAI = "DaysAfterInitiation";
var _DE = "DataExport";
var _DM = "DeleteMarker";
var _DMR = "DeleteMarkerReplication";
var _DMRS = "DeleteMarkerReplicationStatus";
var _DMVI = "DeleteMarkerVersionId";
var _DMe = "DeleteMarkers";
var _DN = "DisplayName";
var _DR = "DataRedundancy";
var _DRe = "DefaultRetention";
var _Da = "Days";
var _Dat = "Date";
var _De = "Deleted";
var _Del = "Delete";
var _Des = "Destination";
var _Desc = "Description";
var _E = "Expires";
var _EA = "EmailAddress";
var _EBC = "EventBridgeConfiguration";
var _EBO = "ExpectedBucketOwner";
var _EC = "ErrorCode";
var _ECn = "EncryptionConfiguration";
var _ED = "ErrorDocument";
var _EH = "ExposeHeaders";
var _EHx = "ExposeHeader";
var _EM = "ErrorMessage";
var _EODM = "ExpiredObjectDeleteMarker";
var _EOR = "ExistingObjectReplication";
var _EORS = "ExistingObjectReplicationStatus";
var _ERP = "EnableRequestProgress";
var _ES = "ExpiresString";
var _ESBO = "ExpectedSourceBucketOwner";
var _ESx = "ExpirationStatus";
var _ET = "EncodingType";
var _ETa = "ETag";
var _ETn = "EncryptionType";
var _ETv = "EventThreshold";
var _ETx = "ExpressionType";
var _En = "Encryption";
var _Ena = "Enabled";
var _End = "End";
var _Er = "Error";
var _Err = "Errors";
var _Ev = "Event";
var _Eve = "Events";
var _Ex = "Expression";
var _Exp = "Expiration";
var _F = "Filter";
var _FD = "FieldDelimiter";
var _FHI = "FileHeaderInfo";
var _FO = "FetchOwner";
var _FR = "FilterRule";
var _FRN = "FilterRuleName";
var _FRV = "FilterRuleValue";
var _FRi = "FilterRules";
var _Fi = "Field";
var _Fo = "Format";
var _Fr = "Frequency";
var _G = "Grant";
var _GFC = "GrantFullControl";
var _GJP = "GlacierJobParameters";
var _GR = "GrantRead";
var _GRACP = "GrantReadACP";
var _GW = "GrantWrite";
var _GWACP = "GrantWriteACP";
var _Gr = "Grants";
var _Gra = "Grantee";
var _HECRE = "HttpErrorCodeReturnedEquals";
var _HN = "HostName";
var _HRC = "HttpRedirectCode";
var _I = "Id";
var _IC = "InventoryConfiguration";
var _ICL = "InventoryConfigurationList";
var _ID = "IndexDocument";
var _ID_ = "ID";
var _IDn = "InventoryDestination";
var _IE = "IsEnabled";
var _IEn = "InventoryEncryption";
var _IF = "InventoryFilter";
var _IFn = "InventoryFormat";
var _IFnv = "InventoryFrequency";
var _II = "InventoryId";
var _IIOV = "InventoryIncludedObjectVersions";
var _IL = "IsLatest";
var _IM = "IfMatch";
var _IMIT = "IfMatchInitiatedTime";
var _IMLMT = "IfMatchLastModifiedTime";
var _IMS = "IfMatchSize";
var _IMSf = "IfModifiedSince";
var _INM = "IfNoneMatch";
var _IOF = "InventoryOptionalField";
var _IOV = "IncludedObjectVersions";
var _IP = "IsPublic";
var _IPA = "IgnorePublicAcls";
var _IRIP = "IsRestoreInProgress";
var _IS = "InputSerialization";
var _ISBD = "InventoryS3BucketDestination";
var _ISn = "InventorySchedule";
var _IT = "IsTruncated";
var _ITAO = "IntelligentTieringAndOperator";
var _ITAT = "IntelligentTieringAccessTier";
var _ITC = "IntelligentTieringConfiguration";
var _ITCL = "IntelligentTieringConfigurationList";
var _ITD = "IntelligentTieringDays";
var _ITF = "IntelligentTieringFilter";
var _ITI = "IntelligentTieringId";
var _ITS = "IntelligentTieringStatus";
var _IUS = "IfUnmodifiedSince";
var _In = "Initiator";
var _Ini = "Initiated";
var _JSON = "JSON";
var _JSONI = "JSONInput";
var _JSONO = "JSONOutput";
var _JSONT = "JSONType";
var _K = "Key";
var _KC = "KeyCount";
var _KI = "KeyId";
var _KM = "KeyMarker";
var _KMSC = "KMSContext";
var _KMSKI = "KMSKeyId";
var _KMSMKID = "KMSMasterKeyID";
var _KPE = "KeyPrefixEquals";
var _L = "Location";
var _LC = "LocationConstraint";
var _LE = "LoggingEnabled";
var _LEi = "LifecycleExpiration";
var _LFA = "LambdaFunctionArn";
var _LFC = "LambdaFunctionConfigurations";
var _LFCa = "LambdaFunctionConfiguration";
var _LI = "LocationInfo";
var _LM = "LastModified";
var _LMT = "LastModifiedTime";
var _LNAS = "LocationNameAsString";
var _LP = "LocationPrefix";
var _LR = "LifecycleRule";
var _LRAO = "LifecycleRuleAndOperator";
var _LRF = "LifecycleRuleFilter";
var _LT = "LocationType";
var _M = "Marker";
var _MAO = "MetricsAndOperator";
var _MAS = "MaxAgeSeconds";
var _MB = "MaxBuckets";
var _MC = "MetricsConfiguration";
var _MCL = "MetricsConfigurationList";
var _MD = "MetadataDirective";
var _MDB = "MaxDirectoryBuckets";
var _MDf = "MfaDelete";
var _ME = "MetadataEntry";
var _MF = "MetricsFilter";
var _MFA = "MFA";
var _MFAD = "MFADelete";
var _MI = "MetricsId";
var _MK = "MaxKeys";
var _MKe = "MetadataKey";
var _MM = "MissingMeta";
var _MOS = "MpuObjectSize";
var _MP = "MaxParts";
var _MS = "MetricsStatus";
var _MTC = "MetadataTableConfiguration";
var _MTCR = "MetadataTableConfigurationResult";
var _MU = "MaxUploads";
var _MV = "MetadataValue";
var _Me = "Metrics";
var _Mes = "Message";
var _Mi = "Minutes";
var _Mo = "Mode";
var _N = "Name";
var _NC = "NotificationConfiguration";
var _NCF = "NotificationConfigurationFilter";
var _NCT = "NextContinuationToken";
var _ND = "NoncurrentDays";
var _NI = "NotificationId";
var _NKM = "NextKeyMarker";
var _NM = "NextMarker";
var _NNV = "NewerNoncurrentVersions";
var _NPNM = "NextPartNumberMarker";
var _NUIM = "NextUploadIdMarker";
var _NVE = "NoncurrentVersionExpiration";
var _NVIM = "NextVersionIdMarker";
var _NVT = "NoncurrentVersionTransitions";
var _NVTo = "NoncurrentVersionTransition";
var _O = "Owner";
var _OA = "ObjectAttributes";
var _OC = "OwnershipControls";
var _OCACL = "ObjectCannedACL";
var _OCR = "OwnershipControlsRule";
var _OF = "OptionalFields";
var _OI = "ObjectIdentifier";
var _OK = "ObjectKey";
var _OL = "OutputLocation";
var _OLC = "ObjectLockConfiguration";
var _OLE = "ObjectLockEnabled";
var _OLEFB = "ObjectLockEnabledForBucket";
var _OLLH = "ObjectLockLegalHold";
var _OLLHS = "ObjectLockLegalHoldStatus";
var _OLM = "ObjectLockMode";
var _OLR = "ObjectLockRetention";
var _OLRM = "ObjectLockRetentionMode";
var _OLRUD = "ObjectLockRetainUntilDate";
var _OLRb = "ObjectLockRule";
var _OO = "ObjectOwnership";
var _OOA = "OptionalObjectAttributes";
var _OOw = "OwnerOverride";
var _OP = "ObjectParts";
var _OS = "OutputSerialization";
var _OSGT = "ObjectSizeGreaterThan";
var _OSGTB = "ObjectSizeGreaterThanBytes";
var _OSLT = "ObjectSizeLessThan";
var _OSLTB = "ObjectSizeLessThanBytes";
var _OSV = "OutputSchemaVersion";
var _OSb = "ObjectSize";
var _OVI = "ObjectVersionId";
var _Ob = "Objects";
var _P = "Prefix";
var _PABC = "PublicAccessBlockConfiguration";
var _PC = "PartsCount";
var _PDS = "PartitionDateSource";
var _PI = "ParquetInput";
var _PN = "PartNumber";
var _PNM = "PartNumberMarker";
var _PP = "PartitionedPrefix";
var _Pa = "Payer";
var _Par = "Part";
var _Parq = "Parquet";
var _Part = "Parts";
var _Pe = "Permission";
var _Pr = "Protocol";
var _Pri = "Priority";
var _Q = "Quiet";
var _QA = "QueueArn";
var _QC = "QueueConfiguration";
var _QCu = "QueueConfigurations";
var _QCuo = "QuoteCharacter";
var _QEC = "QuoteEscapeCharacter";
var _QF = "QuoteFields";
var _Qu = "Queue";
var _R = "Range";
var _RART = "RedirectAllRequestsTo";
var _RC = "RequestCharged";
var _RCC = "ResponseCacheControl";
var _RCD = "ResponseContentDisposition";
var _RCE = "ResponseContentEncoding";
var _RCL = "ResponseContentLanguage";
var _RCT = "ResponseContentType";
var _RCe = "ReplicationConfiguration";
var _RD = "RecordDelimiter";
var _RE = "ResponseExpires";
var _RED = "RestoreExpiryDate";
var _RKKID = "ReplicaKmsKeyID";
var _RKPW = "ReplaceKeyPrefixWith";
var _RKW = "ReplaceKeyWith";
var _RM = "ReplicaModifications";
var _RMS = "ReplicaModificationsStatus";
var _ROP = "RestoreOutputPath";
var _RP = "RequestPayer";
var _RPB = "RestrictPublicBuckets";
var _RPC = "RequestPaymentConfiguration";
var _RPe = "RequestProgress";
var _RR = "RequestRoute";
var _RRAO = "ReplicationRuleAndOperator";
var _RRF = "ReplicationRuleFilter";
var _RRS = "ReplicationRuleStatus";
var _RRT = "RestoreRequestType";
var _RRe = "ReplicationRule";
var _RRes = "RestoreRequest";
var _RRo = "RoutingRules";
var _RRou = "RoutingRule";
var _RS = "ReplicationStatus";
var _RSe = "RestoreStatus";
var _RT = "RequestToken";
var _RTS = "ReplicationTimeStatus";
var _RTV = "ReplicationTimeValue";
var _RTe = "ReplicationTime";
var _RUD = "RetainUntilDate";
var _Re = "Restore";
var _Red = "Redirect";
var _Ro = "Role";
var _Ru = "Rule";
var _Rul = "Rules";
var _S = "Status";
var _SA = "StartAfter";
var _SAK = "SecretAccessKey";
var _SBD = "S3BucketDestination";
var _SC = "StorageClass";
var _SCA = "StorageClassAnalysis";
var _SCADE = "StorageClassAnalysisDataExport";
var _SCASV = "StorageClassAnalysisSchemaVersion";
var _SCt = "StatusCode";
var _SDV = "SkipDestinationValidation";
var _SK = "SSE-KMS";
var _SKEO = "SseKmsEncryptedObjects";
var _SKEOS = "SseKmsEncryptedObjectsStatus";
var _SKF = "S3KeyFilter";
var _SKe = "S3Key";
var _SL = "S3Location";
var _SM = "SessionMode";
var _SOCR = "SelectObjectContentRequest";
var _SP = "SelectParameters";
var _SPi = "SimplePrefix";
var _SR = "ScanRange";
var _SS = "SSE-S3";
var _SSC = "SourceSelectionCriteria";
var _SSE = "ServerSideEncryption";
var _SSEA = "SSEAlgorithm";
var _SSEBD = "ServerSideEncryptionByDefault";
var _SSEC = "ServerSideEncryptionConfiguration";
var _SSECA = "SSECustomerAlgorithm";
var _SSECK = "SSECustomerKey";
var _SSECKMD = "SSECustomerKeyMD5";
var _SSEKMS = "SSEKMS";
var _SSEKMSEC = "SSEKMSEncryptionContext";
var _SSEKMSKI = "SSEKMSKeyId";
var _SSER = "ServerSideEncryptionRule";
var _SSES = "SSES3";
var _ST = "SessionToken";
var _STBA = "S3TablesBucketArn";
var _STD = "S3TablesDestination";
var _STDR = "S3TablesDestinationResult";
var _STN = "S3TablesName";
var _S_ = "S3";
var _Sc = "Schedule";
var _Se = "Setting";
var _Si = "Size";
var _St = "Start";
var _Su = "Suffix";
var _T = "Tagging";
var _TA = "TopicArn";
var _TAa = "TableArn";
var _TB = "TargetBucket";
var _TBA = "TableBucketArn";
var _TC = "TagCount";
var _TCo = "TopicConfiguration";
var _TCop = "TopicConfigurations";
var _TD = "TaggingDirective";
var _TDMOS = "TransitionDefaultMinimumObjectSize";
var _TG = "TargetGrants";
var _TGa = "TargetGrant";
var _TN = "TableName";
var _TNa = "TableNamespace";
var _TOKF = "TargetObjectKeyFormat";
var _TP = "TargetPrefix";
var _TPC = "TotalPartsCount";
var _TS = "TagSet";
var _TSC = "TransitionStorageClass";
var _Ta = "Tag";
var _Tag = "Tags";
var _Ti = "Tier";
var _Tie = "Tierings";
var _Tier = "Tiering";
var _Tim = "Time";
var _To = "Token";
var _Top = "Topic";
var _Tr = "Transitions";
var _Tra = "Transition";
var _Ty = "Type";
var _U = "Upload";
var _UI = "UploadId";
var _UIM = "UploadIdMarker";
var _UM = "UserMetadata";
var _URI = "URI";
var _Up = "Uploads";
var _V = "Version";
var _VC = "VersionCount";
var _VCe = "VersioningConfiguration";
var _VI = "VersionId";
var _VIM = "VersionIdMarker";
var _Va = "Value";
var _Ve = "Versions";
var _WC = "WebsiteConfiguration";
var _WOB = "WriteOffsetBytes";
var _WRL = "WebsiteRedirectLocation";
var _Y = "Years";
var _a = "analytics";
var _ac = "accelerate";
var _acl = "acl";
var _ar = "accept-ranges";
var _at = "attributes";
var _br = "bucket-region";
var _c = "cors";
var _cc = "cache-control";
var _cd = "content-disposition";
var _ce = "content-encoding";
var _cl = "content-language";
var _cl_ = "content-length";
var _cm = "content-md5";
var _cr = "content-range";
var _ct = "content-type";
var _ct_ = "continuation-token";
var _d = "delete";
var _de = "delimiter";
var _e = "expires";
var _en = "encryption";
var _et = "encoding-type";
var _eta = "etag";
var _ex = "expiresstring";
var _fo = "fetch-owner";
var _i = "id";
var _im = "if-match";
var _ims = "if-modified-since";
var _in = "inventory";
var _inm = "if-none-match";
var _it = "intelligent-tiering";
var _ius = "if-unmodified-since";
var _km = "key-marker";
var _l = "lifecycle";
var _lh = "legal-hold";
var _lm = "last-modified";
var _lo = "location";
var _log = "logging";
var _lt = "list-type";
var _m = "metrics";
var _mT = "metadataTable";
var _ma = "marker";
var _mb = "max-buckets";
var _mdb = "max-directory-buckets";
var _me = "member";
var _mk = "max-keys";
var _mp = "max-parts";
var _mu = "max-uploads";
var _n = "notification";
var _oC = "ownershipControls";
var _ol = "object-lock";
var _p = "policy";
var _pAB = "publicAccessBlock";
var _pN = "partNumber";
var _pS = "policyStatus";
var _pnm = "part-number-marker";
var _pr = "prefix";
var _r = "replication";
var _rP = "requestPayment";
var _ra = "range";
var _rcc = "response-cache-control";
var _rcd = "response-content-disposition";
var _rce = "response-content-encoding";
var _rcl = "response-content-language";
var _rct = "response-content-type";
var _re = "response-expires";
var _res = "restore";
var _ret = "retention";
var _s = "session";
var _sa = "start-after";
var _se = "select";
var _st = "select-type";
var _t = "tagging";
var _to = "torrent";
var _u = "uploads";
var _uI = "uploadId";
var _uim = "upload-id-marker";
var _v = "versioning";
var _vI = "versionId";
var _ve = '';
var _ver = "versions";
var _vim = "version-id-marker";
var _w = "website";
var _x = "xsi:type";
var _xaa = "x-amz-acl";
var _xaad = "x-amz-abort-date";
var _xaapa = "x-amz-access-point-alias";
var _xaari = "x-amz-abort-rule-id";
var _xaas = "x-amz-archive-status";
var _xabgr = "x-amz-bypass-governance-retention";
var _xabln = "x-amz-bucket-location-name";
var _xablt = "x-amz-bucket-location-type";
var _xabole = "x-amz-bucket-object-lock-enabled";
var _xabolt = "x-amz-bucket-object-lock-token";
var _xabr = "x-amz-bucket-region";
var _xaca = "x-amz-checksum-algorithm";
var _xacc = "x-amz-checksum-crc32";
var _xacc_ = "x-amz-checksum-crc32c";
var _xacc__ = "x-amz-checksum-crc64nvme";
var _xacm = "x-amz-checksum-mode";
var _xacrsba = "x-amz-confirm-remove-self-bucket-access";
var _xacs = "x-amz-checksum-sha1";
var _xacs_ = "x-amz-checksum-sha256";
var _xacs__ = "x-amz-copy-source";
var _xacsim = "x-amz-copy-source-if-match";
var _xacsims = "x-amz-copy-source-if-modified-since";
var _xacsinm = "x-amz-copy-source-if-none-match";
var _xacsius = "x-amz-copy-source-if-unmodified-since";
var _xacsm = "x-amz-create-session-mode";
var _xacsr = "x-amz-copy-source-range";
var _xacssseca = "x-amz-copy-source-server-side-encryption-customer-algorithm";
var _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key";
var _xacssseckm = "x-amz-copy-source-server-side-encryption-customer-key-md5";
var _xacsvi = "x-amz-copy-source-version-id";
var _xact = "x-amz-checksum-type";
var _xadm = "x-amz-delete-marker";
var _xae = "x-amz-expiration";
var _xaebo = "x-amz-expected-bucket-owner";
var _xafec = "x-amz-fwd-error-code";
var _xafem = "x-amz-fwd-error-message";
var _xafhar = "x-amz-fwd-header-accept-ranges";
var _xafhcc = "x-amz-fwd-header-cache-control";
var _xafhcd = "x-amz-fwd-header-content-disposition";
var _xafhce = "x-amz-fwd-header-content-encoding";
var _xafhcl = "x-amz-fwd-header-content-language";
var _xafhcr = "x-amz-fwd-header-content-range";
var _xafhct = "x-amz-fwd-header-content-type";
var _xafhe = "x-amz-fwd-header-etag";
var _xafhe_ = "x-amz-fwd-header-expires";
var _xafhlm = "x-amz-fwd-header-last-modified";
var _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32";
var _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c";
var _xafhxacc__ = "x-amz-fwd-header-x-amz-checksum-crc64nvme";
var _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1";
var _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256";
var _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker";
var _xafhxae = "x-amz-fwd-header-x-amz-expiration";
var _xafhxamm = "x-amz-fwd-header-x-amz-missing-meta";
var _xafhxampc = "x-amz-fwd-header-x-amz-mp-parts-count";
var _xafhxaollh = "x-amz-fwd-header-x-amz-object-lock-legal-hold";
var _xafhxaolm = "x-amz-fwd-header-x-amz-object-lock-mode";
var _xafhxaolrud = "x-amz-fwd-header-x-amz-object-lock-retain-until-date";
var _xafhxar = "x-amz-fwd-header-x-amz-restore";
var _xafhxarc = "x-amz-fwd-header-x-amz-request-charged";
var _xafhxars = "x-amz-fwd-header-x-amz-replication-status";
var _xafhxasc = "x-amz-fwd-header-x-amz-storage-class";
var _xafhxasse = "x-amz-fwd-header-x-amz-server-side-encryption";
var _xafhxasseakki = "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id";
var _xafhxassebke = "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled";
var _xafhxasseca = "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm";
var _xafhxasseckm = "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5";
var _xafhxatc = "x-amz-fwd-header-x-amz-tagging-count";
var _xafhxavi = "x-amz-fwd-header-x-amz-version-id";
var _xafs = "x-amz-fwd-status";
var _xagfc = "x-amz-grant-full-control";
var _xagr = "x-amz-grant-read";
var _xagra = "x-amz-grant-read-acp";
var _xagw = "x-amz-grant-write";
var _xagwa = "x-amz-grant-write-acp";
var _xaimit = "x-amz-if-match-initiated-time";
var _xaimlmt = "x-amz-if-match-last-modified-time";
var _xaims = "x-amz-if-match-size";
var _xam = "x-amz-mfa";
var _xamd = "x-amz-metadata-directive";
var _xamm = "x-amz-missing-meta";
var _xamos = "x-amz-mp-object-size";
var _xamp = "x-amz-max-parts";
var _xampc = "x-amz-mp-parts-count";
var _xaoa = "x-amz-object-attributes";
var _xaollh = "x-amz-object-lock-legal-hold";
var _xaolm = "x-amz-object-lock-mode";
var _xaolrud = "x-amz-object-lock-retain-until-date";
var _xaoo = "x-amz-object-ownership";
var _xaooa = "x-amz-optional-object-attributes";
var _xaos = "x-amz-object-size";
var _xapnm = "x-amz-part-number-marker";
var _xar = "x-amz-restore";
var _xarc = "x-amz-request-charged";
var _xarop = "x-amz-restore-output-path";
var _xarp = "x-amz-request-payer";
var _xarr = "x-amz-request-route";
var _xars = "x-amz-replication-status";
var _xart = "x-amz-request-token";
var _xasc = "x-amz-storage-class";
var _xasca = "x-amz-sdk-checksum-algorithm";
var _xasdv = "x-amz-skip-destination-validation";
var _xasebo = "x-amz-source-expected-bucket-owner";
var _xasse = "x-amz-server-side-encryption";
var _xasseakki = "x-amz-server-side-encryption-aws-kms-key-id";
var _xassebke = "x-amz-server-side-encryption-bucket-key-enabled";
var _xassec = "x-amz-server-side-encryption-context";
var _xasseca = "x-amz-server-side-encryption-customer-algorithm";
var _xasseck = "x-amz-server-side-encryption-customer-key";
var _xasseckm = "x-amz-server-side-encryption-customer-key-md5";
var _xat = "x-amz-tagging";
var _xatc = "x-amz-tagging-count";
var _xatd = "x-amz-tagging-directive";
var _xatdmos = "x-amz-transition-default-minimum-object-size";
var _xavi = "x-amz-version-id";
var _xawob = "x-amz-write-offset-bytes";
var _xawrl = "x-amz-website-redirect-location";
var _xi = "x-id";
// src/commands/CreateSessionCommand.ts
var CreateSessionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s3.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "CreateSession", {}).n("S3Client", "CreateSessionCommand").f(CreateSessionRequestFilterSensitiveLog, CreateSessionOutputFilterSensitiveLog).ser(se_CreateSessionCommand).de(de_CreateSessionCommand).build() {
static {
__name(this, "CreateSessionCommand");
}
};
// src/S3Client.ts
var import_runtimeConfig = __nccwpck_require__(12714);
// src/runtimeExtensions.ts
var import_region_config_resolver = __nccwpck_require__(18156);
// src/auth/httpAuthExtensionConfiguration.ts
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
} else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
}
};
}, "getHttpAuthExtensionConfiguration");
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials()
};
}, "resolveHttpAuthRuntimeConfig");
// src/runtimeExtensions.ts
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
getHttpAuthExtensionConfiguration(runtimeConfig)
);
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(
runtimeConfig,
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
resolveHttpAuthRuntimeConfig(extensionConfiguration)
);
}, "resolveRuntimeExtensions");
// src/S3Client.ts
var S3Client = class extends import_smithy_client.Client {
static {
__name(this, "S3Client");
}
/**
* The resolved configuration of S3Client class. This is resolved and normalized from the {@link S3ClientConfig | constructor configuration interface}.
*/
config;
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
const _config_3 = (0, import_middleware_flexible_checksums.resolveFlexibleChecksumsConfig)(_config_2);
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
const _config_5 = (0, import_config_resolver.resolveRegionConfig)(_config_4);
const _config_6 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_5);
const _config_7 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_6);
const _config_8 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_7);
const _config_9 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_8);
const _config_10 = (0, import_middleware_sdk_s32.resolveS3Config)(_config_9, { session: [() => this, CreateSessionCommand] });
const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);
this.config = _config_11;
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use(
(0, import_core3.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultS3HttpAuthSchemeParametersProvider,
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core3.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials,
"aws.auth#sigv4a": config.credentials
}), "identityProviderConfigProvider")
})
);
this.middlewareStack.use((0, import_core3.getHttpSigningPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_sdk_s32.getValidateBucketNamePlugin)(this.config));
this.middlewareStack.use((0, import_middleware_expect_continue.getAddExpectContinuePlugin)(this.config));
this.middlewareStack.use((0, import_middleware_sdk_s32.getRegionRedirectMiddlewarePlugin)(this.config));
this.middlewareStack.use((0, import_middleware_sdk_s32.getS3ExpressPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_sdk_s32.getS3ExpressHttpSigningPlugin)(this.config));
}
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy() {
super.destroy();
}
};
// src/S3.ts
// src/commands/AbortMultipartUploadCommand.ts
var import_middleware_sdk_s33 = __nccwpck_require__(81139);
var AbortMultipartUploadCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s33.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "AbortMultipartUpload", {}).n("S3Client", "AbortMultipartUploadCommand").f(void 0, void 0).ser(se_AbortMultipartUploadCommand).de(de_AbortMultipartUploadCommand).build() {
static {
__name(this, "AbortMultipartUploadCommand");
}
};
// src/commands/CompleteMultipartUploadCommand.ts
var import_middleware_sdk_s34 = __nccwpck_require__(81139);
var import_middleware_ssec = __nccwpck_require__(49718);
var CompleteMultipartUploadCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s34.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "CompleteMultipartUpload", {}).n("S3Client", "CompleteMultipartUploadCommand").f(CompleteMultipartUploadRequestFilterSensitiveLog, CompleteMultipartUploadOutputFilterSensitiveLog).ser(se_CompleteMultipartUploadCommand).de(de_CompleteMultipartUploadCommand).build() {
static {
__name(this, "CompleteMultipartUploadCommand");
}
};
// src/commands/CopyObjectCommand.ts
var import_middleware_sdk_s35 = __nccwpck_require__(81139);
var CopyObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" },
CopySource: { type: "contextParams", name: "CopySource" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s35.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "CopyObject", {}).n("S3Client", "CopyObjectCommand").f(CopyObjectRequestFilterSensitiveLog, CopyObjectOutputFilterSensitiveLog).ser(se_CopyObjectCommand).de(de_CopyObjectCommand).build() {
static {
__name(this, "CopyObjectCommand");
}
};
// src/commands/CreateBucketCommand.ts
var import_middleware_location_constraint = __nccwpck_require__(42098);
var import_middleware_sdk_s36 = __nccwpck_require__(81139);
var CreateBucketCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
DisableAccessPoints: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s36.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_location_constraint.getLocationConstraintPlugin)(config)
];
}).s("AmazonS3", "CreateBucket", {}).n("S3Client", "CreateBucketCommand").f(void 0, void 0).ser(se_CreateBucketCommand).de(de_CreateBucketCommand).build() {
static {
__name(this, "CreateBucketCommand");
}
};
// src/commands/CreateBucketMetadataTableConfigurationCommand.ts
var CreateBucketMetadataTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "CreateBucketMetadataTableConfiguration", {}).n("S3Client", "CreateBucketMetadataTableConfigurationCommand").f(void 0, void 0).ser(se_CreateBucketMetadataTableConfigurationCommand).de(de_CreateBucketMetadataTableConfigurationCommand).build() {
static {
__name(this, "CreateBucketMetadataTableConfigurationCommand");
}
};
// src/commands/CreateMultipartUploadCommand.ts
var import_middleware_sdk_s37 = __nccwpck_require__(81139);
var CreateMultipartUploadCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s37.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "CreateMultipartUpload", {}).n("S3Client", "CreateMultipartUploadCommand").f(CreateMultipartUploadRequestFilterSensitiveLog, CreateMultipartUploadOutputFilterSensitiveLog).ser(se_CreateMultipartUploadCommand).de(de_CreateMultipartUploadCommand).build() {
static {
__name(this, "CreateMultipartUploadCommand");
}
};
// src/commands/DeleteBucketAnalyticsConfigurationCommand.ts
var DeleteBucketAnalyticsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketAnalyticsConfiguration", {}).n("S3Client", "DeleteBucketAnalyticsConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketAnalyticsConfigurationCommand).de(de_DeleteBucketAnalyticsConfigurationCommand).build() {
static {
__name(this, "DeleteBucketAnalyticsConfigurationCommand");
}
};
// src/commands/DeleteBucketCommand.ts
var DeleteBucketCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucket", {}).n("S3Client", "DeleteBucketCommand").f(void 0, void 0).ser(se_DeleteBucketCommand).de(de_DeleteBucketCommand).build() {
static {
__name(this, "DeleteBucketCommand");
}
};
// src/commands/DeleteBucketCorsCommand.ts
var DeleteBucketCorsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketCors", {}).n("S3Client", "DeleteBucketCorsCommand").f(void 0, void 0).ser(se_DeleteBucketCorsCommand).de(de_DeleteBucketCorsCommand).build() {
static {
__name(this, "DeleteBucketCorsCommand");
}
};
// src/commands/DeleteBucketEncryptionCommand.ts
var DeleteBucketEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketEncryption", {}).n("S3Client", "DeleteBucketEncryptionCommand").f(void 0, void 0).ser(se_DeleteBucketEncryptionCommand).de(de_DeleteBucketEncryptionCommand).build() {
static {
__name(this, "DeleteBucketEncryptionCommand");
}
};
// src/commands/DeleteBucketIntelligentTieringConfigurationCommand.ts
var DeleteBucketIntelligentTieringConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketIntelligentTieringConfiguration", {}).n("S3Client", "DeleteBucketIntelligentTieringConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketIntelligentTieringConfigurationCommand).de(de_DeleteBucketIntelligentTieringConfigurationCommand).build() {
static {
__name(this, "DeleteBucketIntelligentTieringConfigurationCommand");
}
};
// src/commands/DeleteBucketInventoryConfigurationCommand.ts
var DeleteBucketInventoryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketInventoryConfiguration", {}).n("S3Client", "DeleteBucketInventoryConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketInventoryConfigurationCommand).de(de_DeleteBucketInventoryConfigurationCommand).build() {
static {
__name(this, "DeleteBucketInventoryConfigurationCommand");
}
};
// src/commands/DeleteBucketLifecycleCommand.ts
var DeleteBucketLifecycleCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketLifecycle", {}).n("S3Client", "DeleteBucketLifecycleCommand").f(void 0, void 0).ser(se_DeleteBucketLifecycleCommand).de(de_DeleteBucketLifecycleCommand).build() {
static {
__name(this, "DeleteBucketLifecycleCommand");
}
};
// src/commands/DeleteBucketMetadataTableConfigurationCommand.ts
var DeleteBucketMetadataTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketMetadataTableConfiguration", {}).n("S3Client", "DeleteBucketMetadataTableConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketMetadataTableConfigurationCommand).de(de_DeleteBucketMetadataTableConfigurationCommand).build() {
static {
__name(this, "DeleteBucketMetadataTableConfigurationCommand");
}
};
// src/commands/DeleteBucketMetricsConfigurationCommand.ts
var DeleteBucketMetricsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketMetricsConfiguration", {}).n("S3Client", "DeleteBucketMetricsConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketMetricsConfigurationCommand).de(de_DeleteBucketMetricsConfigurationCommand).build() {
static {
__name(this, "DeleteBucketMetricsConfigurationCommand");
}
};
// src/commands/DeleteBucketOwnershipControlsCommand.ts
var DeleteBucketOwnershipControlsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketOwnershipControls", {}).n("S3Client", "DeleteBucketOwnershipControlsCommand").f(void 0, void 0).ser(se_DeleteBucketOwnershipControlsCommand).de(de_DeleteBucketOwnershipControlsCommand).build() {
static {
__name(this, "DeleteBucketOwnershipControlsCommand");
}
};
// src/commands/DeleteBucketPolicyCommand.ts
var DeleteBucketPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketPolicy", {}).n("S3Client", "DeleteBucketPolicyCommand").f(void 0, void 0).ser(se_DeleteBucketPolicyCommand).de(de_DeleteBucketPolicyCommand).build() {
static {
__name(this, "DeleteBucketPolicyCommand");
}
};
// src/commands/DeleteBucketReplicationCommand.ts
var DeleteBucketReplicationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketReplication", {}).n("S3Client", "DeleteBucketReplicationCommand").f(void 0, void 0).ser(se_DeleteBucketReplicationCommand).de(de_DeleteBucketReplicationCommand).build() {
static {
__name(this, "DeleteBucketReplicationCommand");
}
};
// src/commands/DeleteBucketTaggingCommand.ts
var DeleteBucketTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketTagging", {}).n("S3Client", "DeleteBucketTaggingCommand").f(void 0, void 0).ser(se_DeleteBucketTaggingCommand).de(de_DeleteBucketTaggingCommand).build() {
static {
__name(this, "DeleteBucketTaggingCommand");
}
};
// src/commands/DeleteBucketWebsiteCommand.ts
var DeleteBucketWebsiteCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketWebsite", {}).n("S3Client", "DeleteBucketWebsiteCommand").f(void 0, void 0).ser(se_DeleteBucketWebsiteCommand).de(de_DeleteBucketWebsiteCommand).build() {
static {
__name(this, "DeleteBucketWebsiteCommand");
}
};
// src/commands/DeleteObjectCommand.ts
var import_middleware_sdk_s38 = __nccwpck_require__(81139);
var DeleteObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s38.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "DeleteObject", {}).n("S3Client", "DeleteObjectCommand").f(void 0, void 0).ser(se_DeleteObjectCommand).de(de_DeleteObjectCommand).build() {
static {
__name(this, "DeleteObjectCommand");
}
};
// src/commands/DeleteObjectsCommand.ts
var import_middleware_sdk_s39 = __nccwpck_require__(81139);
var DeleteObjectsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
}),
(0, import_middleware_sdk_s39.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "DeleteObjects", {}).n("S3Client", "DeleteObjectsCommand").f(void 0, void 0).ser(se_DeleteObjectsCommand).de(de_DeleteObjectsCommand).build() {
static {
__name(this, "DeleteObjectsCommand");
}
};
// src/commands/DeleteObjectTaggingCommand.ts
var import_middleware_sdk_s310 = __nccwpck_require__(81139);
var DeleteObjectTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s310.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "DeleteObjectTagging", {}).n("S3Client", "DeleteObjectTaggingCommand").f(void 0, void 0).ser(se_DeleteObjectTaggingCommand).de(de_DeleteObjectTaggingCommand).build() {
static {
__name(this, "DeleteObjectTaggingCommand");
}
};
// src/commands/DeletePublicAccessBlockCommand.ts
var DeletePublicAccessBlockCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeletePublicAccessBlock", {}).n("S3Client", "DeletePublicAccessBlockCommand").f(void 0, void 0).ser(se_DeletePublicAccessBlockCommand).de(de_DeletePublicAccessBlockCommand).build() {
static {
__name(this, "DeletePublicAccessBlockCommand");
}
};
// src/commands/GetBucketAccelerateConfigurationCommand.ts
var import_middleware_sdk_s311 = __nccwpck_require__(81139);
var GetBucketAccelerateConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s311.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketAccelerateConfiguration", {}).n("S3Client", "GetBucketAccelerateConfigurationCommand").f(void 0, void 0).ser(se_GetBucketAccelerateConfigurationCommand).de(de_GetBucketAccelerateConfigurationCommand).build() {
static {
__name(this, "GetBucketAccelerateConfigurationCommand");
}
};
// src/commands/GetBucketAclCommand.ts
var import_middleware_sdk_s312 = __nccwpck_require__(81139);
var GetBucketAclCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s312.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketAcl", {}).n("S3Client", "GetBucketAclCommand").f(void 0, void 0).ser(se_GetBucketAclCommand).de(de_GetBucketAclCommand).build() {
static {
__name(this, "GetBucketAclCommand");
}
};
// src/commands/GetBucketAnalyticsConfigurationCommand.ts
var import_middleware_sdk_s313 = __nccwpck_require__(81139);
var GetBucketAnalyticsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s313.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketAnalyticsConfiguration", {}).n("S3Client", "GetBucketAnalyticsConfigurationCommand").f(void 0, void 0).ser(se_GetBucketAnalyticsConfigurationCommand).de(de_GetBucketAnalyticsConfigurationCommand).build() {
static {
__name(this, "GetBucketAnalyticsConfigurationCommand");
}
};
// src/commands/GetBucketCorsCommand.ts
var import_middleware_sdk_s314 = __nccwpck_require__(81139);
var GetBucketCorsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s314.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketCors", {}).n("S3Client", "GetBucketCorsCommand").f(void 0, void 0).ser(se_GetBucketCorsCommand).de(de_GetBucketCorsCommand).build() {
static {
__name(this, "GetBucketCorsCommand");
}
};
// src/commands/GetBucketEncryptionCommand.ts
var import_middleware_sdk_s315 = __nccwpck_require__(81139);
var GetBucketEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s315.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketEncryption", {}).n("S3Client", "GetBucketEncryptionCommand").f(void 0, GetBucketEncryptionOutputFilterSensitiveLog).ser(se_GetBucketEncryptionCommand).de(de_GetBucketEncryptionCommand).build() {
static {
__name(this, "GetBucketEncryptionCommand");
}
};
// src/commands/GetBucketIntelligentTieringConfigurationCommand.ts
var import_middleware_sdk_s316 = __nccwpck_require__(81139);
var GetBucketIntelligentTieringConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s316.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketIntelligentTieringConfiguration", {}).n("S3Client", "GetBucketIntelligentTieringConfigurationCommand").f(void 0, void 0).ser(se_GetBucketIntelligentTieringConfigurationCommand).de(de_GetBucketIntelligentTieringConfigurationCommand).build() {
static {
__name(this, "GetBucketIntelligentTieringConfigurationCommand");
}
};
// src/commands/GetBucketInventoryConfigurationCommand.ts
var import_middleware_sdk_s317 = __nccwpck_require__(81139);
var GetBucketInventoryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s317.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketInventoryConfiguration", {}).n("S3Client", "GetBucketInventoryConfigurationCommand").f(void 0, GetBucketInventoryConfigurationOutputFilterSensitiveLog).ser(se_GetBucketInventoryConfigurationCommand).de(de_GetBucketInventoryConfigurationCommand).build() {
static {
__name(this, "GetBucketInventoryConfigurationCommand");
}
};
// src/commands/GetBucketLifecycleConfigurationCommand.ts
var import_middleware_sdk_s318 = __nccwpck_require__(81139);
var GetBucketLifecycleConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s318.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketLifecycleConfiguration", {}).n("S3Client", "GetBucketLifecycleConfigurationCommand").f(void 0, void 0).ser(se_GetBucketLifecycleConfigurationCommand).de(de_GetBucketLifecycleConfigurationCommand).build() {
static {
__name(this, "GetBucketLifecycleConfigurationCommand");
}
};
// src/commands/GetBucketLocationCommand.ts
var import_middleware_sdk_s319 = __nccwpck_require__(81139);
var GetBucketLocationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s319.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketLocation", {}).n("S3Client", "GetBucketLocationCommand").f(void 0, void 0).ser(se_GetBucketLocationCommand).de(de_GetBucketLocationCommand).build() {
static {
__name(this, "GetBucketLocationCommand");
}
};
// src/commands/GetBucketLoggingCommand.ts
var import_middleware_sdk_s320 = __nccwpck_require__(81139);
var GetBucketLoggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s320.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketLogging", {}).n("S3Client", "GetBucketLoggingCommand").f(void 0, void 0).ser(se_GetBucketLoggingCommand).de(de_GetBucketLoggingCommand).build() {
static {
__name(this, "GetBucketLoggingCommand");
}
};
// src/commands/GetBucketMetadataTableConfigurationCommand.ts
var import_middleware_sdk_s321 = __nccwpck_require__(81139);
var GetBucketMetadataTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s321.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketMetadataTableConfiguration", {}).n("S3Client", "GetBucketMetadataTableConfigurationCommand").f(void 0, void 0).ser(se_GetBucketMetadataTableConfigurationCommand).de(de_GetBucketMetadataTableConfigurationCommand).build() {
static {
__name(this, "GetBucketMetadataTableConfigurationCommand");
}
};
// src/commands/GetBucketMetricsConfigurationCommand.ts
var import_middleware_sdk_s322 = __nccwpck_require__(81139);
var GetBucketMetricsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s322.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketMetricsConfiguration", {}).n("S3Client", "GetBucketMetricsConfigurationCommand").f(void 0, void 0).ser(se_GetBucketMetricsConfigurationCommand).de(de_GetBucketMetricsConfigurationCommand).build() {
static {
__name(this, "GetBucketMetricsConfigurationCommand");
}
};
// src/commands/GetBucketNotificationConfigurationCommand.ts
var import_middleware_sdk_s323 = __nccwpck_require__(81139);
var GetBucketNotificationConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s323.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketNotificationConfiguration", {}).n("S3Client", "GetBucketNotificationConfigurationCommand").f(void 0, void 0).ser(se_GetBucketNotificationConfigurationCommand).de(de_GetBucketNotificationConfigurationCommand).build() {
static {
__name(this, "GetBucketNotificationConfigurationCommand");
}
};
// src/commands/GetBucketOwnershipControlsCommand.ts
var import_middleware_sdk_s324 = __nccwpck_require__(81139);
var GetBucketOwnershipControlsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s324.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketOwnershipControls", {}).n("S3Client", "GetBucketOwnershipControlsCommand").f(void 0, void 0).ser(se_GetBucketOwnershipControlsCommand).de(de_GetBucketOwnershipControlsCommand).build() {
static {
__name(this, "GetBucketOwnershipControlsCommand");
}
};
// src/commands/GetBucketPolicyCommand.ts
var import_middleware_sdk_s325 = __nccwpck_require__(81139);
var GetBucketPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s325.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketPolicy", {}).n("S3Client", "GetBucketPolicyCommand").f(void 0, void 0).ser(se_GetBucketPolicyCommand).de(de_GetBucketPolicyCommand).build() {
static {
__name(this, "GetBucketPolicyCommand");
}
};
// src/commands/GetBucketPolicyStatusCommand.ts
var import_middleware_sdk_s326 = __nccwpck_require__(81139);
var GetBucketPolicyStatusCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s326.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketPolicyStatus", {}).n("S3Client", "GetBucketPolicyStatusCommand").f(void 0, void 0).ser(se_GetBucketPolicyStatusCommand).de(de_GetBucketPolicyStatusCommand).build() {
static {
__name(this, "GetBucketPolicyStatusCommand");
}
};
// src/commands/GetBucketReplicationCommand.ts
var import_middleware_sdk_s327 = __nccwpck_require__(81139);
var GetBucketReplicationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s327.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketReplication", {}).n("S3Client", "GetBucketReplicationCommand").f(void 0, void 0).ser(se_GetBucketReplicationCommand).de(de_GetBucketReplicationCommand).build() {
static {
__name(this, "GetBucketReplicationCommand");
}
};
// src/commands/GetBucketRequestPaymentCommand.ts
var import_middleware_sdk_s328 = __nccwpck_require__(81139);
var GetBucketRequestPaymentCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s328.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketRequestPayment", {}).n("S3Client", "GetBucketRequestPaymentCommand").f(void 0, void 0).ser(se_GetBucketRequestPaymentCommand).de(de_GetBucketRequestPaymentCommand).build() {
static {
__name(this, "GetBucketRequestPaymentCommand");
}
};
// src/commands/GetBucketTaggingCommand.ts
var import_middleware_sdk_s329 = __nccwpck_require__(81139);
var GetBucketTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s329.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketTagging", {}).n("S3Client", "GetBucketTaggingCommand").f(void 0, void 0).ser(se_GetBucketTaggingCommand).de(de_GetBucketTaggingCommand).build() {
static {
__name(this, "GetBucketTaggingCommand");
}
};
// src/commands/GetBucketVersioningCommand.ts
var import_middleware_sdk_s330 = __nccwpck_require__(81139);
var GetBucketVersioningCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s330.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketVersioning", {}).n("S3Client", "GetBucketVersioningCommand").f(void 0, void 0).ser(se_GetBucketVersioningCommand).de(de_GetBucketVersioningCommand).build() {
static {
__name(this, "GetBucketVersioningCommand");
}
};
// src/commands/GetBucketWebsiteCommand.ts
var import_middleware_sdk_s331 = __nccwpck_require__(81139);
var GetBucketWebsiteCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s331.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketWebsite", {}).n("S3Client", "GetBucketWebsiteCommand").f(void 0, void 0).ser(se_GetBucketWebsiteCommand).de(de_GetBucketWebsiteCommand).build() {
static {
__name(this, "GetBucketWebsiteCommand");
}
};
// src/commands/GetObjectAclCommand.ts
var import_middleware_sdk_s332 = __nccwpck_require__(81139);
var GetObjectAclCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s332.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectAcl", {}).n("S3Client", "GetObjectAclCommand").f(void 0, void 0).ser(se_GetObjectAclCommand).de(de_GetObjectAclCommand).build() {
static {
__name(this, "GetObjectAclCommand");
}
};
// src/commands/GetObjectAttributesCommand.ts
var import_middleware_sdk_s333 = __nccwpck_require__(81139);
var GetObjectAttributesCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s333.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "GetObjectAttributes", {}).n("S3Client", "GetObjectAttributesCommand").f(GetObjectAttributesRequestFilterSensitiveLog, void 0).ser(se_GetObjectAttributesCommand).de(de_GetObjectAttributesCommand).build() {
static {
__name(this, "GetObjectAttributesCommand");
}
};
// src/commands/GetObjectCommand.ts
var import_middleware_sdk_s334 = __nccwpck_require__(81139);
var GetObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestChecksumRequired: false,
requestValidationModeMember: "ChecksumMode",
responseAlgorithms: ["CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1"]
}),
(0, import_middleware_ssec.getSsecPlugin)(config),
(0, import_middleware_sdk_s334.getS3ExpiresMiddlewarePlugin)(config)
];
}).s("AmazonS3", "GetObject", {}).n("S3Client", "GetObjectCommand").f(GetObjectRequestFilterSensitiveLog, GetObjectOutputFilterSensitiveLog).ser(se_GetObjectCommand).de(de_GetObjectCommand).build() {
static {
__name(this, "GetObjectCommand");
}
};
// src/commands/GetObjectLegalHoldCommand.ts
var import_middleware_sdk_s335 = __nccwpck_require__(81139);
var GetObjectLegalHoldCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s335.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectLegalHold", {}).n("S3Client", "GetObjectLegalHoldCommand").f(void 0, void 0).ser(se_GetObjectLegalHoldCommand).de(de_GetObjectLegalHoldCommand).build() {
static {
__name(this, "GetObjectLegalHoldCommand");
}
};
// src/commands/GetObjectLockConfigurationCommand.ts
var import_middleware_sdk_s336 = __nccwpck_require__(81139);
var GetObjectLockConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s336.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectLockConfiguration", {}).n("S3Client", "GetObjectLockConfigurationCommand").f(void 0, void 0).ser(se_GetObjectLockConfigurationCommand).de(de_GetObjectLockConfigurationCommand).build() {
static {
__name(this, "GetObjectLockConfigurationCommand");
}
};
// src/commands/GetObjectRetentionCommand.ts
var import_middleware_sdk_s337 = __nccwpck_require__(81139);
var GetObjectRetentionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s337.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectRetention", {}).n("S3Client", "GetObjectRetentionCommand").f(void 0, void 0).ser(se_GetObjectRetentionCommand).de(de_GetObjectRetentionCommand).build() {
static {
__name(this, "GetObjectRetentionCommand");
}
};
// src/commands/GetObjectTaggingCommand.ts
var import_middleware_sdk_s338 = __nccwpck_require__(81139);
var GetObjectTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s338.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectTagging", {}).n("S3Client", "GetObjectTaggingCommand").f(void 0, void 0).ser(se_GetObjectTaggingCommand).de(de_GetObjectTaggingCommand).build() {
static {
__name(this, "GetObjectTaggingCommand");
}
};
// src/commands/GetObjectTorrentCommand.ts
var GetObjectTorrentCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "GetObjectTorrent", {}).n("S3Client", "GetObjectTorrentCommand").f(void 0, GetObjectTorrentOutputFilterSensitiveLog).ser(se_GetObjectTorrentCommand).de(de_GetObjectTorrentCommand).build() {
static {
__name(this, "GetObjectTorrentCommand");
}
};
// src/commands/GetPublicAccessBlockCommand.ts
var import_middleware_sdk_s339 = __nccwpck_require__(81139);
var GetPublicAccessBlockCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s339.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetPublicAccessBlock", {}).n("S3Client", "GetPublicAccessBlockCommand").f(void 0, void 0).ser(se_GetPublicAccessBlockCommand).de(de_GetPublicAccessBlockCommand).build() {
static {
__name(this, "GetPublicAccessBlockCommand");
}
};
// src/commands/HeadBucketCommand.ts
var import_middleware_sdk_s340 = __nccwpck_require__(81139);
var HeadBucketCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s340.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "HeadBucket", {}).n("S3Client", "HeadBucketCommand").f(void 0, void 0).ser(se_HeadBucketCommand).de(de_HeadBucketCommand).build() {
static {
__name(this, "HeadBucketCommand");
}
};
// src/commands/HeadObjectCommand.ts
var import_middleware_sdk_s341 = __nccwpck_require__(81139);
var HeadObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s341.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config),
(0, import_middleware_sdk_s341.getS3ExpiresMiddlewarePlugin)(config)
];
}).s("AmazonS3", "HeadObject", {}).n("S3Client", "HeadObjectCommand").f(HeadObjectRequestFilterSensitiveLog, HeadObjectOutputFilterSensitiveLog).ser(se_HeadObjectCommand).de(de_HeadObjectCommand).build() {
static {
__name(this, "HeadObjectCommand");
}
};
// src/commands/ListBucketAnalyticsConfigurationsCommand.ts
var import_middleware_sdk_s342 = __nccwpck_require__(81139);
var ListBucketAnalyticsConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s342.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBucketAnalyticsConfigurations", {}).n("S3Client", "ListBucketAnalyticsConfigurationsCommand").f(void 0, void 0).ser(se_ListBucketAnalyticsConfigurationsCommand).de(de_ListBucketAnalyticsConfigurationsCommand).build() {
static {
__name(this, "ListBucketAnalyticsConfigurationsCommand");
}
};
// src/commands/ListBucketIntelligentTieringConfigurationsCommand.ts
var import_middleware_sdk_s343 = __nccwpck_require__(81139);
var ListBucketIntelligentTieringConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s343.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBucketIntelligentTieringConfigurations", {}).n("S3Client", "ListBucketIntelligentTieringConfigurationsCommand").f(void 0, void 0).ser(se_ListBucketIntelligentTieringConfigurationsCommand).de(de_ListBucketIntelligentTieringConfigurationsCommand).build() {
static {
__name(this, "ListBucketIntelligentTieringConfigurationsCommand");
}
};
// src/commands/ListBucketInventoryConfigurationsCommand.ts
var import_middleware_sdk_s344 = __nccwpck_require__(81139);
var ListBucketInventoryConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s344.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBucketInventoryConfigurations", {}).n("S3Client", "ListBucketInventoryConfigurationsCommand").f(void 0, ListBucketInventoryConfigurationsOutputFilterSensitiveLog).ser(se_ListBucketInventoryConfigurationsCommand).de(de_ListBucketInventoryConfigurationsCommand).build() {
static {
__name(this, "ListBucketInventoryConfigurationsCommand");
}
};
// src/commands/ListBucketMetricsConfigurationsCommand.ts
var import_middleware_sdk_s345 = __nccwpck_require__(81139);
var ListBucketMetricsConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s345.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBucketMetricsConfigurations", {}).n("S3Client", "ListBucketMetricsConfigurationsCommand").f(void 0, void 0).ser(se_ListBucketMetricsConfigurationsCommand).de(de_ListBucketMetricsConfigurationsCommand).build() {
static {
__name(this, "ListBucketMetricsConfigurationsCommand");
}
};
// src/commands/ListBucketsCommand.ts
var import_middleware_sdk_s346 = __nccwpck_require__(81139);
var ListBucketsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s346.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBuckets", {}).n("S3Client", "ListBucketsCommand").f(void 0, void 0).ser(se_ListBucketsCommand).de(de_ListBucketsCommand).build() {
static {
__name(this, "ListBucketsCommand");
}
};
// src/commands/ListDirectoryBucketsCommand.ts
var import_middleware_sdk_s347 = __nccwpck_require__(81139);
var ListDirectoryBucketsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s347.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListDirectoryBuckets", {}).n("S3Client", "ListDirectoryBucketsCommand").f(void 0, void 0).ser(se_ListDirectoryBucketsCommand).de(de_ListDirectoryBucketsCommand).build() {
static {
__name(this, "ListDirectoryBucketsCommand");
}
};
// src/commands/ListMultipartUploadsCommand.ts
var import_middleware_sdk_s348 = __nccwpck_require__(81139);
var ListMultipartUploadsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Prefix: { type: "contextParams", name: "Prefix" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s348.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListMultipartUploads", {}).n("S3Client", "ListMultipartUploadsCommand").f(void 0, void 0).ser(se_ListMultipartUploadsCommand).de(de_ListMultipartUploadsCommand).build() {
static {
__name(this, "ListMultipartUploadsCommand");
}
};
// src/commands/ListObjectsCommand.ts
var import_middleware_sdk_s349 = __nccwpck_require__(81139);
var ListObjectsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Prefix: { type: "contextParams", name: "Prefix" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s349.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListObjects", {}).n("S3Client", "ListObjectsCommand").f(void 0, void 0).ser(se_ListObjectsCommand).de(de_ListObjectsCommand).build() {
static {
__name(this, "ListObjectsCommand");
}
};
// src/commands/ListObjectsV2Command.ts
var import_middleware_sdk_s350 = __nccwpck_require__(81139);
var ListObjectsV2Command = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Prefix: { type: "contextParams", name: "Prefix" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s350.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListObjectsV2", {}).n("S3Client", "ListObjectsV2Command").f(void 0, void 0).ser(se_ListObjectsV2Command).de(de_ListObjectsV2Command).build() {
static {
__name(this, "ListObjectsV2Command");
}
};
// src/commands/ListObjectVersionsCommand.ts
var import_middleware_sdk_s351 = __nccwpck_require__(81139);
var ListObjectVersionsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Prefix: { type: "contextParams", name: "Prefix" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s351.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListObjectVersions", {}).n("S3Client", "ListObjectVersionsCommand").f(void 0, void 0).ser(se_ListObjectVersionsCommand).de(de_ListObjectVersionsCommand).build() {
static {
__name(this, "ListObjectVersionsCommand");
}
};
// src/commands/ListPartsCommand.ts
var import_middleware_sdk_s352 = __nccwpck_require__(81139);
var ListPartsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s352.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "ListParts", {}).n("S3Client", "ListPartsCommand").f(ListPartsRequestFilterSensitiveLog, void 0).ser(se_ListPartsCommand).de(de_ListPartsCommand).build() {
static {
__name(this, "ListPartsCommand");
}
};
// src/commands/PutBucketAccelerateConfigurationCommand.ts
var PutBucketAccelerateConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: false
})
];
}).s("AmazonS3", "PutBucketAccelerateConfiguration", {}).n("S3Client", "PutBucketAccelerateConfigurationCommand").f(void 0, void 0).ser(se_PutBucketAccelerateConfigurationCommand).de(de_PutBucketAccelerateConfigurationCommand).build() {
static {
__name(this, "PutBucketAccelerateConfigurationCommand");
}
};
// src/commands/PutBucketAclCommand.ts
var PutBucketAclCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketAcl", {}).n("S3Client", "PutBucketAclCommand").f(void 0, void 0).ser(se_PutBucketAclCommand).de(de_PutBucketAclCommand).build() {
static {
__name(this, "PutBucketAclCommand");
}
};
// src/commands/PutBucketAnalyticsConfigurationCommand.ts
var PutBucketAnalyticsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketAnalyticsConfiguration", {}).n("S3Client", "PutBucketAnalyticsConfigurationCommand").f(void 0, void 0).ser(se_PutBucketAnalyticsConfigurationCommand).de(de_PutBucketAnalyticsConfigurationCommand).build() {
static {
__name(this, "PutBucketAnalyticsConfigurationCommand");
}
};
// src/commands/PutBucketCorsCommand.ts
var PutBucketCorsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketCors", {}).n("S3Client", "PutBucketCorsCommand").f(void 0, void 0).ser(se_PutBucketCorsCommand).de(de_PutBucketCorsCommand).build() {
static {
__name(this, "PutBucketCorsCommand");
}
};
// src/commands/PutBucketEncryptionCommand.ts
var PutBucketEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketEncryption", {}).n("S3Client", "PutBucketEncryptionCommand").f(PutBucketEncryptionRequestFilterSensitiveLog, void 0).ser(se_PutBucketEncryptionCommand).de(de_PutBucketEncryptionCommand).build() {
static {
__name(this, "PutBucketEncryptionCommand");
}
};
// src/commands/PutBucketIntelligentTieringConfigurationCommand.ts
var PutBucketIntelligentTieringConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketIntelligentTieringConfiguration", {}).n("S3Client", "PutBucketIntelligentTieringConfigurationCommand").f(void 0, void 0).ser(se_PutBucketIntelligentTieringConfigurationCommand).de(de_PutBucketIntelligentTieringConfigurationCommand).build() {
static {
__name(this, "PutBucketIntelligentTieringConfigurationCommand");
}
};
// src/commands/PutBucketInventoryConfigurationCommand.ts
var PutBucketInventoryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketInventoryConfiguration", {}).n("S3Client", "PutBucketInventoryConfigurationCommand").f(PutBucketInventoryConfigurationRequestFilterSensitiveLog, void 0).ser(se_PutBucketInventoryConfigurationCommand).de(de_PutBucketInventoryConfigurationCommand).build() {
static {
__name(this, "PutBucketInventoryConfigurationCommand");
}
};
// src/commands/PutBucketLifecycleConfigurationCommand.ts
var import_middleware_sdk_s353 = __nccwpck_require__(81139);
var PutBucketLifecycleConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
}),
(0, import_middleware_sdk_s353.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutBucketLifecycleConfiguration", {}).n("S3Client", "PutBucketLifecycleConfigurationCommand").f(void 0, void 0).ser(se_PutBucketLifecycleConfigurationCommand).de(de_PutBucketLifecycleConfigurationCommand).build() {
static {
__name(this, "PutBucketLifecycleConfigurationCommand");
}
};
// src/commands/PutBucketLoggingCommand.ts
var PutBucketLoggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketLogging", {}).n("S3Client", "PutBucketLoggingCommand").f(void 0, void 0).ser(se_PutBucketLoggingCommand).de(de_PutBucketLoggingCommand).build() {
static {
__name(this, "PutBucketLoggingCommand");
}
};
// src/commands/PutBucketMetricsConfigurationCommand.ts
var PutBucketMetricsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketMetricsConfiguration", {}).n("S3Client", "PutBucketMetricsConfigurationCommand").f(void 0, void 0).ser(se_PutBucketMetricsConfigurationCommand).de(de_PutBucketMetricsConfigurationCommand).build() {
static {
__name(this, "PutBucketMetricsConfigurationCommand");
}
};
// src/commands/PutBucketNotificationConfigurationCommand.ts
var PutBucketNotificationConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketNotificationConfiguration", {}).n("S3Client", "PutBucketNotificationConfigurationCommand").f(void 0, void 0).ser(se_PutBucketNotificationConfigurationCommand).de(de_PutBucketNotificationConfigurationCommand).build() {
static {
__name(this, "PutBucketNotificationConfigurationCommand");
}
};
// src/commands/PutBucketOwnershipControlsCommand.ts
var PutBucketOwnershipControlsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketOwnershipControls", {}).n("S3Client", "PutBucketOwnershipControlsCommand").f(void 0, void 0).ser(se_PutBucketOwnershipControlsCommand).de(de_PutBucketOwnershipControlsCommand).build() {
static {
__name(this, "PutBucketOwnershipControlsCommand");
}
};
// src/commands/PutBucketPolicyCommand.ts
var PutBucketPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketPolicy", {}).n("S3Client", "PutBucketPolicyCommand").f(void 0, void 0).ser(se_PutBucketPolicyCommand).de(de_PutBucketPolicyCommand).build() {
static {
__name(this, "PutBucketPolicyCommand");
}
};
// src/commands/PutBucketReplicationCommand.ts
var PutBucketReplicationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketReplication", {}).n("S3Client", "PutBucketReplicationCommand").f(void 0, void 0).ser(se_PutBucketReplicationCommand).de(de_PutBucketReplicationCommand).build() {
static {
__name(this, "PutBucketReplicationCommand");
}
};
// src/commands/PutBucketRequestPaymentCommand.ts
var PutBucketRequestPaymentCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketRequestPayment", {}).n("S3Client", "PutBucketRequestPaymentCommand").f(void 0, void 0).ser(se_PutBucketRequestPaymentCommand).de(de_PutBucketRequestPaymentCommand).build() {
static {
__name(this, "PutBucketRequestPaymentCommand");
}
};
// src/commands/PutBucketTaggingCommand.ts
var PutBucketTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketTagging", {}).n("S3Client", "PutBucketTaggingCommand").f(void 0, void 0).ser(se_PutBucketTaggingCommand).de(de_PutBucketTaggingCommand).build() {
static {
__name(this, "PutBucketTaggingCommand");
}
};
// src/commands/PutBucketVersioningCommand.ts
var PutBucketVersioningCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketVersioning", {}).n("S3Client", "PutBucketVersioningCommand").f(void 0, void 0).ser(se_PutBucketVersioningCommand).de(de_PutBucketVersioningCommand).build() {
static {
__name(this, "PutBucketVersioningCommand");
}
};
// src/commands/PutBucketWebsiteCommand.ts
var PutBucketWebsiteCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketWebsite", {}).n("S3Client", "PutBucketWebsiteCommand").f(void 0, void 0).ser(se_PutBucketWebsiteCommand).de(de_PutBucketWebsiteCommand).build() {
static {
__name(this, "PutBucketWebsiteCommand");
}
};
// src/commands/PutObjectAclCommand.ts
var import_middleware_sdk_s354 = __nccwpck_require__(81139);
var PutObjectAclCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
}),
(0, import_middleware_sdk_s354.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectAcl", {}).n("S3Client", "PutObjectAclCommand").f(void 0, void 0).ser(se_PutObjectAclCommand).de(de_PutObjectAclCommand).build() {
static {
__name(this, "PutObjectAclCommand");
}
};
// src/commands/PutObjectCommand.ts
var import_middleware_sdk_s355 = __nccwpck_require__(81139);
var PutObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: false
}),
(0, import_middleware_sdk_s355.getCheckContentLengthHeaderPlugin)(config),
(0, import_middleware_sdk_s355.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "PutObject", {}).n("S3Client", "PutObjectCommand").f(PutObjectRequestFilterSensitiveLog, PutObjectOutputFilterSensitiveLog).ser(se_PutObjectCommand).de(de_PutObjectCommand).build() {
static {
__name(this, "PutObjectCommand");
}
};
// src/commands/PutObjectLegalHoldCommand.ts
var import_middleware_sdk_s356 = __nccwpck_require__(81139);
var PutObjectLegalHoldCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
}),
(0, import_middleware_sdk_s356.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectLegalHold", {}).n("S3Client", "PutObjectLegalHoldCommand").f(void 0, void 0).ser(se_PutObjectLegalHoldCommand).de(de_PutObjectLegalHoldCommand).build() {
static {
__name(this, "PutObjectLegalHoldCommand");
}
};
// src/commands/PutObjectLockConfigurationCommand.ts
var import_middleware_sdk_s357 = __nccwpck_require__(81139);
var PutObjectLockConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
}),
(0, import_middleware_sdk_s357.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectLockConfiguration", {}).n("S3Client", "PutObjectLockConfigurationCommand").f(void 0, void 0).ser(se_PutObjectLockConfigurationCommand).de(de_PutObjectLockConfigurationCommand).build() {
static {
__name(this, "PutObjectLockConfigurationCommand");
}
};
// src/commands/PutObjectRetentionCommand.ts
var import_middleware_sdk_s358 = __nccwpck_require__(81139);
var PutObjectRetentionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
}),
(0, import_middleware_sdk_s358.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectRetention", {}).n("S3Client", "PutObjectRetentionCommand").f(void 0, void 0).ser(se_PutObjectRetentionCommand).de(de_PutObjectRetentionCommand).build() {
static {
__name(this, "PutObjectRetentionCommand");
}
};
// src/commands/PutObjectTaggingCommand.ts
var import_middleware_sdk_s359 = __nccwpck_require__(81139);
var PutObjectTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
}),
(0, import_middleware_sdk_s359.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectTagging", {}).n("S3Client", "PutObjectTaggingCommand").f(void 0, void 0).ser(se_PutObjectTaggingCommand).de(de_PutObjectTaggingCommand).build() {
static {
__name(this, "PutObjectTaggingCommand");
}
};
// src/commands/PutPublicAccessBlockCommand.ts
var PutPublicAccessBlockCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutPublicAccessBlock", {}).n("S3Client", "PutPublicAccessBlockCommand").f(void 0, void 0).ser(se_PutPublicAccessBlockCommand).de(de_PutPublicAccessBlockCommand).build() {
static {
__name(this, "PutPublicAccessBlockCommand");
}
};
// src/commands/RestoreObjectCommand.ts
var import_middleware_sdk_s360 = __nccwpck_require__(81139);
var RestoreObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: false
}),
(0, import_middleware_sdk_s360.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "RestoreObject", {}).n("S3Client", "RestoreObjectCommand").f(RestoreObjectRequestFilterSensitiveLog, void 0).ser(se_RestoreObjectCommand).de(de_RestoreObjectCommand).build() {
static {
__name(this, "RestoreObjectCommand");
}
};
// src/commands/SelectObjectContentCommand.ts
var import_middleware_sdk_s361 = __nccwpck_require__(81139);
var SelectObjectContentCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s361.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "SelectObjectContent", {
/**
* @internal
*/
eventStream: {
output: true
}
}).n("S3Client", "SelectObjectContentCommand").f(SelectObjectContentRequestFilterSensitiveLog, SelectObjectContentOutputFilterSensitiveLog).ser(se_SelectObjectContentCommand).de(de_SelectObjectContentCommand).build() {
static {
__name(this, "SelectObjectContentCommand");
}
};
// src/commands/UploadPartCommand.ts
var import_middleware_sdk_s362 = __nccwpck_require__(81139);
var UploadPartCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: false
}),
(0, import_middleware_sdk_s362.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "UploadPart", {}).n("S3Client", "UploadPartCommand").f(UploadPartRequestFilterSensitiveLog, UploadPartOutputFilterSensitiveLog).ser(se_UploadPartCommand).de(de_UploadPartCommand).build() {
static {
__name(this, "UploadPartCommand");
}
};
// src/commands/UploadPartCopyCommand.ts
var import_middleware_sdk_s363 = __nccwpck_require__(81139);
var UploadPartCopyCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_sdk_s363.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "UploadPartCopy", {}).n("S3Client", "UploadPartCopyCommand").f(UploadPartCopyRequestFilterSensitiveLog, UploadPartCopyOutputFilterSensitiveLog).ser(se_UploadPartCopyCommand).de(de_UploadPartCopyCommand).build() {
static {
__name(this, "UploadPartCopyCommand");
}
};
// src/commands/WriteGetObjectResponseCommand.ts
var WriteGetObjectResponseCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseObjectLambdaEndpoint: { type: "staticContextParams", value: true }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "WriteGetObjectResponse", {}).n("S3Client", "WriteGetObjectResponseCommand").f(WriteGetObjectResponseRequestFilterSensitiveLog, void 0).ser(se_WriteGetObjectResponseCommand).de(de_WriteGetObjectResponseCommand).build() {
static {
__name(this, "WriteGetObjectResponseCommand");
}
};
// src/S3.ts
var commands = {
AbortMultipartUploadCommand,
CompleteMultipartUploadCommand,
CopyObjectCommand,
CreateBucketCommand,
CreateBucketMetadataTableConfigurationCommand,
CreateMultipartUploadCommand,
CreateSessionCommand,
DeleteBucketCommand,
DeleteBucketAnalyticsConfigurationCommand,
DeleteBucketCorsCommand,
DeleteBucketEncryptionCommand,
DeleteBucketIntelligentTieringConfigurationCommand,
DeleteBucketInventoryConfigurationCommand,
DeleteBucketLifecycleCommand,
DeleteBucketMetadataTableConfigurationCommand,
DeleteBucketMetricsConfigurationCommand,
DeleteBucketOwnershipControlsCommand,
DeleteBucketPolicyCommand,
DeleteBucketReplicationCommand,
DeleteBucketTaggingCommand,
DeleteBucketWebsiteCommand,
DeleteObjectCommand,
DeleteObjectsCommand,
DeleteObjectTaggingCommand,
DeletePublicAccessBlockCommand,
GetBucketAccelerateConfigurationCommand,
GetBucketAclCommand,
GetBucketAnalyticsConfigurationCommand,
GetBucketCorsCommand,
GetBucketEncryptionCommand,
GetBucketIntelligentTieringConfigurationCommand,
GetBucketInventoryConfigurationCommand,
GetBucketLifecycleConfigurationCommand,
GetBucketLocationCommand,
GetBucketLoggingCommand,
GetBucketMetadataTableConfigurationCommand,
GetBucketMetricsConfigurationCommand,
GetBucketNotificationConfigurationCommand,
GetBucketOwnershipControlsCommand,
GetBucketPolicyCommand,
GetBucketPolicyStatusCommand,
GetBucketReplicationCommand,
GetBucketRequestPaymentCommand,
GetBucketTaggingCommand,
GetBucketVersioningCommand,
GetBucketWebsiteCommand,
GetObjectCommand,
GetObjectAclCommand,
GetObjectAttributesCommand,
GetObjectLegalHoldCommand,
GetObjectLockConfigurationCommand,
GetObjectRetentionCommand,
GetObjectTaggingCommand,
GetObjectTorrentCommand,
GetPublicAccessBlockCommand,
HeadBucketCommand,
HeadObjectCommand,
ListBucketAnalyticsConfigurationsCommand,
ListBucketIntelligentTieringConfigurationsCommand,
ListBucketInventoryConfigurationsCommand,
ListBucketMetricsConfigurationsCommand,
ListBucketsCommand,
ListDirectoryBucketsCommand,
ListMultipartUploadsCommand,
ListObjectsCommand,
ListObjectsV2Command,
ListObjectVersionsCommand,
ListPartsCommand,
PutBucketAccelerateConfigurationCommand,
PutBucketAclCommand,
PutBucketAnalyticsConfigurationCommand,
PutBucketCorsCommand,
PutBucketEncryptionCommand,
PutBucketIntelligentTieringConfigurationCommand,
PutBucketInventoryConfigurationCommand,
PutBucketLifecycleConfigurationCommand,
PutBucketLoggingCommand,
PutBucketMetricsConfigurationCommand,
PutBucketNotificationConfigurationCommand,
PutBucketOwnershipControlsCommand,
PutBucketPolicyCommand,
PutBucketReplicationCommand,
PutBucketRequestPaymentCommand,
PutBucketTaggingCommand,
PutBucketVersioningCommand,
PutBucketWebsiteCommand,
PutObjectCommand,
PutObjectAclCommand,
PutObjectLegalHoldCommand,
PutObjectLockConfigurationCommand,
PutObjectRetentionCommand,
PutObjectTaggingCommand,
PutPublicAccessBlockCommand,
RestoreObjectCommand,
SelectObjectContentCommand,
UploadPartCommand,
UploadPartCopyCommand,
WriteGetObjectResponseCommand
};
var S3 = class extends S3Client {
static {
__name(this, "S3");
}
};
(0, import_smithy_client.createAggregatedClient)(commands, S3);
// src/pagination/ListBucketsPaginator.ts
var import_core4 = __nccwpck_require__(55829);
var paginateListBuckets = (0, import_core4.createPaginator)(S3Client, ListBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxBuckets");
// src/pagination/ListDirectoryBucketsPaginator.ts
var import_core5 = __nccwpck_require__(55829);
var paginateListDirectoryBuckets = (0, import_core5.createPaginator)(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets");
// src/pagination/ListObjectsV2Paginator.ts
var import_core6 = __nccwpck_require__(55829);
var paginateListObjectsV2 = (0, import_core6.createPaginator)(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys");
// src/pagination/ListPartsPaginator.ts
var import_core7 = __nccwpck_require__(55829);
var paginateListParts = (0, import_core7.createPaginator)(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts");
// src/waiters/waitForBucketExists.ts
var import_util_waiter = __nccwpck_require__(78011);
var checkState = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new HeadBucketCommand(input));
reason = result;
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "NotFound") {
return { state: import_util_waiter.WaiterState.RETRY, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForBucketExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
}, "waitForBucketExists");
var waitUntilBucketExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilBucketExists");
// src/waiters/waitForBucketNotExists.ts
var checkState2 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new HeadBucketCommand(input));
reason = result;
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "NotFound") {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForBucketNotExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
}, "waitForBucketNotExists");
var waitUntilBucketNotExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilBucketNotExists");
// src/waiters/waitForObjectExists.ts
var checkState3 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new HeadObjectCommand(input));
reason = result;
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "NotFound") {
return { state: import_util_waiter.WaiterState.RETRY, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForObjectExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);
}, "waitForObjectExists");
var waitUntilObjectExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilObjectExists");
// src/waiters/waitForObjectNotExists.ts
var checkState4 = /* @__PURE__ */ __name(async (client, input) => {
let reason;
try {
const result = await client.send(new HeadObjectCommand(input));
reason = result;
} catch (exception) {
reason = exception;
if (exception.name && exception.name == "NotFound") {
return { state: import_util_waiter.WaiterState.SUCCESS, reason };
}
}
return { state: import_util_waiter.WaiterState.RETRY, reason };
}, "checkState");
var waitForObjectNotExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);
}, "waitForObjectNotExists");
var waitUntilObjectNotExists = /* @__PURE__ */ __name(async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilObjectNotExists");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 12714:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(50677));
const core_1 = __nccwpck_require__(59963);
const credential_provider_node_1 = __nccwpck_require__(75531);
const middleware_bucket_endpoint_1 = __nccwpck_require__(96689);
const middleware_flexible_checksums_1 = __nccwpck_require__(13799);
const middleware_sdk_s3_1 = __nccwpck_require__(81139);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const config_resolver_1 = __nccwpck_require__(53098);
const eventstream_serde_node_1 = __nccwpck_require__(77682);
const hash_node_1 = __nccwpck_require__(3081);
const hash_stream_node_1 = __nccwpck_require__(48866);
const middleware_retry_1 = __nccwpck_require__(96039);
const node_config_provider_1 = __nccwpck_require__(33461);
const node_http_handler_1 = __nccwpck_require__(20258);
const util_body_length_node_1 = __nccwpck_require__(68075);
const util_retry_1 = __nccwpck_require__(84902);
const runtimeConfig_shared_1 = __nccwpck_require__(5239);
const smithy_client_1 = __nccwpck_require__(63570);
const util_defaults_mode_node_1 = __nccwpck_require__(72429);
const smithy_client_2 = __nccwpck_require__(63570);
const getRuntimeConfig = (config) => {
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
const profileConfig = { profile: config?.profile };
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ??
(0, node_config_provider_1.loadConfig)(middleware_sdk_s3_1.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, profileConfig),
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider,
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
md5: config?.md5 ?? hash_node_1.Hash.bind(null, "md5"),
region: config?.region ??
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
requestChecksumCalculation: config?.requestChecksumCalculation ??
(0, node_config_provider_1.loadConfig)(middleware_flexible_checksums_1.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, profileConfig),
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
responseChecksumValidation: config?.responseChecksumValidation ??
(0, node_config_provider_1.loadConfig)(middleware_flexible_checksums_1.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, profileConfig),
retryMode: config?.retryMode ??
(0, node_config_provider_1.loadConfig)({
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
}, config),
sha1: config?.sha1 ?? hash_node_1.Hash.bind(null, "sha1"),
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_SIGV4A_CONFIG_OPTIONS, profileConfig),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
streamHasher: config?.streamHasher ?? hash_stream_node_1.readableStreamHasher,
useArnRegion: config?.useArnRegion ?? (0, node_config_provider_1.loadConfig)(middleware_bucket_endpoint_1.NODE_USE_ARN_REGION_CONFIG_OPTIONS, profileConfig),
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 5239:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const core_1 = __nccwpck_require__(59963);
const signature_v4_multi_region_1 = __nccwpck_require__(51856);
const smithy_client_1 = __nccwpck_require__(63570);
const url_parser_1 = __nccwpck_require__(14681);
const util_base64_1 = __nccwpck_require__(75600);
const util_stream_1 = __nccwpck_require__(96607);
const util_utf8_1 = __nccwpck_require__(41895);
const httpAuthSchemeProvider_1 = __nccwpck_require__(69023);
const endpointResolver_1 = __nccwpck_require__(3722);
const getRuntimeConfig = (config) => {
return {
apiVersion: "2006-03-01",
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
extensions: config?.extensions ?? [],
getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? util_stream_1.getAwsChunkedEncodingStream,
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultS3HttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new core_1.AwsSdkSigV4Signer(),
},
{
schemeId: "aws.auth#sigv4a",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
signer: new core_1.AwsSdkSigV4ASigner(),
},
],
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
sdkStreamMixin: config?.sdkStreamMixin ?? util_stream_1.sdkStreamMixin,
serviceId: config?.serviceId ?? "S3",
signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
signingEscapePath: config?.signingEscapePath ?? false,
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
useArnRegion: config?.useArnRegion ?? false,
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 49344:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;
const core_1 = __nccwpck_require__(59963);
const util_middleware_1 = __nccwpck_require__(2390);
const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
(() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "awsssoportal",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
return {
schemeId: "smithy.api#noAuth",
};
}
const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
case "GetRoleCredentials": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
case "ListAccountRoles": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
case "ListAccounts": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
case "Logout": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;
const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
return Object.assign(config_0, {});
};
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
/***/ }),
/***/ 30898:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultEndpointResolver = void 0;
const util_endpoints_1 = __nccwpck_require__(13350);
const util_endpoints_2 = __nccwpck_require__(45473);
const ruleset_1 = __nccwpck_require__(13341);
const cache = new util_endpoints_2.EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});
const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
exports.defaultEndpointResolver = defaultEndpointResolver;
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
/***/ }),
/***/ 13341:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ruleSet = void 0;
const u = "required", v = "fn", w = "argv", x = "ref";
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
exports.ruleSet = _data;
/***/ }),
/***/ 82666:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,
GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog,
GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog,
InvalidRequestException: () => InvalidRequestException,
ListAccountRolesCommand: () => ListAccountRolesCommand,
ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog,
ListAccountsCommand: () => ListAccountsCommand,
ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog,
LogoutCommand: () => LogoutCommand,
LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog,
ResourceNotFoundException: () => ResourceNotFoundException,
RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog,
SSO: () => SSO,
SSOClient: () => SSOClient,
SSOServiceException: () => SSOServiceException,
TooManyRequestsException: () => TooManyRequestsException,
UnauthorizedException: () => UnauthorizedException,
__Client: () => import_smithy_client.Client,
paginateListAccountRoles: () => paginateListAccountRoles,
paginateListAccounts: () => paginateListAccounts
});
module.exports = __toCommonJS(index_exports);
// src/SSOClient.ts
var import_middleware_host_header = __nccwpck_require__(22545);
var import_middleware_logger = __nccwpck_require__(20014);
var import_middleware_recursion_detection = __nccwpck_require__(85525);
var import_middleware_user_agent = __nccwpck_require__(64688);
var import_config_resolver = __nccwpck_require__(53098);
var import_core = __nccwpck_require__(55829);
var import_middleware_content_length = __nccwpck_require__(82800);
var import_middleware_endpoint = __nccwpck_require__(82918);
var import_middleware_retry = __nccwpck_require__(96039);
var import_httpAuthSchemeProvider = __nccwpck_require__(49344);
// src/endpoint/EndpointParameters.ts
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "awsssoportal"
});
}, "resolveClientEndpointParameters");
var commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
// src/SSOClient.ts
var import_runtimeConfig = __nccwpck_require__(19756);
// src/runtimeExtensions.ts
var import_region_config_resolver = __nccwpck_require__(18156);
var import_protocol_http = __nccwpck_require__(64418);
var import_smithy_client = __nccwpck_require__(63570);
// src/auth/httpAuthExtensionConfiguration.ts
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
} else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
}
};
}, "getHttpAuthExtensionConfiguration");
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials()
};
}, "resolveHttpAuthRuntimeConfig");
// src/runtimeExtensions.ts
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
getHttpAuthExtensionConfiguration(runtimeConfig)
);
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(
runtimeConfig,
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
resolveHttpAuthRuntimeConfig(extensionConfiguration)
);
}, "resolveRuntimeExtensions");
// src/SSOClient.ts
var SSOClient = class extends import_smithy_client.Client {
static {
__name(this, "SSOClient");
}
/**
* The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.
*/
config;
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use(
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials
}), "identityProviderConfigProvider")
})
);
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
}
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy() {
super.destroy();
}
};
// src/SSO.ts
// src/commands/GetRoleCredentialsCommand.ts
var import_middleware_serde = __nccwpck_require__(81238);
// src/models/models_0.ts
// src/models/SSOServiceException.ts
var SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException {
static {
__name(this, "SSOServiceException");
}
/**
* @internal
*/
constructor(options) {
super(options);
Object.setPrototypeOf(this, _SSOServiceException.prototype);
}
};
// src/models/models_0.ts
var InvalidRequestException = class _InvalidRequestException extends SSOServiceException {
static {
__name(this, "InvalidRequestException");
}
name = "InvalidRequestException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidRequestException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidRequestException.prototype);
}
};
var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException {
static {
__name(this, "ResourceNotFoundException");
}
name = "ResourceNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
}
};
var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException {
static {
__name(this, "TooManyRequestsException");
}
name = "TooManyRequestsException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "TooManyRequestsException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TooManyRequestsException.prototype);
}
};
var UnauthorizedException = class _UnauthorizedException extends SSOServiceException {
static {
__name(this, "UnauthorizedException");
}
name = "UnauthorizedException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "UnauthorizedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _UnauthorizedException.prototype);
}
};
var GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
}), "GetRoleCredentialsRequestFilterSensitiveLog");
var RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING },
...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING }
}), "RoleCredentialsFilterSensitiveLog");
var GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }
}), "GetRoleCredentialsResponseFilterSensitiveLog");
var ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
}), "ListAccountRolesRequestFilterSensitiveLog");
var ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
}), "ListAccountsRequestFilterSensitiveLog");
var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
}), "LogoutRequestFilterSensitiveLog");
// src/protocols/Aws_restJson1.ts
var import_core2 = __nccwpck_require__(59963);
var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xasbt]: input[_aT]
});
b.bp("/federation/credentials");
const query = (0, import_smithy_client.map)({
[_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)],
[_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetRoleCredentialsCommand");
var se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xasbt]: input[_aT]
});
b.bp("/assignment/roles");
const query = (0, import_smithy_client.map)({
[_nt]: [, input[_nT]],
[_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
[_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListAccountRolesCommand");
var se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xasbt]: input[_aT]
});
b.bp("/assignment/accounts");
const query = (0, import_smithy_client.map)({
[_nt]: [, input[_nT]],
[_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListAccountsCommand");
var se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xasbt]: input[_aT]
});
b.bp("/logout");
let body;
b.m("POST").h(headers).b(body);
return b.build();
}, "se_LogoutCommand");
var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
const doc = (0, import_smithy_client.take)(data, {
roleCredentials: import_smithy_client._json
});
Object.assign(contents, doc);
return contents;
}, "de_GetRoleCredentialsCommand");
var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
const doc = (0, import_smithy_client.take)(data, {
nextToken: import_smithy_client.expectString,
roleList: import_smithy_client._json
});
Object.assign(contents, doc);
return contents;
}, "de_ListAccountRolesCommand");
var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
const doc = (0, import_smithy_client.take)(data, {
accountList: import_smithy_client._json,
nextToken: import_smithy_client.expectString
});
Object.assign(contents, doc);
return contents;
}, "de_ListAccountsCommand");
var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_LogoutCommand");
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
};
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
switch (errorCode) {
case "InvalidRequestException":
case "com.amazonaws.sso#InvalidRequestException":
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
case "ResourceNotFoundException":
case "com.amazonaws.sso#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
case "TooManyRequestsException":
case "com.amazonaws.sso#TooManyRequestsException":
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
case "UnauthorizedException":
case "com.amazonaws.sso#UnauthorizedException":
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode
});
}
}, "de_CommandError");
var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException);
var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new InvalidRequestException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidRequestExceptionRes");
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new ResourceNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_ResourceNotFoundExceptionRes");
var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new TooManyRequestsException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_TooManyRequestsExceptionRes");
var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new UnauthorizedException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_UnauthorizedExceptionRes");
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
var _aI = "accountId";
var _aT = "accessToken";
var _ai = "account_id";
var _mR = "maxResults";
var _mr = "max_result";
var _nT = "nextToken";
var _nt = "next_token";
var _rN = "roleName";
var _rn = "role_name";
var _xasbt = "x-amz-sso_bearer_token";
// src/commands/GetRoleCredentialsCommand.ts
var GetRoleCredentialsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() {
static {
__name(this, "GetRoleCredentialsCommand");
}
};
// src/commands/ListAccountRolesCommand.ts
var ListAccountRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() {
static {
__name(this, "ListAccountRolesCommand");
}
};
// src/commands/ListAccountsCommand.ts
var ListAccountsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() {
static {
__name(this, "ListAccountsCommand");
}
};
// src/commands/LogoutCommand.ts
var LogoutCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() {
static {
__name(this, "LogoutCommand");
}
};
// src/SSO.ts
var commands = {
GetRoleCredentialsCommand,
ListAccountRolesCommand,
ListAccountsCommand,
LogoutCommand
};
var SSO = class extends SSOClient {
static {
__name(this, "SSO");
}
};
(0, import_smithy_client.createAggregatedClient)(commands, SSO);
// src/pagination/ListAccountRolesPaginator.ts
var paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults");
// src/pagination/ListAccountsPaginator.ts
var paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 19756:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(91092));
const core_1 = __nccwpck_require__(59963);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const config_resolver_1 = __nccwpck_require__(53098);
const hash_node_1 = __nccwpck_require__(3081);
const middleware_retry_1 = __nccwpck_require__(96039);
const node_config_provider_1 = __nccwpck_require__(33461);
const node_http_handler_1 = __nccwpck_require__(20258);
const util_body_length_node_1 = __nccwpck_require__(68075);
const util_retry_1 = __nccwpck_require__(84902);
const runtimeConfig_shared_1 = __nccwpck_require__(44809);
const smithy_client_1 = __nccwpck_require__(63570);
const util_defaults_mode_node_1 = __nccwpck_require__(72429);
const smithy_client_2 = __nccwpck_require__(63570);
const getRuntimeConfig = (config) => {
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
const profileConfig = { profile: config?.profile };
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ??
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
(0, node_config_provider_1.loadConfig)({
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 44809:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const core_1 = __nccwpck_require__(59963);
const core_2 = __nccwpck_require__(55829);
const smithy_client_1 = __nccwpck_require__(63570);
const url_parser_1 = __nccwpck_require__(14681);
const util_base64_1 = __nccwpck_require__(75600);
const util_utf8_1 = __nccwpck_require__(41895);
const httpAuthSchemeProvider_1 = __nccwpck_require__(49344);
const endpointResolver_1 = __nccwpck_require__(30898);
const getRuntimeConfig = (config) => {
return {
apiVersion: "2019-06-10",
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new core_1.AwsSdkSigV4Signer(),
},
{
schemeId: "smithy.api#noAuth",
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
signer: new core_2.NoAuthSigner(),
},
],
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
serviceId: config?.serviceId ?? "SSO",
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 59963:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(2825), exports);
tslib_1.__exportStar(__nccwpck_require__(27862), exports);
tslib_1.__exportStar(__nccwpck_require__(50785), exports);
/***/ }),
/***/ 2825:
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/submodules/client/index.ts
var index_exports = {};
__export(index_exports, {
emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,
setCredentialFeature: () => setCredentialFeature,
setFeature: () => setFeature,
state: () => state
});
module.exports = __toCommonJS(index_exports);
// src/submodules/client/emitWarningIfUnsupportedVersion.ts
var state = {
warningEmitted: false
};
var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {
if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) {
state.warningEmitted = true;
process.emitWarning(
`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
no longer support Node.js 16.x on January 6, 2025.
To continue receiving updates to AWS services, bug fixes, and security
updates please upgrade to a supported Node.js LTS version.
More information can be found at: https://a.co/74kJMmI`
);
}
}, "emitWarningIfUnsupportedVersion");
// src/submodules/client/setCredentialFeature.ts
function setCredentialFeature(credentials, feature, value) {
if (!credentials.$source) {
credentials.$source = {};
}
credentials.$source[feature] = value;
return credentials;
}
__name(setCredentialFeature, "setCredentialFeature");
// src/submodules/client/setFeature.ts
function setFeature(context, feature, value) {
if (!context.__aws_sdk_context) {
context.__aws_sdk_context = {
features: {}
};
} else if (!context.__aws_sdk_context.features) {
context.__aws_sdk_context.features = {};
}
context.__aws_sdk_context.features[feature] = value;
}
__name(setFeature, "setFeature");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 27862:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/submodules/httpAuthSchemes/index.ts
var index_exports = {};
__export(index_exports, {
AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,
AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner,
AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,
NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS,
resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,
resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig,
resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config,
validateSigningProperties: () => validateSigningProperties
});
module.exports = __toCommonJS(index_exports);
// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts
var import_protocol_http2 = __nccwpck_require__(64418);
// src/submodules/httpAuthSchemes/utils/getDateHeader.ts
var import_protocol_http = __nccwpck_require__(64418);
var getDateHeader = /* @__PURE__ */ __name((response) => import_protocol_http.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0, "getDateHeader");
// src/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.ts
var getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate");
// src/submodules/httpAuthSchemes/utils/isClockSkewed.ts
var isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed");
// src/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts
var getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => {
const clockTimeInMs = Date.parse(clockTime);
if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
return clockTimeInMs - Date.now();
}
return currentSystemClockOffset;
}, "getUpdatedSystemClockOffset");
// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts
var throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => {
if (!property) {
throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
}
return property;
}, "throwSigningPropertyError");
var validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => {
const context = throwSigningPropertyError(
"context",
signingProperties.context
);
const config = throwSigningPropertyError("config", signingProperties.config);
const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
const signerFunction = throwSigningPropertyError(
"signer",
config.signer
);
const signer = await signerFunction(authScheme);
const signingRegion = signingProperties?.signingRegion;
const signingRegionSet = signingProperties?.signingRegionSet;
const signingName = signingProperties?.signingName;
return {
config,
signer,
signingRegion,
signingRegionSet,
signingName
};
}, "validateSigningProperties");
var AwsSdkSigV4Signer = class {
static {
__name(this, "AwsSdkSigV4Signer");
}
async sign(httpRequest, identity, signingProperties) {
if (!import_protocol_http2.HttpRequest.isInstance(httpRequest)) {
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
}
const validatedProps = await validateSigningProperties(signingProperties);
const { config, signer } = validatedProps;
let { signingRegion, signingName } = validatedProps;
const handlerExecutionContext = signingProperties.context;
if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
const [first, second] = handlerExecutionContext.authSchemes;
if (first?.name === "sigv4a" && second?.name === "sigv4") {
signingRegion = second?.signingRegion ?? signingRegion;
signingName = second?.signingName ?? signingName;
}
}
const signedRequest = await signer.sign(httpRequest, {
signingDate: getSkewCorrectedDate(config.systemClockOffset),
signingRegion,
signingService: signingName
});
return signedRequest;
}
errorHandler(signingProperties) {
return (error) => {
const serverTime = error.ServerTime ?? getDateHeader(error.$response);
if (serverTime) {
const config = throwSigningPropertyError("config", signingProperties.config);
const initialSystemClockOffset = config.systemClockOffset;
config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;
if (clockSkewCorrected && error.$metadata) {
error.$metadata.clockSkewCorrected = true;
}
}
throw error;
};
}
successHandler(httpResponse, signingProperties) {
const dateHeader = getDateHeader(httpResponse);
if (dateHeader) {
const config = throwSigningPropertyError("config", signingProperties.config);
config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
}
}
};
var AWSSDKSigV4Signer = AwsSdkSigV4Signer;
// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.ts
var import_protocol_http3 = __nccwpck_require__(64418);
var AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer {
static {
__name(this, "AwsSdkSigV4ASigner");
}
async sign(httpRequest, identity, signingProperties) {
if (!import_protocol_http3.HttpRequest.isInstance(httpRequest)) {
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
}
const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(
signingProperties
);
const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();
const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(",");
const signedRequest = await signer.sign(httpRequest, {
signingDate: getSkewCorrectedDate(config.systemClockOffset),
signingRegion: multiRegionOverride,
signingService: signingName
});
return signedRequest;
}
};
// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts
var import_core = __nccwpck_require__(55829);
var import_property_provider = __nccwpck_require__(79721);
var resolveAwsSdkSigV4AConfig = /* @__PURE__ */ __name((config) => {
config.sigv4aSigningRegionSet = (0, import_core.normalizeProvider)(config.sigv4aSigningRegionSet);
return config;
}, "resolveAwsSdkSigV4AConfig");
var NODE_SIGV4A_CONFIG_OPTIONS = {
environmentVariableSelector(env) {
if (env.AWS_SIGV4A_SIGNING_REGION_SET) {
return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
}
throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
tryNextLink: true
});
},
configFileSelector(profile) {
if (profile.sigv4a_signing_region_set) {
return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim());
}
throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", {
tryNextLink: true
});
},
default: void 0
};
// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts
var import_client = __nccwpck_require__(2825);
var import_core2 = __nccwpck_require__(55829);
var import_signature_v4 = __nccwpck_require__(11528);
var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {
let inputCredentials = config.credentials;
let isUserSupplied = !!config.credentials;
let resolvedCredentials = void 0;
Object.defineProperty(config, "credentials", {
set(credentials) {
if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
isUserSupplied = true;
}
inputCredentials = credentials;
const memoizedProvider = normalizeCredentialProvider(config, {
credentials: inputCredentials,
credentialDefaultProvider: config.credentialDefaultProvider
});
const boundProvider = bindCallerConfig(config, memoizedProvider);
if (isUserSupplied && !boundProvider.attributed) {
resolvedCredentials = /* @__PURE__ */ __name(async (options) => boundProvider(options).then(
(creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_CODE", "e")
), "resolvedCredentials");
resolvedCredentials.memoized = boundProvider.memoized;
resolvedCredentials.configBound = boundProvider.configBound;
resolvedCredentials.attributed = true;
} else {
resolvedCredentials = boundProvider;
}
},
get() {
return resolvedCredentials;
},
enumerable: true,
configurable: true
});
config.credentials = inputCredentials;
const {
// Default for signingEscapePath
signingEscapePath = true,
// Default for systemClockOffset
systemClockOffset = config.systemClockOffset || 0,
// No default for sha256 since it is platform dependent
sha256
} = config;
let signer;
if (config.signer) {
signer = (0, import_core2.normalizeProvider)(config.signer);
} else if (config.regionInfoProvider) {
signer = /* @__PURE__ */ __name(() => (0, import_core2.normalizeProvider)(config.region)().then(
async (region) => [
await config.regionInfoProvider(region, {
useFipsEndpoint: await config.useFipsEndpoint(),
useDualstackEndpoint: await config.useDualstackEndpoint()
}) || {},
region
]
).then(([regionInfo, region]) => {
const { signingRegion, signingService } = regionInfo;
config.signingRegion = config.signingRegion || signingRegion || region;
config.signingName = config.signingName || signingService || config.serviceId;
const params = {
...config,
credentials: config.credentials,
region: config.signingRegion,
service: config.signingName,
sha256,
uriEscapePath: signingEscapePath
};
const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;
return new SignerCtor(params);
}), "signer");
} else {
signer = /* @__PURE__ */ __name(async (authScheme) => {
authScheme = Object.assign(
{},
{
name: "sigv4",
signingName: config.signingName || config.defaultSigningName,
signingRegion: await (0, import_core2.normalizeProvider)(config.region)(),
properties: {}
},
authScheme
);
const signingRegion = authScheme.signingRegion;
const signingService = authScheme.signingName;
config.signingRegion = config.signingRegion || signingRegion;
config.signingName = config.signingName || signingService || config.serviceId;
const params = {
...config,
credentials: config.credentials,
region: config.signingRegion,
service: config.signingName,
sha256,
uriEscapePath: signingEscapePath
};
const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;
return new SignerCtor(params);
}, "signer");
}
const resolvedConfig = Object.assign(config, {
systemClockOffset,
signingEscapePath,
signer
});
return resolvedConfig;
}, "resolveAwsSdkSigV4Config");
var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
function normalizeCredentialProvider(config, {
credentials,
credentialDefaultProvider
}) {
let credentialsProvider;
if (credentials) {
if (!credentials?.memoized) {
credentialsProvider = (0, import_core2.memoizeIdentityProvider)(credentials, import_core2.isIdentityExpired, import_core2.doesIdentityRequireRefresh);
} else {
credentialsProvider = credentials;
}
} else {
if (credentialDefaultProvider) {
credentialsProvider = (0, import_core2.normalizeProvider)(
credentialDefaultProvider(
Object.assign({}, config, {
parentClientConfig: config
})
)
);
} else {
credentialsProvider = /* @__PURE__ */ __name(async () => {
throw new Error(
"@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured."
);
}, "credentialsProvider");
}
}
credentialsProvider.memoized = true;
return credentialsProvider;
}
__name(normalizeCredentialProvider, "normalizeCredentialProvider");
function bindCallerConfig(config, credentialsProvider) {
if (credentialsProvider.configBound) {
return credentialsProvider;
}
const fn = /* @__PURE__ */ __name(async (options) => credentialsProvider({ ...options, callerClientConfig: config }), "fn");
fn.memoized = credentialsProvider.memoized;
fn.configBound = true;
return fn;
}
__name(bindCallerConfig, "bindCallerConfig");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 50785:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/submodules/protocols/index.ts
var index_exports = {};
__export(index_exports, {
_toBool: () => _toBool,
_toNum: () => _toNum,
_toStr: () => _toStr,
awsExpectUnion: () => awsExpectUnion,
loadRestJsonErrorCode: () => loadRestJsonErrorCode,
loadRestXmlErrorCode: () => loadRestXmlErrorCode,
parseJsonBody: () => parseJsonBody,
parseJsonErrorBody: () => parseJsonErrorBody,
parseXmlBody: () => parseXmlBody,
parseXmlErrorBody: () => parseXmlErrorBody
});
module.exports = __toCommonJS(index_exports);
// src/submodules/protocols/coercing-serializers.ts
var _toStr = /* @__PURE__ */ __name((val) => {
if (val == null) {
return val;
}
if (typeof val === "number" || typeof val === "bigint") {
const warning = new Error(`Received number ${val} where a string was expected.`);
warning.name = "Warning";
console.warn(warning);
return String(val);
}
if (typeof val === "boolean") {
const warning = new Error(`Received boolean ${val} where a string was expected.`);
warning.name = "Warning";
console.warn(warning);
return String(val);
}
return val;
}, "_toStr");
var _toBool = /* @__PURE__ */ __name((val) => {
if (val == null) {
return val;
}
if (typeof val === "number") {
}
if (typeof val === "string") {
const lowercase = val.toLowerCase();
if (val !== "" && lowercase !== "false" && lowercase !== "true") {
const warning = new Error(`Received string "${val}" where a boolean was expected.`);
warning.name = "Warning";
console.warn(warning);
}
return val !== "" && lowercase !== "false";
}
return val;
}, "_toBool");
var _toNum = /* @__PURE__ */ __name((val) => {
if (val == null) {
return val;
}
if (typeof val === "boolean") {
}
if (typeof val === "string") {
const num = Number(val);
if (num.toString() !== val) {
const warning = new Error(`Received string "${val}" where a number was expected.`);
warning.name = "Warning";
console.warn(warning);
return val;
}
return num;
}
return val;
}, "_toNum");
// src/submodules/protocols/json/awsExpectUnion.ts
var import_smithy_client = __nccwpck_require__(63570);
var awsExpectUnion = /* @__PURE__ */ __name((value) => {
if (value == null) {
return void 0;
}
if (typeof value === "object" && "__type" in value) {
delete value.__type;
}
return (0, import_smithy_client.expectUnion)(value);
}, "awsExpectUnion");
// src/submodules/protocols/common.ts
var import_smithy_client2 = __nccwpck_require__(63570);
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client2.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
// src/submodules/protocols/json/parseJsonBody.ts
var parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
try {
return JSON.parse(encoded);
} catch (e) {
if (e?.name === "SyntaxError") {
Object.defineProperty(e, "$responseBodyText", {
value: encoded
});
}
throw e;
}
}
return {};
}), "parseJsonBody");
var parseJsonErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
const value = await parseJsonBody(errorBody, context);
value.message = value.message ?? value.Message;
return value;
}, "parseJsonErrorBody");
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
let cleanValue = rawValue;
if (typeof cleanValue === "number") {
cleanValue = cleanValue.toString();
}
if (cleanValue.indexOf(",") >= 0) {
cleanValue = cleanValue.split(",")[0];
}
if (cleanValue.indexOf(":") >= 0) {
cleanValue = cleanValue.split(":")[0];
}
if (cleanValue.indexOf("#") >= 0) {
cleanValue = cleanValue.split("#")[1];
}
return cleanValue;
}, "sanitizeErrorCode");
const headerKey = findKey(output.headers, "x-amzn-errortype");
if (headerKey !== void 0) {
return sanitizeErrorCode(output.headers[headerKey]);
}
if (data.code !== void 0) {
return sanitizeErrorCode(data.code);
}
if (data["__type"] !== void 0) {
return sanitizeErrorCode(data["__type"]);
}
}, "loadRestJsonErrorCode");
// src/submodules/protocols/xml/parseXmlBody.ts
var import_smithy_client3 = __nccwpck_require__(63570);
var import_fast_xml_parser = __nccwpck_require__(12603);
var parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
const parser = new import_fast_xml_parser.XMLParser({
attributeNamePrefix: "",
htmlEntities: true,
ignoreAttributes: false,
ignoreDeclaration: true,
parseTagValue: false,
trimValues: false,
tagValueProcessor: /* @__PURE__ */ __name((_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0, "tagValueProcessor")
});
parser.addEntity("#xD", "\r");
parser.addEntity("#10", "\n");
let parsedObj;
try {
parsedObj = parser.parse(encoded, true);
} catch (e) {
if (e && typeof e === "object") {
Object.defineProperty(e, "$responseBodyText", {
value: encoded
});
}
throw e;
}
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return (0, import_smithy_client3.getValueFromTextNode)(parsedObjToReturn);
}
return {};
}), "parseXmlBody");
var parseXmlErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
const value = await parseXmlBody(errorBody, context);
if (value.Error) {
value.Error.message = value.Error.message ?? value.Error.Message;
}
return value;
}, "parseXmlErrorBody");
var loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => {
if (data?.Error?.Code !== void 0) {
return data.Error.Code;
}
if (data?.Code !== void 0) {
return data.Code;
}
if (output.statusCode == 404) {
return "NotFound";
}
}, "loadRestXmlErrorCode");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 15972:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID,
ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,
ENV_EXPIRATION: () => ENV_EXPIRATION,
ENV_KEY: () => ENV_KEY,
ENV_SECRET: () => ENV_SECRET,
ENV_SESSION: () => ENV_SESSION,
fromEnv: () => fromEnv
});
module.exports = __toCommonJS(index_exports);
// src/fromEnv.ts
var import_client = __nccwpck_require__(2825);
var import_property_provider = __nccwpck_require__(79721);
var ENV_KEY = "AWS_ACCESS_KEY_ID";
var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
var ENV_SESSION = "AWS_SESSION_TOKEN";
var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
var fromEnv = /* @__PURE__ */ __name((init) => async () => {
init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");
const accessKeyId = process.env[ENV_KEY];
const secretAccessKey = process.env[ENV_SECRET];
const sessionToken = process.env[ENV_SESSION];
const expiry = process.env[ENV_EXPIRATION];
const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
const accountId = process.env[ENV_ACCOUNT_ID];
if (accessKeyId && secretAccessKey) {
const credentials = {
accessKeyId,
secretAccessKey,
...sessionToken && { sessionToken },
...expiry && { expiration: new Date(expiry) },
...credentialScope && { credentialScope },
...accountId && { accountId }
};
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g");
return credentials;
}
throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
}, "fromEnv");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 63757:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkUrl = void 0;
const property_provider_1 = __nccwpck_require__(79721);
const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8";
const LOOPBACK_CIDR_IPv6 = "::1/128";
const ECS_CONTAINER_HOST = "169.254.170.2";
const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
const EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
const checkUrl = (url, logger) => {
if (url.protocol === "https:") {
return;
}
if (url.hostname === ECS_CONTAINER_HOST ||
url.hostname === EKS_CONTAINER_HOST_IPv4 ||
url.hostname === EKS_CONTAINER_HOST_IPv6) {
return;
}
if (url.hostname.includes("[")) {
if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") {
return;
}
}
else {
if (url.hostname === "localhost") {
return;
}
const ipComponents = url.hostname.split(".");
const inRange = (component) => {
const num = parseInt(component, 10);
return 0 <= num && num <= 255;
};
if (ipComponents[0] === "127" &&
inRange(ipComponents[1]) &&
inRange(ipComponents[2]) &&
inRange(ipComponents[3]) &&
ipComponents.length === 4) {
return;
}
}
throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
- loopback CIDR 127.0.0.0/8 or [::1/128]
- ECS container host 169.254.170.2
- EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });
};
exports.checkUrl = checkUrl;
/***/ }),
/***/ 56070:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromHttp = void 0;
const tslib_1 = __nccwpck_require__(4351);
const client_1 = __nccwpck_require__(2825);
const node_http_handler_1 = __nccwpck_require__(20258);
const property_provider_1 = __nccwpck_require__(79721);
const promises_1 = tslib_1.__importDefault(__nccwpck_require__(73292));
const checkUrl_1 = __nccwpck_require__(63757);
const requestHelpers_1 = __nccwpck_require__(79287);
const retry_wrapper_1 = __nccwpck_require__(79921);
const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
const fromHttp = (options = {}) => {
options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
let host;
const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger ? console.warn : options.logger.warn;
if (relative && full) {
warn("@aws-sdk/credential-provider-http: " +
"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
warn("awsContainerCredentialsFullUri will take precedence.");
}
if (token && tokenFile) {
warn("@aws-sdk/credential-provider-http: " +
"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.");
warn("awsContainerAuthorizationToken will take precedence.");
}
if (full) {
host = full;
}
else if (relative) {
host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;
}
else {
throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
}
const url = new URL(host);
(0, checkUrl_1.checkUrl)(url, options.logger);
const requestHandler = new node_http_handler_1.NodeHttpHandler({
requestTimeout: options.timeout ?? 1000,
connectionTimeout: options.timeout ?? 1000,
});
return (0, retry_wrapper_1.retryWrapper)(async () => {
const request = (0, requestHelpers_1.createGetRequest)(url);
if (token) {
request.headers.Authorization = token;
}
else if (tokenFile) {
request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString();
}
try {
const result = await requestHandler.handle(request);
return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z"));
}
catch (e) {
throw new property_provider_1.CredentialsProviderError(String(e), { logger: options.logger });
}
}, options.maxRetries ?? 3, options.timeout ?? 1000);
};
exports.fromHttp = fromHttp;
/***/ }),
/***/ 79287:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCredentials = exports.createGetRequest = void 0;
const property_provider_1 = __nccwpck_require__(79721);
const protocol_http_1 = __nccwpck_require__(64418);
const smithy_client_1 = __nccwpck_require__(63570);
const util_stream_1 = __nccwpck_require__(96607);
function createGetRequest(url) {
return new protocol_http_1.HttpRequest({
protocol: url.protocol,
hostname: url.hostname,
port: Number(url.port),
path: url.pathname,
query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {
acc[k] = v;
return acc;
}, {}),
fragment: url.hash,
});
}
exports.createGetRequest = createGetRequest;
async function getCredentials(response, logger) {
const stream = (0, util_stream_1.sdkStreamMixin)(response.body);
const str = await stream.transformToString();
if (response.statusCode === 200) {
const parsed = JSON.parse(str);
if (typeof parsed.AccessKeyId !== "string" ||
typeof parsed.SecretAccessKey !== "string" ||
typeof parsed.Token !== "string" ||
typeof parsed.Expiration !== "string") {
throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " +
"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger });
}
return {
accessKeyId: parsed.AccessKeyId,
secretAccessKey: parsed.SecretAccessKey,
sessionToken: parsed.Token,
expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration),
};
}
if (response.statusCode >= 400 && response.statusCode < 500) {
let parsedBody = {};
try {
parsedBody = JSON.parse(str);
}
catch (e) { }
throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {
Code: parsedBody.Code,
Message: parsedBody.Message,
});
}
throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });
}
exports.getCredentials = getCredentials;
/***/ }),
/***/ 79921:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.retryWrapper = void 0;
const retryWrapper = (toRetry, maxRetries, delayMs) => {
return async () => {
for (let i = 0; i < maxRetries; ++i) {
try {
return await toRetry();
}
catch (e) {
await new Promise((resolve) => setTimeout(resolve, delayMs));
}
}
return await toRetry();
};
};
exports.retryWrapper = retryWrapper;
/***/ }),
/***/ 17290:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromHttp = void 0;
var fromHttp_1 = __nccwpck_require__(56070);
Object.defineProperty(exports, "fromHttp", ({ enumerable: true, get: function () { return fromHttp_1.fromHttp; } }));
/***/ }),
/***/ 74203:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
fromIni: () => fromIni
});
module.exports = __toCommonJS(index_exports);
// src/fromIni.ts
// src/resolveProfileData.ts
// src/resolveAssumeRoleCredentials.ts
var import_shared_ini_file_loader = __nccwpck_require__(43507);
// src/resolveCredentialSource.ts
var import_client = __nccwpck_require__(2825);
var import_property_provider = __nccwpck_require__(79721);
var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger) => {
const sourceProvidersMap = {
EcsContainer: /* @__PURE__ */ __name(async (options) => {
const { fromHttp } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(17290)));
const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7477)));
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
return async () => (0, import_property_provider.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
}, "EcsContainer"),
Ec2InstanceMetadata: /* @__PURE__ */ __name(async (options) => {
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7477)));
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
}, "Ec2InstanceMetadata"),
Environment: /* @__PURE__ */ __name(async (options) => {
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
const { fromEnv } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(15972)));
return async () => fromEnv(options)().then(setNamedProvider);
}, "Environment")
};
if (credentialSource in sourceProvidersMap) {
return sourceProvidersMap[credentialSource];
} else {
throw new import_property_provider.CredentialsProviderError(
`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,
{ logger }
);
}
}, "resolveCredentialSource");
var setNamedProvider = /* @__PURE__ */ __name((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"), "setNamedProvider");
// src/resolveAssumeRoleCredentials.ts
var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", logger } = {}) => {
return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));
}, "isAssumeRoleProfile");
var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => {
const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
if (withSourceProfile) {
logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
}
return withSourceProfile;
}, "isAssumeRoleWithSourceProfile");
var isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => {
const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
if (withProviderProfile) {
logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
}
return withProviderProfile;
}, "isCredentialSourceProfile");
var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
const profileData = profiles[profileName];
const { source_profile, region } = profileData;
if (!options.roleAssumer) {
const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(2273)));
options.roleAssumer = getDefaultRoleAssumer(
{
...options.clientConfig,
credentialProviderLogger: options.logger,
parentClientConfig: {
...options?.parentClientConfig,
region: region ?? options?.parentClientConfig?.region
}
},
options.clientPlugins
);
}
if (source_profile && source_profile in visitedProfiles) {
throw new import_property_provider.CredentialsProviderError(
`Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "),
{ logger: options.logger }
);
}
options.logger?.debug(
`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`
);
const sourceCredsProvider = source_profile ? resolveProfileData(
source_profile,
profiles,
options,
{
...visitedProfiles,
[source_profile]: true
},
isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})
) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
if (isCredentialSourceWithoutRoleArn(profileData)) {
return sourceCredsProvider.then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
} else {
const params = {
RoleArn: profileData.role_arn,
RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
ExternalId: profileData.external_id,
DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10)
};
const { mfa_serial } = profileData;
if (mfa_serial) {
if (!options.mfaCodeProvider) {
throw new import_property_provider.CredentialsProviderError(
`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`,
{ logger: options.logger, tryNextLink: false }
);
}
params.SerialNumber = mfa_serial;
params.TokenCode = await options.mfaCodeProvider(mfa_serial);
}
const sourceCreds = await sourceCredsProvider;
return options.roleAssumer(sourceCreds, params).then(
(creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o")
);
}
}, "resolveAssumeRoleCredentials");
var isCredentialSourceWithoutRoleArn = /* @__PURE__ */ __name((section) => {
return !section.role_arn && !!section.credential_source;
}, "isCredentialSourceWithoutRoleArn");
// src/resolveProcessCredentials.ts
var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(__nccwpck_require__(89969))).then(
({ fromProcess }) => fromProcess({
...options,
profile
})().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_PROCESS", "v"))
), "resolveProcessCredentials");
// src/resolveSsoCredentials.ts
var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, profileData, options = {}) => {
const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(26414)));
return fromSSO({
profile,
logger: options.logger,
parentClientConfig: options.parentClientConfig,
clientConfig: options.clientConfig
})().then((creds) => {
if (profileData.sso_session) {
return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO", "r");
} else {
return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
}
});
}, "resolveSsoCredentials");
var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
// src/resolveStaticCredentials.ts
var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile");
var resolveStaticCredentials = /* @__PURE__ */ __name(async (profile, options) => {
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
const credentials = {
accessKeyId: profile.aws_access_key_id,
secretAccessKey: profile.aws_secret_access_key,
sessionToken: profile.aws_session_token,
...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
...profile.aws_account_id && { accountId: profile.aws_account_id }
};
return (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROFILE", "n");
}, "resolveStaticCredentials");
// src/resolveWebIdentityCredentials.ts
var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile");
var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(15646))).then(
({ fromTokenFile }) => fromTokenFile({
webIdentityTokenFile: profile.web_identity_token_file,
roleArn: profile.role_arn,
roleSessionName: profile.role_session_name,
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
logger: options.logger,
parentClientConfig: options.parentClientConfig
})().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q"))
), "resolveWebIdentityCredentials");
// src/resolveProfileData.ts
var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
const data = profiles[profileName];
if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
return resolveStaticCredentials(data, options);
}
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
}
if (isStaticCredsProfile(data)) {
return resolveStaticCredentials(data, options);
}
if (isWebIdentityProfile(data)) {
return resolveWebIdentityCredentials(data, options);
}
if (isProcessProfile(data)) {
return resolveProcessCredentials(options, profileName);
}
if (isSsoProfile(data)) {
return await resolveSsoCredentials(profileName, data, options);
}
throw new import_property_provider.CredentialsProviderError(
`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`,
{ logger: options.logger }
);
}, "resolveProfileData");
// src/fromIni.ts
var fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => {
const init = {
..._init,
parentClientConfig: {
...callerClientConfig,
..._init.parentClientConfig
}
};
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
return resolveProfileData(
(0, import_shared_ini_file_loader.getProfileName)({
profile: _init.profile ?? callerClientConfig?.profile
}),
profiles,
init
);
}, "fromIni");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 75531:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
credentialsTreatedAsExpired: () => credentialsTreatedAsExpired,
credentialsWillNeedRefresh: () => credentialsWillNeedRefresh,
defaultProvider: () => defaultProvider
});
module.exports = __toCommonJS(index_exports);
// src/defaultProvider.ts
var import_credential_provider_env = __nccwpck_require__(15972);
var import_shared_ini_file_loader = __nccwpck_require__(43507);
// src/remoteProvider.ts
var import_property_provider = __nccwpck_require__(79721);
var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
var remoteProvider = /* @__PURE__ */ __name(async (init) => {
const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7477)));
if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
const { fromHttp } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(17290)));
return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init));
}
if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
return async () => {
throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger });
};
}
init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata");
return fromInstanceMetadata(init);
}, "remoteProvider");
// src/defaultProvider.ts
var multipleCredentialSourceWarningEmitted = false;
var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(
(0, import_property_provider.chain)(
async () => {
const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE];
if (profile) {
const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET];
if (envStaticCredentialsAreSet) {
if (!multipleCredentialSourceWarningEmitted) {
const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn : console.warn;
warnFn(
`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
Multiple credential sources detected:
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
This SDK will proceed with the AWS_PROFILE value.
However, a future version may change this behavior to prefer the ENV static credentials.
Please ensure that your environment only sets either the AWS_PROFILE or the
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
`
);
multipleCredentialSourceWarningEmitted = true;
}
}
throw new import_property_provider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
logger: init.logger,
tryNextLink: true
});
}
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
return (0, import_credential_provider_env.fromEnv)(init)();
},
async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
throw new import_property_provider.CredentialsProviderError(
"Skipping SSO provider in default chain (inputs do not include SSO fields).",
{ logger: init.logger }
);
}
const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(26414)));
return fromSSO(init)();
},
async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
const { fromIni } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(74203)));
return fromIni(init)();
},
async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
const { fromProcess } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(89969)));
return fromProcess(init)();
},
async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
const { fromTokenFile } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(15646)));
return fromTokenFile(init)();
},
async () => {
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");
return (await remoteProvider(init))();
},
async () => {
throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", {
tryNextLink: false,
logger: init.logger
});
}
),
credentialsTreatedAsExpired,
credentialsWillNeedRefresh
), "defaultProvider");
var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0, "credentialsWillNeedRefresh");
var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 89969:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
fromProcess: () => fromProcess
});
module.exports = __toCommonJS(index_exports);
// src/fromProcess.ts
var import_shared_ini_file_loader = __nccwpck_require__(43507);
// src/resolveProcessCredentials.ts
var import_property_provider = __nccwpck_require__(79721);
var import_child_process = __nccwpck_require__(32081);
var import_util = __nccwpck_require__(73837);
// src/getValidatedProcessCredentials.ts
var import_client = __nccwpck_require__(2825);
var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => {
if (data.Version !== 1) {
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
}
if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {
throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
}
if (data.Expiration) {
const currentTime = /* @__PURE__ */ new Date();
const expireTime = new Date(data.Expiration);
if (expireTime < currentTime) {
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
}
}
let accountId = data.AccountId;
if (!accountId && profiles?.[profileName]?.aws_account_id) {
accountId = profiles[profileName].aws_account_id;
}
const credentials = {
accessKeyId: data.AccessKeyId,
secretAccessKey: data.SecretAccessKey,
...data.SessionToken && { sessionToken: data.SessionToken },
...data.Expiration && { expiration: new Date(data.Expiration) },
...data.CredentialScope && { credentialScope: data.CredentialScope },
...accountId && { accountId }
};
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROCESS", "w");
return credentials;
}, "getValidatedProcessCredentials");
// src/resolveProcessCredentials.ts
var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger) => {
const profile = profiles[profileName];
if (profiles[profileName]) {
const credentialProcess = profile["credential_process"];
if (credentialProcess !== void 0) {
const execPromise = (0, import_util.promisify)(import_child_process.exec);
try {
const { stdout } = await execPromise(credentialProcess);
let data;
try {
data = JSON.parse(stdout.trim());
} catch {
throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
}
return getValidatedProcessCredentials(profileName, data, profiles);
} catch (error) {
throw new import_property_provider.CredentialsProviderError(error.message, { logger });
}
} else {
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
}
} else {
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
logger
});
}
}, "resolveProcessCredentials");
// src/fromProcess.ts
var fromProcess = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => {
init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
return resolveProcessCredentials(
(0, import_shared_ini_file_loader.getProfileName)({
profile: init.profile ?? callerClientConfig?.profile
}),
profiles,
init.logger
);
}, "fromProcess");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 26414:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/loadSso.ts
var loadSso_exports = {};
__export(loadSso_exports, {
GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand,
SSOClient: () => import_client_sso.SSOClient
});
var import_client_sso;
var init_loadSso = __esm({
"src/loadSso.ts"() {
"use strict";
import_client_sso = __nccwpck_require__(82666);
}
});
// src/index.ts
var index_exports = {};
__export(index_exports, {
fromSSO: () => fromSSO,
isSsoProfile: () => isSsoProfile,
validateSsoProfile: () => validateSsoProfile
});
module.exports = __toCommonJS(index_exports);
// src/fromSSO.ts
// src/isSsoProfile.ts
var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
// src/resolveSSOCredentials.ts
var import_client = __nccwpck_require__(2825);
var import_token_providers = __nccwpck_require__(52843);
var import_property_provider = __nccwpck_require__(79721);
var import_shared_ini_file_loader = __nccwpck_require__(43507);
var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
var resolveSSOCredentials = /* @__PURE__ */ __name(async ({
ssoStartUrl,
ssoSession,
ssoAccountId,
ssoRegion,
ssoRoleName,
ssoClient,
clientConfig,
parentClientConfig,
profile,
logger
}) => {
let token;
const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
if (ssoSession) {
try {
const _token = await (0, import_token_providers.fromSso)({ profile })();
token = {
accessToken: _token.token,
expiresAt: new Date(_token.expiration).toISOString()
};
} catch (e) {
throw new import_property_provider.CredentialsProviderError(e.message, {
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
logger
});
}
} else {
try {
token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl);
} catch (e) {
throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
logger
});
}
}
if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
logger
});
}
const { accessToken } = token;
const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));
const sso = ssoClient || new SSOClient2(
Object.assign({}, clientConfig ?? {}, {
logger: clientConfig?.logger ?? parentClientConfig?.logger,
region: clientConfig?.region ?? ssoRegion
})
);
let ssoResp;
try {
ssoResp = await sso.send(
new GetRoleCredentialsCommand2({
accountId: ssoAccountId,
roleName: ssoRoleName,
accessToken
})
);
} catch (e) {
throw new import_property_provider.CredentialsProviderError(e, {
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
logger
});
}
const {
roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}
} = ssoResp;
if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
throw new import_property_provider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
logger
});
}
const credentials = {
accessKeyId,
secretAccessKey,
sessionToken,
expiration: new Date(expiration),
...credentialScope && { credentialScope },
...accountId && { accountId }
};
if (ssoSession) {
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO", "s");
} else {
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO_LEGACY", "u");
}
return credentials;
}, "resolveSSOCredentials");
// src/validateSsoProfile.ts
var validateSsoProfile = /* @__PURE__ */ __name((profile, logger) => {
const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
throw new import_property_provider.CredentialsProviderError(
`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(
", "
)}
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,
{ tryNextLink: false, logger }
);
}
return profile;
}, "validateSsoProfile");
// src/fromSSO.ts
var fromSSO = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => {
init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
const { ssoClient } = init;
const profileName = (0, import_shared_ini_file_loader.getProfileName)({
profile: init.profile ?? callerClientConfig?.profile
});
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
const profile = profiles[profileName];
if (!profile) {
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
}
if (!isSsoProfile(profile)) {
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
logger: init.logger
});
}
if (profile?.sso_session) {
const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);
const session = ssoSessions[profile.sso_session];
const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
if (ssoRegion && ssoRegion !== session.sso_region) {
throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
tryNextLink: false,
logger: init.logger
});
}
if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
tryNextLink: false,
logger: init.logger
});
}
profile.sso_region = session.sso_region;
profile.sso_start_url = session.sso_start_url;
}
const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(
profile,
init.logger
);
return resolveSSOCredentials({
ssoStartUrl: sso_start_url,
ssoSession: sso_session,
ssoAccountId: sso_account_id,
ssoRegion: sso_region,
ssoRoleName: sso_role_name,
ssoClient,
clientConfig: init.clientConfig,
parentClientConfig: init.parentClientConfig,
profile: profileName
});
} else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
throw new import_property_provider.CredentialsProviderError(
'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',
{ tryNextLink: false, logger: init.logger }
);
} else {
return resolveSSOCredentials({
ssoStartUrl,
ssoSession,
ssoAccountId,
ssoRegion,
ssoRoleName,
ssoClient,
clientConfig: init.clientConfig,
parentClientConfig: init.parentClientConfig,
profile: profileName
});
}
}, "fromSSO");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 35614:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromTokenFile = void 0;
const client_1 = __nccwpck_require__(2825);
const property_provider_1 = __nccwpck_require__(79721);
const fs_1 = __nccwpck_require__(57147);
const fromWebToken_1 = __nccwpck_require__(47905);
const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
const ENV_ROLE_ARN = "AWS_ROLE_ARN";
const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
const fromTokenFile = (init = {}) => async () => {
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
if (!webIdentityTokenFile || !roleArn) {
throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", {
logger: init.logger,
});
}
const credentials = await (0, fromWebToken_1.fromWebToken)({
...init,
webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
roleArn,
roleSessionName,
})();
if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
(0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
}
return credentials;
};
exports.fromTokenFile = fromTokenFile;
/***/ }),
/***/ 47905:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromWebToken = void 0;
const fromWebToken = (init) => async (awsIdentityProperties) => {
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
let { roleAssumerWithWebIdentity } = init;
if (!roleAssumerWithWebIdentity) {
const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(2273)));
roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
...init.clientConfig,
credentialProviderLogger: init.logger,
parentClientConfig: {
...awsIdentityProperties?.callerClientConfig,
...init.parentClientConfig,
},
}, init.clientPlugins);
}
return roleAssumerWithWebIdentity({
RoleArn: roleArn,
RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
WebIdentityToken: webIdentityToken,
ProviderId: providerId,
PolicyArns: policyArns,
Policy: policy,
DurationSeconds: durationSeconds,
});
};
exports.fromWebToken = fromWebToken;
/***/ }),
/***/ 15646:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
module.exports = __toCommonJS(index_exports);
__reExport(index_exports, __nccwpck_require__(35614), module.exports);
__reExport(index_exports, __nccwpck_require__(47905), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 96689:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS: () => NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS,
NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME: () => NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME,
NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME: () => NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME,
NODE_USE_ARN_REGION_CONFIG_OPTIONS: () => NODE_USE_ARN_REGION_CONFIG_OPTIONS,
NODE_USE_ARN_REGION_ENV_NAME: () => NODE_USE_ARN_REGION_ENV_NAME,
NODE_USE_ARN_REGION_INI_NAME: () => NODE_USE_ARN_REGION_INI_NAME,
bucketEndpointMiddleware: () => bucketEndpointMiddleware,
bucketEndpointMiddlewareOptions: () => bucketEndpointMiddlewareOptions,
bucketHostname: () => bucketHostname,
getArnResources: () => getArnResources,
getBucketEndpointPlugin: () => getBucketEndpointPlugin,
getSuffixForArnEndpoint: () => getSuffixForArnEndpoint,
resolveBucketEndpointConfig: () => resolveBucketEndpointConfig,
validateAccountId: () => validateAccountId,
validateDNSHostLabel: () => validateDNSHostLabel,
validateNoDualstack: () => validateNoDualstack,
validateNoFIPS: () => validateNoFIPS,
validateOutpostService: () => validateOutpostService,
validatePartition: () => validatePartition,
validateRegion: () => validateRegion
});
module.exports = __toCommonJS(index_exports);
// src/NodeDisableMultiregionAccessPointConfigOptions.ts
var import_util_config_provider = __nccwpck_require__(83375);
var NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS";
var NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME = "s3_disable_multiregion_access_points";
var NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS = {
environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"),
configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"),
default: false
};
// src/NodeUseArnRegionConfigOptions.ts
var NODE_USE_ARN_REGION_ENV_NAME = "AWS_S3_USE_ARN_REGION";
var NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region";
var NODE_USE_ARN_REGION_CONFIG_OPTIONS = {
environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_USE_ARN_REGION_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"),
configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_USE_ARN_REGION_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"),
default: false
};
// src/bucketEndpointMiddleware.ts
var import_util_arn_parser = __nccwpck_require__(85487);
var import_protocol_http = __nccwpck_require__(64418);
// src/bucketHostnameUtils.ts
var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
var DOTS_PATTERN = /\.\./;
var DOT_PATTERN = /\./;
var S3_HOSTNAME_PATTERN = /^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./;
var S3_US_EAST_1_ALTNAME_PATTERN = /^s3(-external-1)?\.amazonaws\.com$/;
var AWS_PARTITION_SUFFIX = "amazonaws.com";
var isBucketNameOptions = /* @__PURE__ */ __name((options) => typeof options.bucketName === "string", "isBucketNameOptions");
var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName");
var getRegionalSuffix = /* @__PURE__ */ __name((hostname) => {
const parts = hostname.match(S3_HOSTNAME_PATTERN);
return [parts[4], hostname.replace(new RegExp(`^${parts[0]}`), "")];
}, "getRegionalSuffix");
var getSuffix = /* @__PURE__ */ __name((hostname) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname) ? ["us-east-1", AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname), "getSuffix");
var getSuffixForArnEndpoint = /* @__PURE__ */ __name((hostname) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname) ? [hostname.replace(`.${AWS_PARTITION_SUFFIX}`, ""), AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname), "getSuffixForArnEndpoint");
var validateArnEndpointOptions = /* @__PURE__ */ __name((options) => {
if (options.pathStyleEndpoint) {
throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN");
}
if (options.accelerateEndpoint) {
throw new Error("Accelerate endpoint is not supported when bucket is an ARN");
}
if (!options.tlsCompatible) {
throw new Error("HTTPS is required when bucket is an ARN");
}
}, "validateArnEndpointOptions");
var validateService = /* @__PURE__ */ __name((service) => {
if (service !== "s3" && service !== "s3-outposts" && service !== "s3-object-lambda") {
throw new Error("Expect 's3' or 's3-outposts' or 's3-object-lambda' in ARN service component");
}
}, "validateService");
var validateS3Service = /* @__PURE__ */ __name((service) => {
if (service !== "s3") {
throw new Error("Expect 's3' in Accesspoint ARN service component");
}
}, "validateS3Service");
var validateOutpostService = /* @__PURE__ */ __name((service) => {
if (service !== "s3-outposts") {
throw new Error("Expect 's3-posts' in Outpost ARN service component");
}
}, "validateOutpostService");
var validatePartition = /* @__PURE__ */ __name((partition, options) => {
if (partition !== options.clientPartition) {
throw new Error(`Partition in ARN is incompatible, got "${partition}" but expected "${options.clientPartition}"`);
}
}, "validatePartition");
var validateRegion = /* @__PURE__ */ __name((region, options) => {
if (region === "") {
throw new Error("ARN region is empty");
}
if (options.useFipsEndpoint) {
if (!options.allowFipsRegion) {
throw new Error("FIPS region is not supported");
} else if (!isEqualRegions(region, options.clientRegion)) {
throw new Error(`Client FIPS region ${options.clientRegion} doesn't match region ${region} in ARN`);
}
}
if (!options.useArnRegion && !isEqualRegions(region, options.clientRegion || "") && !isEqualRegions(region, options.clientSigningRegion || "")) {
throw new Error(`Region in ARN is incompatible, got ${region} but expected ${options.clientRegion}`);
}
}, "validateRegion");
var validateRegionalClient = /* @__PURE__ */ __name((region) => {
if (["s3-external-1", "aws-global"].includes(region)) {
throw new Error(`Client region ${region} is not regional`);
}
}, "validateRegionalClient");
var isEqualRegions = /* @__PURE__ */ __name((regionA, regionB) => regionA === regionB, "isEqualRegions");
var validateAccountId = /* @__PURE__ */ __name((accountId) => {
if (!/[0-9]{12}/.exec(accountId)) {
throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'");
}
}, "validateAccountId");
var validateDNSHostLabel = /* @__PURE__ */ __name((label, options = { tlsCompatible: true }) => {
if (label.length >= 64 || !/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(label) || /(\d+\.){3}\d+/.test(label) || /[.-]{2}/.test(label) || options?.tlsCompatible && DOT_PATTERN.test(label)) {
throw new Error(`Invalid DNS label ${label}`);
}
}, "validateDNSHostLabel");
var validateCustomEndpoint = /* @__PURE__ */ __name((options) => {
if (options.isCustomEndpoint) {
if (options.dualstackEndpoint) throw new Error("Dualstack endpoint is not supported with custom endpoint");
if (options.accelerateEndpoint) throw new Error("Accelerate endpoint is not supported with custom endpoint");
}
}, "validateCustomEndpoint");
var getArnResources = /* @__PURE__ */ __name((resource) => {
const delimiter = resource.includes(":") ? ":" : "/";
const [resourceType, ...rest] = resource.split(delimiter);
if (resourceType === "accesspoint") {
if (rest.length !== 1 || rest[0] === "") {
throw new Error(`Access Point ARN should have one resource accesspoint${delimiter}{accesspointname}`);
}
return { accesspointName: rest[0] };
} else if (resourceType === "outpost") {
if (!rest[0] || rest[1] !== "accesspoint" || !rest[2] || rest.length !== 3) {
throw new Error(
`Outpost ARN should have resource outpost${delimiter}{outpostId}${delimiter}accesspoint${delimiter}{accesspointName}`
);
}
const [outpostId, _, accesspointName] = rest;
return { outpostId, accesspointName };
} else {
throw new Error(`ARN resource should begin with 'accesspoint${delimiter}' or 'outpost${delimiter}'`);
}
}, "getArnResources");
var validateNoDualstack = /* @__PURE__ */ __name((dualstackEndpoint) => {
if (dualstackEndpoint)
throw new Error("Dualstack endpoint is not supported with Outpost or Multi-region Access Point ARN.");
}, "validateNoDualstack");
var validateNoFIPS = /* @__PURE__ */ __name((useFipsEndpoint) => {
if (useFipsEndpoint) throw new Error(`FIPS region is not supported with Outpost.`);
}, "validateNoFIPS");
var validateMrapAlias = /* @__PURE__ */ __name((name) => {
try {
name.split(".").forEach((label) => {
validateDNSHostLabel(label);
});
} catch (e) {
throw new Error(`"${name}" is not a DNS compatible name.`);
}
}, "validateMrapAlias");
// src/bucketHostname.ts
var bucketHostname = /* @__PURE__ */ __name((options) => {
validateCustomEndpoint(options);
return isBucketNameOptions(options) ? (
// Construct endpoint when bucketName is a string referring to a bucket name
getEndpointFromBucketName(options)
) : (
// Construct endpoint when bucketName is an ARN referring to an S3 resource like Access Point
getEndpointFromArn(options)
);
}, "bucketHostname");
var getEndpointFromBucketName = /* @__PURE__ */ __name(({
accelerateEndpoint = false,
clientRegion: region,
baseHostname,
bucketName,
dualstackEndpoint = false,
fipsEndpoint = false,
pathStyleEndpoint = false,
tlsCompatible = true,
isCustomEndpoint = false
}) => {
const [clientRegion, hostnameSuffix] = isCustomEndpoint ? [region, baseHostname] : getSuffix(baseHostname);
if (pathStyleEndpoint || !isDnsCompatibleBucketName(bucketName) || tlsCompatible && DOT_PATTERN.test(bucketName)) {
return {
bucketEndpoint: false,
hostname: dualstackEndpoint ? `s3.dualstack.${clientRegion}.${hostnameSuffix}` : baseHostname
};
}
if (accelerateEndpoint) {
baseHostname = `s3-accelerate${dualstackEndpoint ? ".dualstack" : ""}.${hostnameSuffix}`;
} else if (dualstackEndpoint) {
baseHostname = `s3.dualstack.${clientRegion}.${hostnameSuffix}`;
}
return {
bucketEndpoint: true,
hostname: `${bucketName}.${baseHostname}`
};
}, "getEndpointFromBucketName");
var getEndpointFromArn = /* @__PURE__ */ __name((options) => {
const { isCustomEndpoint, baseHostname, clientRegion } = options;
const hostnameSuffix = isCustomEndpoint ? baseHostname : getSuffixForArnEndpoint(baseHostname)[1];
const {
pathStyleEndpoint,
accelerateEndpoint = false,
fipsEndpoint = false,
tlsCompatible = true,
bucketName,
clientPartition = "aws"
} = options;
validateArnEndpointOptions({ pathStyleEndpoint, accelerateEndpoint, tlsCompatible });
const { service, partition, accountId, region, resource } = bucketName;
validateService(service);
validatePartition(partition, { clientPartition });
validateAccountId(accountId);
const { accesspointName, outpostId } = getArnResources(resource);
if (service === "s3-object-lambda") {
return getEndpointFromObjectLambdaArn({ ...options, tlsCompatible, bucketName, accesspointName, hostnameSuffix });
}
if (region === "") {
return getEndpointFromMRAPArn({ ...options, clientRegion, mrapAlias: accesspointName, hostnameSuffix });
}
if (outpostId) {
return getEndpointFromOutpostArn({ ...options, clientRegion, outpostId, accesspointName, hostnameSuffix });
}
return getEndpointFromAccessPointArn({ ...options, clientRegion, accesspointName, hostnameSuffix });
}, "getEndpointFromArn");
var getEndpointFromObjectLambdaArn = /* @__PURE__ */ __name(({
dualstackEndpoint = false,
fipsEndpoint = false,
tlsCompatible = true,
useArnRegion,
clientRegion,
clientSigningRegion = clientRegion,
accesspointName,
bucketName,
hostnameSuffix
}) => {
const { accountId, region, service } = bucketName;
validateRegionalClient(clientRegion);
validateRegion(region, {
useArnRegion,
clientRegion,
clientSigningRegion,
allowFipsRegion: true,
useFipsEndpoint: fipsEndpoint
});
validateNoDualstack(dualstackEndpoint);
const DNSHostLabel = `${accesspointName}-${accountId}`;
validateDNSHostLabel(DNSHostLabel, { tlsCompatible });
const endpointRegion = useArnRegion ? region : clientRegion;
const signingRegion = useArnRegion ? region : clientSigningRegion;
return {
bucketEndpoint: true,
hostname: `${DNSHostLabel}.${service}${fipsEndpoint ? "-fips" : ""}.${endpointRegion}.${hostnameSuffix}`,
signingRegion,
signingService: service
};
}, "getEndpointFromObjectLambdaArn");
var getEndpointFromMRAPArn = /* @__PURE__ */ __name(({
disableMultiregionAccessPoints,
dualstackEndpoint = false,
isCustomEndpoint,
mrapAlias,
hostnameSuffix
}) => {
if (disableMultiregionAccessPoints === true) {
throw new Error("SDK is attempting to use a MRAP ARN. Please enable to feature.");
}
validateMrapAlias(mrapAlias);
validateNoDualstack(dualstackEndpoint);
return {
bucketEndpoint: true,
hostname: `${mrapAlias}${isCustomEndpoint ? "" : `.accesspoint.s3-global`}.${hostnameSuffix}`,
signingRegion: "*"
};
}, "getEndpointFromMRAPArn");
var getEndpointFromOutpostArn = /* @__PURE__ */ __name(({
useArnRegion,
clientRegion,
clientSigningRegion = clientRegion,
bucketName,
outpostId,
dualstackEndpoint = false,
fipsEndpoint = false,
tlsCompatible = true,
accesspointName,
isCustomEndpoint,
hostnameSuffix
}) => {
validateRegionalClient(clientRegion);
validateRegion(bucketName.region, { useArnRegion, clientRegion, clientSigningRegion, useFipsEndpoint: fipsEndpoint });
const DNSHostLabel = `${accesspointName}-${bucketName.accountId}`;
validateDNSHostLabel(DNSHostLabel, { tlsCompatible });
const endpointRegion = useArnRegion ? bucketName.region : clientRegion;
const signingRegion = useArnRegion ? bucketName.region : clientSigningRegion;
validateOutpostService(bucketName.service);
validateDNSHostLabel(outpostId, { tlsCompatible });
validateNoDualstack(dualstackEndpoint);
validateNoFIPS(fipsEndpoint);
const hostnamePrefix = `${DNSHostLabel}.${outpostId}`;
return {
bucketEndpoint: true,
hostname: `${hostnamePrefix}${isCustomEndpoint ? "" : `.s3-outposts.${endpointRegion}`}.${hostnameSuffix}`,
signingRegion,
signingService: "s3-outposts"
};
}, "getEndpointFromOutpostArn");
var getEndpointFromAccessPointArn = /* @__PURE__ */ __name(({
useArnRegion,
clientRegion,
clientSigningRegion = clientRegion,
bucketName,
dualstackEndpoint = false,
fipsEndpoint = false,
tlsCompatible = true,
accesspointName,
isCustomEndpoint,
hostnameSuffix
}) => {
validateRegionalClient(clientRegion);
validateRegion(bucketName.region, {
useArnRegion,
clientRegion,
clientSigningRegion,
allowFipsRegion: true,
useFipsEndpoint: fipsEndpoint
});
const hostnamePrefix = `${accesspointName}-${bucketName.accountId}`;
validateDNSHostLabel(hostnamePrefix, { tlsCompatible });
const endpointRegion = useArnRegion ? bucketName.region : clientRegion;
const signingRegion = useArnRegion ? bucketName.region : clientSigningRegion;
validateS3Service(bucketName.service);
return {
bucketEndpoint: true,
hostname: `${hostnamePrefix}${isCustomEndpoint ? "" : `.s3-accesspoint${fipsEndpoint ? "-fips" : ""}${dualstackEndpoint ? ".dualstack" : ""}.${endpointRegion}`}.${hostnameSuffix}`,
signingRegion
};
}, "getEndpointFromAccessPointArn");
// src/bucketEndpointMiddleware.ts
var bucketEndpointMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {
const { Bucket: bucketName } = args.input;
let replaceBucketInPath = options.bucketEndpoint;
const request = args.request;
if (import_protocol_http.HttpRequest.isInstance(request)) {
if (options.bucketEndpoint) {
request.hostname = bucketName;
} else if ((0, import_util_arn_parser.validate)(bucketName)) {
const bucketArn = (0, import_util_arn_parser.parse)(bucketName);
const clientRegion = await options.region();
const useDualstackEndpoint = await options.useDualstackEndpoint();
const useFipsEndpoint = await options.useFipsEndpoint();
const { partition, signingRegion = clientRegion } = await options.regionInfoProvider(clientRegion, { useDualstackEndpoint, useFipsEndpoint }) || {};
const useArnRegion = await options.useArnRegion();
const {
hostname,
bucketEndpoint,
signingRegion: modifiedSigningRegion,
signingService
} = bucketHostname({
bucketName: bucketArn,
baseHostname: request.hostname,
accelerateEndpoint: options.useAccelerateEndpoint,
dualstackEndpoint: useDualstackEndpoint,
fipsEndpoint: useFipsEndpoint,
pathStyleEndpoint: options.forcePathStyle,
tlsCompatible: request.protocol === "https:",
useArnRegion,
clientPartition: partition,
clientSigningRegion: signingRegion,
clientRegion,
isCustomEndpoint: options.isCustomEndpoint,
disableMultiregionAccessPoints: await options.disableMultiregionAccessPoints()
});
if (modifiedSigningRegion && modifiedSigningRegion !== signingRegion) {
context["signing_region"] = modifiedSigningRegion;
}
if (signingService && signingService !== "s3") {
context["signing_service"] = signingService;
}
request.hostname = hostname;
replaceBucketInPath = bucketEndpoint;
} else {
const clientRegion = await options.region();
const dualstackEndpoint = await options.useDualstackEndpoint();
const fipsEndpoint = await options.useFipsEndpoint();
const { hostname, bucketEndpoint } = bucketHostname({
bucketName,
clientRegion,
baseHostname: request.hostname,
accelerateEndpoint: options.useAccelerateEndpoint,
dualstackEndpoint,
fipsEndpoint,
pathStyleEndpoint: options.forcePathStyle,
tlsCompatible: request.protocol === "https:",
isCustomEndpoint: options.isCustomEndpoint
});
request.hostname = hostname;
replaceBucketInPath = bucketEndpoint;
}
if (replaceBucketInPath) {
request.path = request.path.replace(/^(\/)?[^\/]+/, "");
if (request.path === "") {
request.path = "/";
}
}
}
return next({ ...args, request });
}, "bucketEndpointMiddleware");
var bucketEndpointMiddlewareOptions = {
tags: ["BUCKET_ENDPOINT"],
name: "bucketEndpointMiddleware",
relation: "before",
toMiddleware: "hostHeaderMiddleware",
override: true
};
var getBucketEndpointPlugin = /* @__PURE__ */ __name((options) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions);
}, "applyToStack")
}), "getBucketEndpointPlugin");
// src/configurations.ts
function resolveBucketEndpointConfig(input) {
const {
bucketEndpoint = false,
forcePathStyle = false,
useAccelerateEndpoint = false,
useArnRegion = false,
disableMultiregionAccessPoints = false
} = input;
return Object.assign(input, {
bucketEndpoint,
forcePathStyle,
useAccelerateEndpoint,
useArnRegion: typeof useArnRegion === "function" ? useArnRegion : () => Promise.resolve(useArnRegion),
disableMultiregionAccessPoints: typeof disableMultiregionAccessPoints === "function" ? disableMultiregionAccessPoints : () => Promise.resolve(disableMultiregionAccessPoints)
});
}
__name(resolveBucketEndpointConfig, "resolveBucketEndpointConfig");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 81990:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
addExpectContinueMiddleware: () => addExpectContinueMiddleware,
addExpectContinueMiddlewareOptions: () => addExpectContinueMiddlewareOptions,
getAddExpectContinuePlugin: () => getAddExpectContinuePlugin
});
module.exports = __toCommonJS(index_exports);
var import_protocol_http = __nccwpck_require__(64418);
function addExpectContinueMiddleware(options) {
return (next) => async (args) => {
const { request } = args;
if (import_protocol_http.HttpRequest.isInstance(request) && request.body && options.runtime === "node") {
if (options.requestHandler?.constructor?.name !== "FetchHttpHandler") {
request.headers = {
...request.headers,
Expect: "100-continue"
};
}
}
return next({
...args,
request
});
};
}
__name(addExpectContinueMiddleware, "addExpectContinueMiddleware");
var addExpectContinueMiddlewareOptions = {
step: "build",
tags: ["SET_EXPECT_HEADER", "EXPECT_HEADER"],
name: "addExpectContinueMiddleware",
override: true
};
var getAddExpectContinuePlugin = /* @__PURE__ */ __name((options) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions);
}, "applyToStack")
}), "getAddExpectContinuePlugin");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 61436:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCrc32ChecksumAlgorithmFunction = void 0;
const tslib_1 = __nccwpck_require__(4351);
const crc32_1 = __nccwpck_require__(48408);
const util_1 = __nccwpck_require__(74871);
const zlib = tslib_1.__importStar(__nccwpck_require__(59796));
class NodeCrc32 {
checksum = 0;
update(data) {
this.checksum = zlib.crc32(data, this.checksum);
}
async digest() {
return (0, util_1.numToUint8)(this.checksum);
}
reset() {
this.checksum = 0;
}
}
const getCrc32ChecksumAlgorithmFunction = () => {
if (typeof zlib.crc32 === "undefined") {
return crc32_1.AwsCrc32;
}
return NodeCrc32;
};
exports.getCrc32ChecksumAlgorithmFunction = getCrc32ChecksumAlgorithmFunction;
/***/ }),
/***/ 13799:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
CONFIG_REQUEST_CHECKSUM_CALCULATION: () => CONFIG_REQUEST_CHECKSUM_CALCULATION,
CONFIG_RESPONSE_CHECKSUM_VALIDATION: () => CONFIG_RESPONSE_CHECKSUM_VALIDATION,
ChecksumAlgorithm: () => ChecksumAlgorithm,
ChecksumLocation: () => ChecksumLocation,
DEFAULT_CHECKSUM_ALGORITHM: () => DEFAULT_CHECKSUM_ALGORITHM,
DEFAULT_REQUEST_CHECKSUM_CALCULATION: () => DEFAULT_REQUEST_CHECKSUM_CALCULATION,
DEFAULT_RESPONSE_CHECKSUM_VALIDATION: () => DEFAULT_RESPONSE_CHECKSUM_VALIDATION,
ENV_REQUEST_CHECKSUM_CALCULATION: () => ENV_REQUEST_CHECKSUM_CALCULATION,
ENV_RESPONSE_CHECKSUM_VALIDATION: () => ENV_RESPONSE_CHECKSUM_VALIDATION,
NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS: () => NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS,
NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS: () => NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS,
RequestChecksumCalculation: () => RequestChecksumCalculation,
ResponseChecksumValidation: () => ResponseChecksumValidation,
crc64NvmeCrtContainer: () => crc64NvmeCrtContainer,
flexibleChecksumsMiddleware: () => flexibleChecksumsMiddleware,
flexibleChecksumsMiddlewareOptions: () => flexibleChecksumsMiddlewareOptions,
getFlexibleChecksumsPlugin: () => getFlexibleChecksumsPlugin,
resolveFlexibleChecksumsConfig: () => resolveFlexibleChecksumsConfig
});
module.exports = __toCommonJS(index_exports);
// src/constants.ts
var RequestChecksumCalculation = {
/**
* When set, a checksum will be calculated for all request payloads of operations
* modeled with the {@link httpChecksum} trait where `requestChecksumRequired` is `true`
* AND/OR a `requestAlgorithmMember` is modeled.
* {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum}
*/
WHEN_SUPPORTED: "WHEN_SUPPORTED",
/**
* When set, a checksum will only be calculated for request payloads of operations
* modeled with the {@link httpChecksum} trait where `requestChecksumRequired` is `true`
* OR where a `requestAlgorithmMember` is modeled and the user sets it.
* {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum}
*/
WHEN_REQUIRED: "WHEN_REQUIRED"
};
var DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED;
var ResponseChecksumValidation = {
/**
* When set, checksum validation MUST be performed on all response payloads of operations
* modeled with the {@link httpChecksum} trait where `responseAlgorithms` is modeled,
* except when no modeled checksum algorithms are supported by an SDK.
* {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum}
*/
WHEN_SUPPORTED: "WHEN_SUPPORTED",
/**
* When set, checksum validation MUST NOT be performed on response payloads of operations UNLESS
* the SDK supports the modeled checksum algorithms AND the user has set the `requestValidationModeMember` to `ENABLED`.
* It is currently impossible to model an operation as requiring a response checksum,
* but this setting leaves the door open for future updates.
*/
WHEN_REQUIRED: "WHEN_REQUIRED"
};
var DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED;
var ChecksumAlgorithm = /* @__PURE__ */ ((ChecksumAlgorithm3) => {
ChecksumAlgorithm3["MD5"] = "MD5";
ChecksumAlgorithm3["CRC32"] = "CRC32";
ChecksumAlgorithm3["CRC32C"] = "CRC32C";
ChecksumAlgorithm3["CRC64NVME"] = "CRC64NVME";
ChecksumAlgorithm3["SHA1"] = "SHA1";
ChecksumAlgorithm3["SHA256"] = "SHA256";
return ChecksumAlgorithm3;
})(ChecksumAlgorithm || {});
var ChecksumLocation = /* @__PURE__ */ ((ChecksumLocation2) => {
ChecksumLocation2["HEADER"] = "header";
ChecksumLocation2["TRAILER"] = "trailer";
return ChecksumLocation2;
})(ChecksumLocation || {});
var DEFAULT_CHECKSUM_ALGORITHM = "CRC32" /* CRC32 */;
// src/stringUnionSelector.ts
var stringUnionSelector = /* @__PURE__ */ __name((obj, key, union, type) => {
if (!(key in obj)) return void 0;
const value = obj[key].toUpperCase();
if (!Object.values(union).includes(value)) {
throw new TypeError(`Cannot load ${type} '${key}'. Expected one of ${Object.values(union)}, got '${obj[key]}'.`);
}
return value;
}, "stringUnionSelector");
// src/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.ts
var ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION";
var CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation";
var NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = {
environmentVariableSelector: /* @__PURE__ */ __name((env) => stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, "env" /* ENV */), "environmentVariableSelector"),
configFileSelector: /* @__PURE__ */ __name((profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, "shared config entry" /* CONFIG */), "configFileSelector"),
default: DEFAULT_REQUEST_CHECKSUM_CALCULATION
};
// src/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.ts
var ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION";
var CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation";
var NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = {
environmentVariableSelector: /* @__PURE__ */ __name((env) => stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, "env" /* ENV */), "environmentVariableSelector"),
configFileSelector: /* @__PURE__ */ __name((profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, "shared config entry" /* CONFIG */), "configFileSelector"),
default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION
};
// src/crc64-nvme-crt-container.ts
var crc64NvmeCrtContainer = {
CrtCrc64Nvme: null
};
// src/flexibleChecksumsMiddleware.ts
var import_core = __nccwpck_require__(59963);
var import_protocol_http = __nccwpck_require__(64418);
var import_util_stream = __nccwpck_require__(96607);
// src/types.ts
var CLIENT_SUPPORTED_ALGORITHMS = [
"CRC32" /* CRC32 */,
"CRC32C" /* CRC32C */,
"CRC64NVME" /* CRC64NVME */,
"SHA1" /* SHA1 */,
"SHA256" /* SHA256 */
];
var PRIORITY_ORDER_ALGORITHMS = [
"SHA256" /* SHA256 */,
"SHA1" /* SHA1 */,
"CRC32" /* CRC32 */,
"CRC32C" /* CRC32C */,
"CRC64NVME" /* CRC64NVME */
];
// src/getChecksumAlgorithmForRequest.ts
var getChecksumAlgorithmForRequest = /* @__PURE__ */ __name((input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => {
if (!requestAlgorithmMember) {
return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired ? DEFAULT_CHECKSUM_ALGORITHM : void 0;
}
if (!input[requestAlgorithmMember]) {
return void 0;
}
const checksumAlgorithm = input[requestAlgorithmMember];
if (!CLIENT_SUPPORTED_ALGORITHMS.includes(checksumAlgorithm)) {
throw new Error(
`The checksum algorithm "${checksumAlgorithm}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}.`
);
}
return checksumAlgorithm;
}, "getChecksumAlgorithmForRequest");
// src/getChecksumLocationName.ts
var getChecksumLocationName = /* @__PURE__ */ __name((algorithm) => algorithm === "MD5" /* MD5 */ ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`, "getChecksumLocationName");
// src/hasHeader.ts
var hasHeader = /* @__PURE__ */ __name((header, headers) => {
const soughtHeader = header.toLowerCase();
for (const headerName of Object.keys(headers)) {
if (soughtHeader === headerName.toLowerCase()) {
return true;
}
}
return false;
}, "hasHeader");
// src/hasHeaderWithPrefix.ts
var hasHeaderWithPrefix = /* @__PURE__ */ __name((headerPrefix, headers) => {
const soughtHeaderPrefix = headerPrefix.toLowerCase();
for (const headerName of Object.keys(headers)) {
if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) {
return true;
}
}
return false;
}, "hasHeaderWithPrefix");
// src/isStreaming.ts
var import_is_array_buffer = __nccwpck_require__(10780);
var isStreaming = /* @__PURE__ */ __name((body) => body !== void 0 && typeof body !== "string" && !ArrayBuffer.isView(body) && !(0, import_is_array_buffer.isArrayBuffer)(body), "isStreaming");
// src/selectChecksumAlgorithmFunction.ts
var import_crc32c = __nccwpck_require__(17035);
var import_getCrc32ChecksumAlgorithmFunction = __nccwpck_require__(61436);
var selectChecksumAlgorithmFunction = /* @__PURE__ */ __name((checksumAlgorithm, config) => {
switch (checksumAlgorithm) {
case "MD5" /* MD5 */:
return config.md5;
case "CRC32" /* CRC32 */:
return (0, import_getCrc32ChecksumAlgorithmFunction.getCrc32ChecksumAlgorithmFunction)();
case "CRC32C" /* CRC32C */:
return import_crc32c.AwsCrc32c;
case "CRC64NVME" /* CRC64NVME */:
if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== "function") {
throw new Error(
`Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly.
You must also register the package by calling [require("@aws-sdk/crc64-nvme-crt");] or an ESM equivalent such as [import "@aws-sdk/crc64-nvme-crt";].
For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`
);
}
return crc64NvmeCrtContainer.CrtCrc64Nvme;
case "SHA1" /* SHA1 */:
return config.sha1;
case "SHA256" /* SHA256 */:
return config.sha256;
default:
throw new Error(`Unsupported checksum algorithm: ${checksumAlgorithm}`);
}
}, "selectChecksumAlgorithmFunction");
// src/stringHasher.ts
var import_util_utf8 = __nccwpck_require__(41895);
var stringHasher = /* @__PURE__ */ __name((checksumAlgorithmFn, body) => {
const hash = new checksumAlgorithmFn();
hash.update((0, import_util_utf8.toUint8Array)(body || ""));
return hash.digest();
}, "stringHasher");
// src/flexibleChecksumsMiddleware.ts
var flexibleChecksumsMiddlewareOptions = {
name: "flexibleChecksumsMiddleware",
step: "build",
tags: ["BODY_CHECKSUM"],
override: true
};
var flexibleChecksumsMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next, context) => async (args) => {
if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
return next(args);
}
if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) {
return next(args);
}
const { request, input } = args;
const { body: requestBody, headers } = request;
const { base64Encoder, streamHasher } = config;
const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig;
const requestChecksumCalculation = await config.requestChecksumCalculation();
const requestAlgorithmMemberName = requestAlgorithmMember?.name;
const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader;
if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) {
if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) {
input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM;
if (requestAlgorithmMemberHttpHeader) {
headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM;
}
}
}
const checksumAlgorithm = getChecksumAlgorithmForRequest(input, {
requestChecksumRequired,
requestAlgorithmMember: requestAlgorithmMember?.name,
requestChecksumCalculation
});
let updatedBody = requestBody;
let updatedHeaders = headers;
if (checksumAlgorithm) {
switch (checksumAlgorithm) {
case "CRC32" /* CRC32 */:
(0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U");
break;
case "CRC32C" /* CRC32C */:
(0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V");
break;
case "CRC64NVME" /* CRC64NVME */:
(0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W");
break;
case "SHA1" /* SHA1 */:
(0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X");
break;
case "SHA256" /* SHA256 */:
(0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y");
break;
}
const checksumLocationName = getChecksumLocationName(checksumAlgorithm);
const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config);
if (isStreaming(requestBody)) {
const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;
updatedBody = getAwsChunkedEncodingStream(
typeof config.requestStreamBufferSize === "number" && config.requestStreamBufferSize >= 8 * 1024 ? (0, import_util_stream.createBufferedReadable)(requestBody, config.requestStreamBufferSize, context.logger) : requestBody,
{
base64Encoder,
bodyLengthChecker,
checksumLocationName,
checksumAlgorithmFn,
streamHasher
}
);
updatedHeaders = {
...headers,
"content-encoding": headers["content-encoding"] ? `${headers["content-encoding"]},aws-chunked` : "aws-chunked",
"transfer-encoding": "chunked",
"x-amz-decoded-content-length": headers["content-length"],
"x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER",
"x-amz-trailer": checksumLocationName
};
delete updatedHeaders["content-length"];
} else if (!hasHeader(checksumLocationName, headers)) {
const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody);
updatedHeaders = {
...headers,
[checksumLocationName]: base64Encoder(rawChecksum)
};
}
}
const result = await next({
...args,
request: {
...request,
headers: updatedHeaders,
body: updatedBody
}
});
return result;
}, "flexibleChecksumsMiddleware");
// src/flexibleChecksumsInputMiddleware.ts
var flexibleChecksumsInputMiddlewareOptions = {
name: "flexibleChecksumsInputMiddleware",
toMiddleware: "serializerMiddleware",
relation: "before",
tags: ["BODY_CHECKSUM"],
override: true
};
var flexibleChecksumsInputMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next, context) => async (args) => {
const input = args.input;
const { requestValidationModeMember } = middlewareConfig;
const requestChecksumCalculation = await config.requestChecksumCalculation();
const responseChecksumValidation = await config.responseChecksumValidation();
switch (requestChecksumCalculation) {
case RequestChecksumCalculation.WHEN_REQUIRED:
(0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a");
break;
case RequestChecksumCalculation.WHEN_SUPPORTED:
(0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z");
break;
}
switch (responseChecksumValidation) {
case ResponseChecksumValidation.WHEN_REQUIRED:
(0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c");
break;
case ResponseChecksumValidation.WHEN_SUPPORTED:
(0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b");
break;
}
if (requestValidationModeMember && !input[requestValidationModeMember]) {
if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) {
input[requestValidationModeMember] = "ENABLED";
}
}
return next(args);
}, "flexibleChecksumsInputMiddleware");
// src/flexibleChecksumsResponseMiddleware.ts
// src/getChecksumAlgorithmListForResponse.ts
var getChecksumAlgorithmListForResponse = /* @__PURE__ */ __name((responseAlgorithms = []) => {
const validChecksumAlgorithms = [];
for (const algorithm of PRIORITY_ORDER_ALGORITHMS) {
if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) {
continue;
}
validChecksumAlgorithms.push(algorithm);
}
return validChecksumAlgorithms;
}, "getChecksumAlgorithmListForResponse");
// src/isChecksumWithPartNumber.ts
var isChecksumWithPartNumber = /* @__PURE__ */ __name((checksum) => {
const lastHyphenIndex = checksum.lastIndexOf("-");
if (lastHyphenIndex !== -1) {
const numberPart = checksum.slice(lastHyphenIndex + 1);
if (!numberPart.startsWith("0")) {
const number = parseInt(numberPart, 10);
if (!isNaN(number) && number >= 1 && number <= 1e4) {
return true;
}
}
}
return false;
}, "isChecksumWithPartNumber");
// src/validateChecksumFromResponse.ts
// src/getChecksum.ts
var getChecksum = /* @__PURE__ */ __name(async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body)), "getChecksum");
// src/validateChecksumFromResponse.ts
var validateChecksumFromResponse = /* @__PURE__ */ __name(async (response, { config, responseAlgorithms, logger }) => {
const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms);
const { body: responseBody, headers: responseHeaders } = response;
for (const algorithm of checksumAlgorithms) {
const responseHeader = getChecksumLocationName(algorithm);
const checksumFromResponse = responseHeaders[responseHeader];
if (checksumFromResponse) {
let checksumAlgorithmFn;
try {
checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config);
} catch (error) {
if (algorithm === "CRC64NVME" /* CRC64NVME */) {
logger?.warn(`Skipping ${"CRC64NVME" /* CRC64NVME */} checksum validation: ${error.message}`);
continue;
}
throw error;
}
const { base64Encoder } = config;
if (isStreaming(responseBody)) {
response.body = (0, import_util_stream.createChecksumStream)({
expectedChecksum: checksumFromResponse,
checksumSourceLocation: responseHeader,
checksum: new checksumAlgorithmFn(),
source: responseBody,
base64Encoder
});
return;
}
const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder });
if (checksum === checksumFromResponse) {
break;
}
throw new Error(
`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}" in response header "${responseHeader}".`
);
}
}
}, "validateChecksumFromResponse");
// src/flexibleChecksumsResponseMiddleware.ts
var flexibleChecksumsResponseMiddlewareOptions = {
name: "flexibleChecksumsResponseMiddleware",
toMiddleware: "deserializerMiddleware",
relation: "after",
tags: ["BODY_CHECKSUM"],
override: true
};
var flexibleChecksumsResponseMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next, context) => async (args) => {
if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
return next(args);
}
const input = args.input;
const result = await next(args);
const response = result.response;
const { requestValidationModeMember, responseAlgorithms } = middlewareConfig;
if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") {
const { clientName, commandName } = context;
const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && commandName === "GetObjectCommand" && getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => {
const responseHeader = getChecksumLocationName(algorithm);
const checksumFromResponse = response.headers[responseHeader];
return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse);
});
if (isS3WholeObjectMultipartGetResponseChecksum) {
return result;
}
await validateChecksumFromResponse(response, {
config,
responseAlgorithms,
logger: context.logger
});
}
return result;
}, "flexibleChecksumsResponseMiddleware");
// src/getFlexibleChecksumsPlugin.ts
var getFlexibleChecksumsPlugin = /* @__PURE__ */ __name((config, middlewareConfig) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions);
clientStack.addRelativeTo(
flexibleChecksumsInputMiddleware(config, middlewareConfig),
flexibleChecksumsInputMiddlewareOptions
);
clientStack.addRelativeTo(
flexibleChecksumsResponseMiddleware(config, middlewareConfig),
flexibleChecksumsResponseMiddlewareOptions
);
}, "applyToStack")
}), "getFlexibleChecksumsPlugin");
// src/resolveFlexibleChecksumsConfig.ts
var import_util_middleware = __nccwpck_require__(2390);
var resolveFlexibleChecksumsConfig = /* @__PURE__ */ __name((input) => {
const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input;
return Object.assign(input, {
requestChecksumCalculation: (0, import_util_middleware.normalizeProvider)(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION),
responseChecksumValidation: (0, import_util_middleware.normalizeProvider)(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION),
requestStreamBufferSize: Number(requestStreamBufferSize ?? 0)
});
}, "resolveFlexibleChecksumsConfig");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 22545:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
getHostHeaderPlugin: () => getHostHeaderPlugin,
hostHeaderMiddleware: () => hostHeaderMiddleware,
hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions,
resolveHostHeaderConfig: () => resolveHostHeaderConfig
});
module.exports = __toCommonJS(index_exports);
var import_protocol_http = __nccwpck_require__(64418);
function resolveHostHeaderConfig(input) {
return input;
}
__name(resolveHostHeaderConfig, "resolveHostHeaderConfig");
var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {
if (!import_protocol_http.HttpRequest.isInstance(args.request)) return next(args);
const { request } = args;
const { handlerProtocol = "" } = options.requestHandler.metadata || {};
if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) {
delete request.headers["host"];
request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : "");
} else if (!request.headers["host"]) {
let host = request.hostname;
if (request.port != null) host += `:${request.port}`;
request.headers["host"] = host;
}
return next(args);
}, "hostHeaderMiddleware");
var hostHeaderMiddlewareOptions = {
name: "hostHeaderMiddleware",
step: "build",
priority: "low",
tags: ["HOST"],
override: true
};
var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
}, "applyToStack")
}), "getHostHeaderPlugin");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 42098:
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
getLocationConstraintPlugin: () => getLocationConstraintPlugin,
locationConstraintMiddleware: () => locationConstraintMiddleware,
locationConstraintMiddlewareOptions: () => locationConstraintMiddlewareOptions
});
module.exports = __toCommonJS(index_exports);
function locationConstraintMiddleware(options) {
return (next) => async (args) => {
const { CreateBucketConfiguration } = args.input;
const region = await options.region();
if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) {
args = {
...args,
input: {
...args.input,
CreateBucketConfiguration: region === "us-east-1" ? void 0 : { LocationConstraint: region }
}
};
}
return next(args);
};
}
__name(locationConstraintMiddleware, "locationConstraintMiddleware");
var locationConstraintMiddlewareOptions = {
step: "initialize",
tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"],
name: "locationConstraintMiddleware",
override: true
};
var getLocationConstraintPlugin = /* @__PURE__ */ __name((config) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);
}, "applyToStack")
}), "getLocationConstraintPlugin");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 20014:
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
getLoggerPlugin: () => getLoggerPlugin,
loggerMiddleware: () => loggerMiddleware,
loggerMiddlewareOptions: () => loggerMiddlewareOptions
});
module.exports = __toCommonJS(index_exports);
// src/loggerMiddleware.ts
var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => {
try {
const response = await next(args);
const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;
const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
const { $metadata, ...outputWithoutMetadata } = response.output;
logger?.info?.({
clientName,
commandName,
input: inputFilterSensitiveLog(args.input),
output: outputFilterSensitiveLog(outputWithoutMetadata),
metadata: $metadata
});
return response;
} catch (error) {
const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;
const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
logger?.error?.({
clientName,
commandName,
input: inputFilterSensitiveLog(args.input),
error,
metadata: error.$metadata
});
throw error;
}
}, "loggerMiddleware");
var loggerMiddlewareOptions = {
name: "loggerMiddleware",
tags: ["LOGGER"],
step: "initialize",
override: true
};
var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);
}, "applyToStack")
}), "getLoggerPlugin");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 85525:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions,
getRecursionDetectionPlugin: () => getRecursionDetectionPlugin,
recursionDetectionMiddleware: () => recursionDetectionMiddleware
});
module.exports = __toCommonJS(index_exports);
var import_protocol_http = __nccwpck_require__(64418);
var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
var ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
var recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {
const { request } = args;
if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== "node") {
return next(args);
}
const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME;
if (request.headers.hasOwnProperty(traceIdHeader)) {
return next(args);
}
const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
const traceId = process.env[ENV_TRACE_ID];
const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === "string" && str.length > 0, "nonEmptyString");
if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
request.headers[TRACE_ID_HEADER_NAME] = traceId;
}
return next({
...args,
request
});
}, "recursionDetectionMiddleware");
var addRecursionDetectionMiddlewareOptions = {
step: "build",
tags: ["RECURSION_DETECTION"],
name: "recursionDetectionMiddleware",
override: true,
priority: "low"
};
var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions);
}, "applyToStack")
}), "getRecursionDetectionPlugin");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 81139:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS: () => NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS,
S3ExpressIdentityCache: () => S3ExpressIdentityCache,
S3ExpressIdentityCacheEntry: () => S3ExpressIdentityCacheEntry,
S3ExpressIdentityProviderImpl: () => S3ExpressIdentityProviderImpl,
SignatureV4S3Express: () => SignatureV4S3Express,
checkContentLengthHeader: () => checkContentLengthHeader,
checkContentLengthHeaderMiddlewareOptions: () => checkContentLengthHeaderMiddlewareOptions,
getCheckContentLengthHeaderPlugin: () => getCheckContentLengthHeaderPlugin,
getRegionRedirectMiddlewarePlugin: () => getRegionRedirectMiddlewarePlugin,
getS3ExpiresMiddlewarePlugin: () => getS3ExpiresMiddlewarePlugin,
getS3ExpressHttpSigningPlugin: () => getS3ExpressHttpSigningPlugin,
getS3ExpressPlugin: () => getS3ExpressPlugin,
getThrow200ExceptionsPlugin: () => getThrow200ExceptionsPlugin,
getValidateBucketNamePlugin: () => getValidateBucketNamePlugin,
regionRedirectEndpointMiddleware: () => regionRedirectEndpointMiddleware,
regionRedirectEndpointMiddlewareOptions: () => regionRedirectEndpointMiddlewareOptions,
regionRedirectMiddleware: () => regionRedirectMiddleware,
regionRedirectMiddlewareOptions: () => regionRedirectMiddlewareOptions,
resolveS3Config: () => resolveS3Config,
s3ExpiresMiddleware: () => s3ExpiresMiddleware,
s3ExpiresMiddlewareOptions: () => s3ExpiresMiddlewareOptions,
s3ExpressHttpSigningMiddleware: () => s3ExpressHttpSigningMiddleware,
s3ExpressHttpSigningMiddlewareOptions: () => s3ExpressHttpSigningMiddlewareOptions,
s3ExpressMiddleware: () => s3ExpressMiddleware,
s3ExpressMiddlewareOptions: () => s3ExpressMiddlewareOptions,
throw200ExceptionsMiddleware: () => throw200ExceptionsMiddleware,
throw200ExceptionsMiddlewareOptions: () => throw200ExceptionsMiddlewareOptions,
validateBucketNameMiddleware: () => validateBucketNameMiddleware,
validateBucketNameMiddlewareOptions: () => validateBucketNameMiddlewareOptions
});
module.exports = __toCommonJS(index_exports);
// src/check-content-length-header.ts
var import_protocol_http = __nccwpck_require__(64418);
var import_smithy_client = __nccwpck_require__(63570);
var CONTENT_LENGTH_HEADER = "content-length";
var DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length";
function checkContentLengthHeader() {
return (next, context) => async (args) => {
const { request } = args;
if (import_protocol_http.HttpRequest.isInstance(request)) {
if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) {
const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;
if (typeof context?.logger?.warn === "function" && !(context.logger instanceof import_smithy_client.NoOpLogger)) {
context.logger.warn(message);
} else {
console.warn(message);
}
}
}
return next({ ...args });
};
}
__name(checkContentLengthHeader, "checkContentLengthHeader");
var checkContentLengthHeaderMiddlewareOptions = {
step: "finalizeRequest",
tags: ["CHECK_CONTENT_LENGTH_HEADER"],
name: "getCheckContentLengthHeaderPlugin",
override: true
};
var getCheckContentLengthHeaderPlugin = /* @__PURE__ */ __name((unused) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions);
}, "applyToStack")
}), "getCheckContentLengthHeaderPlugin");
// src/region-redirect-endpoint-middleware.ts
var regionRedirectEndpointMiddleware = /* @__PURE__ */ __name((config) => {
return (next, context) => async (args) => {
const originalRegion = await config.region();
const regionProviderRef = config.region;
let unlock = /* @__PURE__ */ __name(() => {
}, "unlock");
if (context.__s3RegionRedirect) {
Object.defineProperty(config, "region", {
writable: false,
value: /* @__PURE__ */ __name(async () => {
return context.__s3RegionRedirect;
}, "value")
});
unlock = /* @__PURE__ */ __name(() => Object.defineProperty(config, "region", {
writable: true,
value: regionProviderRef
}), "unlock");
}
try {
const result = await next(args);
if (context.__s3RegionRedirect) {
unlock();
const region = await config.region();
if (originalRegion !== region) {
throw new Error("Region was not restored following S3 region redirect.");
}
}
return result;
} catch (e) {
unlock();
throw e;
}
};
}, "regionRedirectEndpointMiddleware");
var regionRedirectEndpointMiddlewareOptions = {
tags: ["REGION_REDIRECT", "S3"],
name: "regionRedirectEndpointMiddleware",
override: true,
relation: "before",
toMiddleware: "endpointV2Middleware"
};
// src/region-redirect-middleware.ts
function regionRedirectMiddleware(clientConfig) {
return (next, context) => async (args) => {
try {
return await next(args);
} catch (err) {
if (clientConfig.followRegionRedirects) {
if (err?.$metadata?.httpStatusCode === 301 || // err.name === "PermanentRedirect" && --> removing the error name check, as that allows for HEAD operations (which have the 301 status code, but not the same error name) to be covered for region redirection as well
err?.$metadata?.httpStatusCode === 400 && err?.name === "IllegalLocationConstraintException") {
try {
const actualRegion = err.$response.headers["x-amz-bucket-region"];
context.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`);
context.__s3RegionRedirect = actualRegion;
} catch (e) {
throw new Error("Region redirect failed: " + e);
}
return next(args);
}
}
throw err;
}
};
}
__name(regionRedirectMiddleware, "regionRedirectMiddleware");
var regionRedirectMiddlewareOptions = {
step: "initialize",
tags: ["REGION_REDIRECT", "S3"],
name: "regionRedirectMiddleware",
override: true
};
var getRegionRedirectMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions);
clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions);
}, "applyToStack")
}), "getRegionRedirectMiddlewarePlugin");
// src/s3-expires-middleware.ts
var s3ExpiresMiddleware = /* @__PURE__ */ __name((config) => {
return (next, context) => async (args) => {
const result = await next(args);
const { response } = result;
if (import_protocol_http.HttpResponse.isInstance(response)) {
if (response.headers.expires) {
response.headers.expiresstring = response.headers.expires;
try {
(0, import_smithy_client.parseRfc7231DateTime)(response.headers.expires);
} catch (e) {
context.logger?.warn(
`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e}`
);
delete response.headers.expires;
}
}
}
return result;
};
}, "s3ExpiresMiddleware");
var s3ExpiresMiddlewareOptions = {
tags: ["S3"],
name: "s3ExpiresMiddleware",
override: true,
relation: "after",
toMiddleware: "deserializerMiddleware"
};
var getS3ExpiresMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions);
}, "applyToStack")
}), "getS3ExpiresMiddlewarePlugin");
// src/s3-express/classes/S3ExpressIdentityCache.ts
var S3ExpressIdentityCache = class _S3ExpressIdentityCache {
constructor(data = {}) {
this.data = data;
}
static {
__name(this, "S3ExpressIdentityCache");
}
lastPurgeTime = Date.now();
static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 3e4;
get(key) {
const entry = this.data[key];
if (!entry) {
return;
}
return entry;
}
set(key, entry) {
this.data[key] = entry;
return entry;
}
delete(key) {
delete this.data[key];
}
async purgeExpired() {
const now = Date.now();
if (this.lastPurgeTime + _S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) {
return;
}
for (const key in this.data) {
const entry = this.data[key];
if (!entry.isRefreshing) {
const credential = await entry.identity;
if (credential.expiration) {
if (credential.expiration.getTime() < now) {
delete this.data[key];
}
}
}
}
}
};
// src/s3-express/classes/S3ExpressIdentityCacheEntry.ts
var S3ExpressIdentityCacheEntry = class {
/**
* @param identity - stored identity.
* @param accessed - timestamp of last access in epoch ms.
* @param isRefreshing - this key is currently in the process of being refreshed (background).
*/
constructor(_identity, isRefreshing = false, accessed = Date.now()) {
this._identity = _identity;
this.isRefreshing = isRefreshing;
this.accessed = accessed;
}
static {
__name(this, "S3ExpressIdentityCacheEntry");
}
get identity() {
this.accessed = Date.now();
return this._identity;
}
};
// src/s3-express/classes/S3ExpressIdentityProviderImpl.ts
var S3ExpressIdentityProviderImpl = class _S3ExpressIdentityProviderImpl {
constructor(createSessionFn, cache = new S3ExpressIdentityCache()) {
this.createSessionFn = createSessionFn;
this.cache = cache;
}
static {
__name(this, "S3ExpressIdentityProviderImpl");
}
static REFRESH_WINDOW_MS = 6e4;
async getS3ExpressIdentity(awsIdentity, identityProperties) {
const key = identityProperties.Bucket;
const { cache } = this;
const entry = cache.get(key);
if (entry) {
return entry.identity.then((identity) => {
const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now();
if (isExpired) {
return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;
}
const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + _S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS;
if (isExpiringSoon && !entry.isRefreshing) {
entry.isRefreshing = true;
this.getIdentity(key).then((id) => {
cache.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id)));
});
}
return identity;
});
}
return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;
}
async getIdentity(key) {
await this.cache.purgeExpired().catch((error) => {
console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error);
});
const session = await this.createSessionFn(key);
if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) {
throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");
}
const identity = {
accessKeyId: session.Credentials.AccessKeyId,
secretAccessKey: session.Credentials.SecretAccessKey,
sessionToken: session.Credentials.SessionToken,
expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : void 0
};
return identity;
}
};
// src/s3-express/classes/SignatureV4S3Express.ts
var import_signature_v4 = __nccwpck_require__(11528);
// src/s3-express/constants.ts
var import_util_config_provider = __nccwpck_require__(83375);
var S3_EXPRESS_BUCKET_TYPE = "Directory";
var S3_EXPRESS_BACKEND = "S3Express";
var S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express";
var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token";
var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();
var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH";
var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = "s3_disable_express_session_auth";
var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {
environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"),
configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"),
default: false
};
// src/s3-express/classes/SignatureV4S3Express.ts
var SignatureV4S3Express = class extends import_signature_v4.SignatureV4 {
static {
__name(this, "SignatureV4S3Express");
}
/**
* Signs with alternate provided credentials instead of those provided in the
* constructor.
*
* Additionally omits the credential sessionToken and assigns it to the
* alternate header field for S3 Express.
*/
async signWithCredentials(requestToSign, credentials, options) {
const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;
const privateAccess = this;
setSingleOverride(privateAccess, credentialsWithoutSessionToken);
return privateAccess.signRequest(requestToSign, options ?? {});
}
/**
* Similar to {@link SignatureV4S3Express#signWithCredentials} but for presigning.
*/
async presignWithCredentials(requestToSign, credentials, options) {
const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
delete requestToSign.headers[SESSION_TOKEN_HEADER];
requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
requestToSign.query = requestToSign.query ?? {};
requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
const privateAccess = this;
setSingleOverride(privateAccess, credentialsWithoutSessionToken);
return this.presign(requestToSign, options);
}
};
function getCredentialsWithoutSessionToken(credentials) {
const credentialsWithoutSessionToken = {
accessKeyId: credentials.accessKeyId,
secretAccessKey: credentials.secretAccessKey,
expiration: credentials.expiration
};
return credentialsWithoutSessionToken;
}
__name(getCredentialsWithoutSessionToken, "getCredentialsWithoutSessionToken");
function setSingleOverride(privateAccess, credentialsWithoutSessionToken) {
const id = setTimeout(() => {
throw new Error("SignatureV4S3Express credential override was created but not called.");
}, 10);
const currentCredentialProvider = privateAccess.credentialProvider;
const overrideCredentialsProviderOnce = /* @__PURE__ */ __name(() => {
clearTimeout(id);
privateAccess.credentialProvider = currentCredentialProvider;
return Promise.resolve(credentialsWithoutSessionToken);
}, "overrideCredentialsProviderOnce");
privateAccess.credentialProvider = overrideCredentialsProviderOnce;
}
__name(setSingleOverride, "setSingleOverride");
// src/s3-express/functions/s3ExpressMiddleware.ts
var import_core = __nccwpck_require__(59963);
var s3ExpressMiddleware = /* @__PURE__ */ __name((options) => {
return (next, context) => async (args) => {
if (context.endpointV2) {
const endpoint = context.endpointV2;
const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME;
const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND || endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE;
if (isS3ExpressBucket) {
(0, import_core.setFeature)(context, "S3_EXPRESS_BUCKET", "J");
context.isS3ExpressBucket = true;
}
if (isS3ExpressAuth) {
const requestBucket = args.input.Bucket;
if (requestBucket) {
const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(
await options.credentials(),
{
Bucket: requestBucket
}
);
context.s3ExpressIdentity = s3ExpressIdentity;
if (import_protocol_http.HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) {
args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken;
}
}
}
}
return next(args);
};
}, "s3ExpressMiddleware");
var s3ExpressMiddlewareOptions = {
name: "s3ExpressMiddleware",
step: "build",
tags: ["S3", "S3_EXPRESS"],
override: true
};
var getS3ExpressPlugin = /* @__PURE__ */ __name((options) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions);
}, "applyToStack")
}), "getS3ExpressPlugin");
// src/s3-express/functions/s3ExpressHttpSigningMiddleware.ts
var import_core2 = __nccwpck_require__(55829);
var import_util_middleware = __nccwpck_require__(2390);
// src/s3-express/functions/signS3Express.ts
var signS3Express = /* @__PURE__ */ __name(async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => {
const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {});
if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) {
throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");
}
return signedRequest;
}, "signS3Express");
// src/s3-express/functions/s3ExpressHttpSigningMiddleware.ts
var defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => {
throw error;
}, "defaultErrorHandler");
var defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => {
}, "defaultSuccessHandler");
var s3ExpressHttpSigningMiddlewareOptions = import_core2.httpSigningMiddlewareOptions;
var s3ExpressHttpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {
if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
return next(args);
}
const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
const scheme = smithyContext.selectedHttpAuthScheme;
if (!scheme) {
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
}
const {
httpAuthOption: { signingProperties = {} },
identity,
signer
} = scheme;
let request;
if (context.s3ExpressIdentity) {
request = await signS3Express(
context.s3ExpressIdentity,
signingProperties,
args.request,
await config.signer()
);
} else {
request = await signer.sign(args.request, identity, signingProperties);
}
const output = await next({
...args,
request
}).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
(signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
return output;
}, "s3ExpressHttpSigningMiddleware");
var getS3ExpressHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.addRelativeTo(
s3ExpressHttpSigningMiddleware(config),
import_core2.httpSigningMiddlewareOptions
);
}, "applyToStack")
}), "getS3ExpressHttpSigningPlugin");
// src/s3Configuration.ts
var resolveS3Config = /* @__PURE__ */ __name((input, {
session
}) => {
const [s3ClientProvider, CreateSessionCommandCtor] = session;
const {
forcePathStyle,
useAccelerateEndpoint,
disableMultiregionAccessPoints,
followRegionRedirects,
s3ExpressIdentityProvider,
bucketEndpoint
} = input;
return Object.assign(input, {
forcePathStyle: forcePathStyle ?? false,
useAccelerateEndpoint: useAccelerateEndpoint ?? false,
disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false,
followRegionRedirects: followRegionRedirects ?? false,
s3ExpressIdentityProvider: s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl(
async (key) => s3ClientProvider().send(
new CreateSessionCommandCtor({
Bucket: key
})
)
),
bucketEndpoint: bucketEndpoint ?? false
});
}, "resolveS3Config");
// src/throw-200-exceptions.ts
var import_util_stream = __nccwpck_require__(96607);
var THROW_IF_EMPTY_BODY = {
CopyObjectCommand: true,
UploadPartCopyCommand: true,
CompleteMultipartUploadCommand: true
};
var MAX_BYTES_TO_INSPECT = 3e3;
var throw200ExceptionsMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {
const result = await next(args);
const { response } = result;
if (!import_protocol_http.HttpResponse.isInstance(response)) {
return result;
}
const { statusCode, body: sourceBody } = response;
if (statusCode < 200 || statusCode >= 300) {
return result;
}
const isSplittableStream = typeof sourceBody?.stream === "function" || typeof sourceBody?.pipe === "function" || typeof sourceBody?.tee === "function";
if (!isSplittableStream) {
return result;
}
let bodyCopy = sourceBody;
let body = sourceBody;
if (sourceBody && typeof sourceBody === "object" && !(sourceBody instanceof Uint8Array)) {
[bodyCopy, body] = await (0, import_util_stream.splitStream)(sourceBody);
}
response.body = body;
const bodyBytes = await collectBody(bodyCopy, {
streamCollector: /* @__PURE__ */ __name(async (stream) => {
return (0, import_util_stream.headStream)(stream, MAX_BYTES_TO_INSPECT);
}, "streamCollector")
});
if (typeof bodyCopy?.destroy === "function") {
bodyCopy.destroy();
}
const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));
if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {
const err = new Error("S3 aborted request");
err.name = "InternalError";
throw err;
}
if (bodyStringTail && bodyStringTail.endsWith("")) {
response.statusCode = 400;
}
return result;
}, "throw200ExceptionsMiddleware");
var collectBody = /* @__PURE__ */ __name((streamBody = new Uint8Array(), context) => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
}, "collectBody");
var throw200ExceptionsMiddlewareOptions = {
relation: "after",
toMiddleware: "deserializerMiddleware",
tags: ["THROW_200_EXCEPTIONS", "S3"],
name: "throw200ExceptionsMiddleware",
override: true
};
var getThrow200ExceptionsPlugin = /* @__PURE__ */ __name((config) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions);
}, "applyToStack")
}), "getThrow200ExceptionsPlugin");
// src/validate-bucket-name.ts
var import_util_arn_parser = __nccwpck_require__(85487);
// src/bucket-endpoint-middleware.ts
function bucketEndpointMiddleware(options) {
return (next, context) => async (args) => {
if (options.bucketEndpoint) {
const endpoint = context.endpointV2;
if (endpoint) {
const bucket = args.input.Bucket;
if (typeof bucket === "string") {
try {
const bucketEndpointUrl = new URL(bucket);
context.endpointV2 = {
...endpoint,
url: bucketEndpointUrl
};
} catch (e) {
const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`;
if (context.logger?.constructor?.name === "NoOpLogger") {
console.warn(warning);
} else {
context.logger?.warn?.(warning);
}
throw e;
}
}
}
}
return next(args);
};
}
__name(bucketEndpointMiddleware, "bucketEndpointMiddleware");
var bucketEndpointMiddlewareOptions = {
name: "bucketEndpointMiddleware",
override: true,
relation: "after",
toMiddleware: "endpointV2Middleware"
};
// src/validate-bucket-name.ts
function validateBucketNameMiddleware({ bucketEndpoint }) {
return (next) => async (args) => {
const {
input: { Bucket }
} = args;
if (!bucketEndpoint && typeof Bucket === "string" && !(0, import_util_arn_parser.validate)(Bucket) && Bucket.indexOf("/") >= 0) {
const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`);
err.name = "InvalidBucketName";
throw err;
}
return next({ ...args });
};
}
__name(validateBucketNameMiddleware, "validateBucketNameMiddleware");
var validateBucketNameMiddlewareOptions = {
step: "initialize",
tags: ["VALIDATE_BUCKET_NAME"],
name: "validateBucketNameMiddleware",
override: true
};
var getValidateBucketNamePlugin = /* @__PURE__ */ __name((options) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions);
clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions);
}, "applyToStack")
}), "getValidateBucketNamePlugin");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 49718:
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
getSsecPlugin: () => getSsecPlugin,
isValidBase64EncodedSSECustomerKey: () => isValidBase64EncodedSSECustomerKey,
ssecMiddleware: () => ssecMiddleware,
ssecMiddlewareOptions: () => ssecMiddlewareOptions
});
module.exports = __toCommonJS(index_exports);
function ssecMiddleware(options) {
return (next) => async (args) => {
const input = { ...args.input };
const properties = [
{
target: "SSECustomerKey",
hash: "SSECustomerKeyMD5"
},
{
target: "CopySourceSSECustomerKey",
hash: "CopySourceSSECustomerKeyMD5"
}
];
for (const prop of properties) {
const value = input[prop.target];
if (value) {
let valueForHash;
if (typeof value === "string") {
if (isValidBase64EncodedSSECustomerKey(value, options)) {
valueForHash = options.base64Decoder(value);
} else {
valueForHash = options.utf8Decoder(value);
input[prop.target] = options.base64Encoder(valueForHash);
}
} else {
valueForHash = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : new Uint8Array(value);
input[prop.target] = options.base64Encoder(valueForHash);
}
const hash = new options.md5();
hash.update(valueForHash);
input[prop.hash] = options.base64Encoder(await hash.digest());
}
}
return next({
...args,
input
});
};
}
__name(ssecMiddleware, "ssecMiddleware");
var ssecMiddlewareOptions = {
name: "ssecMiddleware",
step: "initialize",
tags: ["SSE"],
override: true
};
var getSsecPlugin = /* @__PURE__ */ __name((config) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions);
}, "applyToStack")
}), "getSsecPlugin");
function isValidBase64EncodedSSECustomerKey(str, options) {
const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
if (!base64Regex.test(str)) return false;
try {
const decodedBytes = options.base64Decoder(str);
return decodedBytes.length === 32;
} catch {
return false;
}
}
__name(isValidBase64EncodedSSECustomerKey, "isValidBase64EncodedSSECustomerKey");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 64688:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID,
getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions,
getUserAgentPlugin: () => getUserAgentPlugin,
resolveUserAgentConfig: () => resolveUserAgentConfig,
userAgentMiddleware: () => userAgentMiddleware
});
module.exports = __toCommonJS(index_exports);
// src/configurations.ts
var import_core = __nccwpck_require__(55829);
var DEFAULT_UA_APP_ID = void 0;
function isValidUserAgentAppId(appId) {
if (appId === void 0) {
return true;
}
return typeof appId === "string" && appId.length <= 50;
}
__name(isValidUserAgentAppId, "isValidUserAgentAppId");
function resolveUserAgentConfig(input) {
const normalizedAppIdProvider = (0, import_core.normalizeProvider)(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
const { customUserAgent } = input;
return Object.assign(input, {
customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
userAgentAppId: /* @__PURE__ */ __name(async () => {
const appId = await normalizedAppIdProvider();
if (!isValidUserAgentAppId(appId)) {
const logger = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
if (typeof appId !== "string") {
logger?.warn("userAgentAppId must be a string or undefined.");
} else if (appId.length > 50) {
logger?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
}
}
return appId;
}, "userAgentAppId")
});
}
__name(resolveUserAgentConfig, "resolveUserAgentConfig");
// src/user-agent-middleware.ts
var import_util_endpoints = __nccwpck_require__(13350);
var import_protocol_http = __nccwpck_require__(64418);
// src/check-features.ts
var import_core2 = __nccwpck_require__(59963);
var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
async function checkFeatures(context, config, args) {
const request = args.request;
if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
(0, import_core2.setFeature)(context, "PROTOCOL_RPC_V2_CBOR", "M");
}
if (typeof config.retryStrategy === "function") {
const retryStrategy = await config.retryStrategy();
if (typeof retryStrategy.acquireInitialRetryToken === "function") {
if (retryStrategy.constructor?.name?.includes("Adaptive")) {
(0, import_core2.setFeature)(context, "RETRY_MODE_ADAPTIVE", "F");
} else {
(0, import_core2.setFeature)(context, "RETRY_MODE_STANDARD", "E");
}
} else {
(0, import_core2.setFeature)(context, "RETRY_MODE_LEGACY", "D");
}
}
if (typeof config.accountIdEndpointMode === "function") {
const endpointV2 = context.endpointV2;
if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
(0, import_core2.setFeature)(context, "ACCOUNT_ID_ENDPOINT", "O");
}
switch (await config.accountIdEndpointMode?.()) {
case "disabled":
(0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
break;
case "preferred":
(0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
break;
case "required":
(0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
break;
}
}
const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;
if (identity?.$source) {
const credentials = identity;
if (credentials.accountId) {
(0, import_core2.setFeature)(context, "RESOLVED_ACCOUNT_ID", "T");
}
for (const [key, value] of Object.entries(credentials.$source ?? {})) {
(0, import_core2.setFeature)(context, key, value);
}
}
}
__name(checkFeatures, "checkFeatures");
// src/constants.ts
var USER_AGENT = "user-agent";
var X_AMZ_USER_AGENT = "x-amz-user-agent";
var SPACE = " ";
var UA_NAME_SEPARATOR = "/";
var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g;
var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;
var UA_ESCAPE_CHAR = "-";
// src/encode-features.ts
var BYTE_LIMIT = 1024;
function encodeFeatures(features) {
let buffer = "";
for (const key in features) {
const val = features[key];
if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
if (buffer.length) {
buffer += "," + val;
} else {
buffer += val;
}
continue;
}
break;
}
return buffer;
}
__name(encodeFeatures, "encodeFeatures");
// src/user-agent-middleware.ts
var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {
const { request } = args;
if (!import_protocol_http.HttpRequest.isInstance(request)) {
return next(args);
}
const { headers } = request;
const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
await checkFeatures(context, options, args);
const awsContext = context;
defaultUserAgent.push(
`m/${encodeFeatures(
Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features)
)}`
);
const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
const appId = await options.userAgentAppId();
if (appId) {
defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));
}
const prefix = (0, import_util_endpoints.getUserAgentPrefix)();
const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);
const normalUAValue = [
...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")),
...customUserAgent
].join(SPACE);
if (options.runtime !== "browser") {
if (normalUAValue) {
headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
}
headers[USER_AGENT] = sdkUserAgentValue;
} else {
headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
}
return next({
...args,
request
});
}, "userAgentMiddleware");
var escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => {
const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);
const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);
const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);
const prefix = name.substring(0, prefixSeparatorIndex);
let uaName = name.substring(prefixSeparatorIndex + 1);
if (prefix === "api") {
uaName = uaName.toLowerCase();
}
return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
switch (index) {
case 0:
return item;
case 1:
return `${acc}/${item}`;
default:
return `${acc}#${item}`;
}
}, "");
}, "escapeUserAgent");
var getUserAgentMiddlewareOptions = {
name: "getUserAgentMiddleware",
step: "build",
priority: "low",
tags: ["SET_USER_AGENT", "USER_AGENT"],
override: true
};
var getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({
applyToStack: /* @__PURE__ */ __name((clientStack) => {
clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
}, "applyToStack")
}), "getUserAgentPlugin");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 59414:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
const core_1 = __nccwpck_require__(59963);
const util_middleware_1 = __nccwpck_require__(2390);
const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
(() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider;
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "sso-oauth",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
return {
schemeId: "smithy.api#noAuth",
};
}
const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
case "CreateToken": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
exports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider;
const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
return Object.assign(config_0, {});
};
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
/***/ }),
/***/ 60005:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultEndpointResolver = void 0;
const util_endpoints_1 = __nccwpck_require__(13350);
const util_endpoints_2 = __nccwpck_require__(45473);
const ruleset_1 = __nccwpck_require__(90932);
const cache = new util_endpoints_2.EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});
const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
exports.defaultEndpointResolver = defaultEndpointResolver;
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
/***/ }),
/***/ 90932:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ruleSet = void 0;
const u = "required", v = "fn", w = "argv", x = "ref";
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
exports.ruleSet = _data;
/***/ }),
/***/ 27334:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/submodules/sso-oidc/index.ts
var index_exports = {};
__export(index_exports, {
$Command: () => import_smithy_client6.Command,
AccessDeniedException: () => AccessDeniedException,
AuthorizationPendingException: () => AuthorizationPendingException,
CreateTokenCommand: () => CreateTokenCommand,
CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog,
CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog,
ExpiredTokenException: () => ExpiredTokenException,
InternalServerException: () => InternalServerException,
InvalidClientException: () => InvalidClientException,
InvalidGrantException: () => InvalidGrantException,
InvalidRequestException: () => InvalidRequestException,
InvalidScopeException: () => InvalidScopeException,
SSOOIDC: () => SSOOIDC,
SSOOIDCClient: () => SSOOIDCClient,
SSOOIDCServiceException: () => SSOOIDCServiceException,
SlowDownException: () => SlowDownException,
UnauthorizedClientException: () => UnauthorizedClientException,
UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,
__Client: () => import_smithy_client2.Client
});
module.exports = __toCommonJS(index_exports);
// src/submodules/sso-oidc/SSOOIDCClient.ts
var import_middleware_host_header = __nccwpck_require__(22545);
var import_middleware_logger = __nccwpck_require__(20014);
var import_middleware_recursion_detection = __nccwpck_require__(85525);
var import_middleware_user_agent = __nccwpck_require__(64688);
var import_config_resolver = __nccwpck_require__(53098);
var import_core = __nccwpck_require__(55829);
var import_middleware_content_length = __nccwpck_require__(82800);
var import_middleware_endpoint = __nccwpck_require__(82918);
var import_middleware_retry = __nccwpck_require__(96039);
var import_smithy_client2 = __nccwpck_require__(63570);
var import_httpAuthSchemeProvider = __nccwpck_require__(59414);
// src/submodules/sso-oidc/endpoint/EndpointParameters.ts
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "sso-oauth"
});
}, "resolveClientEndpointParameters");
var commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
// src/submodules/sso-oidc/SSOOIDCClient.ts
var import_runtimeConfig = __nccwpck_require__(77277);
// src/submodules/sso-oidc/runtimeExtensions.ts
var import_region_config_resolver = __nccwpck_require__(18156);
var import_protocol_http = __nccwpck_require__(64418);
var import_smithy_client = __nccwpck_require__(63570);
// src/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.ts
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
} else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
}
};
}, "getHttpAuthExtensionConfiguration");
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials()
};
}, "resolveHttpAuthRuntimeConfig");
// src/submodules/sso-oidc/runtimeExtensions.ts
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
getHttpAuthExtensionConfiguration(runtimeConfig)
);
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(
runtimeConfig,
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
resolveHttpAuthRuntimeConfig(extensionConfiguration)
);
}, "resolveRuntimeExtensions");
// src/submodules/sso-oidc/SSOOIDCClient.ts
var SSOOIDCClient = class extends import_smithy_client2.Client {
static {
__name(this, "SSOOIDCClient");
}
/**
* The resolved configuration of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}.
*/
config;
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use(
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials
}), "identityProviderConfigProvider")
})
);
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
}
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy() {
super.destroy();
}
};
// src/submodules/sso-oidc/SSOOIDC.ts
var import_smithy_client7 = __nccwpck_require__(63570);
// src/submodules/sso-oidc/commands/CreateTokenCommand.ts
var import_middleware_endpoint2 = __nccwpck_require__(82918);
var import_middleware_serde = __nccwpck_require__(81238);
var import_smithy_client6 = __nccwpck_require__(63570);
// src/submodules/sso-oidc/models/models_0.ts
var import_smithy_client4 = __nccwpck_require__(63570);
// src/submodules/sso-oidc/models/SSOOIDCServiceException.ts
var import_smithy_client3 = __nccwpck_require__(63570);
var SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client3.ServiceException {
static {
__name(this, "SSOOIDCServiceException");
}
/**
* @internal
*/
constructor(options) {
super(options);
Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);
}
};
// src/submodules/sso-oidc/models/models_0.ts
var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException {
static {
__name(this, "AccessDeniedException");
}
name = "AccessDeniedException";
$fault = "client";
/**
* Single error code. For this exception the value will be access_denied
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "AccessDeniedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException {
static {
__name(this, "AuthorizationPendingException");
}
name = "AuthorizationPendingException";
$fault = "client";
/**
* Single error code. For this exception the value will be
* authorization_pending
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "AuthorizationPendingException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.clientSecret && { clientSecret: import_smithy_client4.SENSITIVE_STRING },
...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING },
...obj.codeVerifier && { codeVerifier: import_smithy_client4.SENSITIVE_STRING }
}), "CreateTokenRequestFilterSensitiveLog");
var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.accessToken && { accessToken: import_smithy_client4.SENSITIVE_STRING },
...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING },
...obj.idToken && { idToken: import_smithy_client4.SENSITIVE_STRING }
}), "CreateTokenResponseFilterSensitiveLog");
var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {
static {
__name(this, "ExpiredTokenException");
}
name = "ExpiredTokenException";
$fault = "client";
/**
* Single error code. For this exception the value will be expired_token
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "ExpiredTokenException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var InternalServerException = class _InternalServerException extends SSOOIDCServiceException {
static {
__name(this, "InternalServerException");
}
name = "InternalServerException";
$fault = "server";
/**
* Single error code. For this exception the value will be server_error
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "InternalServerException",
$fault: "server",
...opts
});
Object.setPrototypeOf(this, _InternalServerException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException {
static {
__name(this, "InvalidClientException");
}
name = "InvalidClientException";
$fault = "client";
/**
* Single error code. For this exception the value will be
* invalid_client
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidClientException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidClientException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {
static {
__name(this, "InvalidGrantException");
}
name = "InvalidGrantException";
$fault = "client";
/**
* Single error code. For this exception the value will be invalid_grant
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidGrantException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidGrantException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException {
static {
__name(this, "InvalidRequestException");
}
name = "InvalidRequestException";
$fault = "client";
/**
* Single error code. For this exception the value will be
* invalid_request
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidRequestException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidRequestException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException {
static {
__name(this, "InvalidScopeException");
}
name = "InvalidScopeException";
$fault = "client";
/**
* Single error code. For this exception the value will be invalid_scope
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidScopeException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidScopeException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var SlowDownException = class _SlowDownException extends SSOOIDCServiceException {
static {
__name(this, "SlowDownException");
}
name = "SlowDownException";
$fault = "client";
/**
* Single error code. For this exception the value will be slow_down
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "SlowDownException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _SlowDownException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException {
static {
__name(this, "UnauthorizedClientException");
}
name = "UnauthorizedClientException";
$fault = "client";
/**
* Single error code. For this exception the value will be
* unauthorized_client
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "UnauthorizedClientException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {
static {
__name(this, "UnsupportedGrantTypeException");
}
name = "UnsupportedGrantTypeException";
$fault = "client";
/**
* Single error code. For this exception the value will be
* unsupported_grant_type
.
* @public
*/
error;
/**
* Human-readable text providing additional information, used to assist the client developer
* in understanding the error that occurred.
* @public
*/
error_description;
/**
* @internal
*/
constructor(opts) {
super({
name: "UnsupportedGrantTypeException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);
this.error = opts.error;
this.error_description = opts.error_description;
}
};
// src/submodules/sso-oidc/protocols/Aws_restJson1.ts
var import_core2 = __nccwpck_require__(59963);
var import_core3 = __nccwpck_require__(55829);
var import_smithy_client5 = __nccwpck_require__(63570);
var se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core3.requestBuilder)(input, context);
const headers = {
"content-type": "application/json"
};
b.bp("/token");
let body;
body = JSON.stringify(
(0, import_smithy_client5.take)(input, {
clientId: [],
clientSecret: [],
code: [],
codeVerifier: [],
deviceCode: [],
grantType: [],
redirectUri: [],
refreshToken: [],
scope: /* @__PURE__ */ __name((_) => (0, import_smithy_client5._json)(_), "scope")
})
);
b.m("POST").h(headers).b(body);
return b.build();
}, "se_CreateTokenCommand");
var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client5.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
const doc = (0, import_smithy_client5.take)(data, {
accessToken: import_smithy_client5.expectString,
expiresIn: import_smithy_client5.expectInt32,
idToken: import_smithy_client5.expectString,
refreshToken: import_smithy_client5.expectString,
tokenType: import_smithy_client5.expectString
});
Object.assign(contents, doc);
return contents;
}, "de_CreateTokenCommand");
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
};
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
switch (errorCode) {
case "AccessDeniedException":
case "com.amazonaws.ssooidc#AccessDeniedException":
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
case "AuthorizationPendingException":
case "com.amazonaws.ssooidc#AuthorizationPendingException":
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
case "ExpiredTokenException":
case "com.amazonaws.ssooidc#ExpiredTokenException":
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
case "InternalServerException":
case "com.amazonaws.ssooidc#InternalServerException":
throw await de_InternalServerExceptionRes(parsedOutput, context);
case "InvalidClientException":
case "com.amazonaws.ssooidc#InvalidClientException":
throw await de_InvalidClientExceptionRes(parsedOutput, context);
case "InvalidGrantException":
case "com.amazonaws.ssooidc#InvalidGrantException":
throw await de_InvalidGrantExceptionRes(parsedOutput, context);
case "InvalidRequestException":
case "com.amazonaws.ssooidc#InvalidRequestException":
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
case "InvalidScopeException":
case "com.amazonaws.ssooidc#InvalidScopeException":
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
case "SlowDownException":
case "com.amazonaws.ssooidc#SlowDownException":
throw await de_SlowDownExceptionRes(parsedOutput, context);
case "UnauthorizedClientException":
case "com.amazonaws.ssooidc#UnauthorizedClientException":
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
case "UnsupportedGrantTypeException":
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode
});
}
}, "de_CommandError");
var throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOOIDCServiceException);
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new AccessDeniedException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_AccessDeniedExceptionRes");
var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new AuthorizationPendingException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_AuthorizationPendingExceptionRes");
var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new ExpiredTokenException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_ExpiredTokenExceptionRes");
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new InternalServerException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_InternalServerExceptionRes");
var de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new InvalidClientException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidClientExceptionRes");
var de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new InvalidGrantException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidGrantExceptionRes");
var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new InvalidRequestException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidRequestExceptionRes");
var de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new InvalidScopeException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidScopeExceptionRes");
var de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new SlowDownException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_SlowDownExceptionRes");
var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new UnauthorizedClientException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_UnauthorizedClientExceptionRes");
var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client5.take)(data, {
error: import_smithy_client5.expectString,
error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
const exception = new UnsupportedGrantTypeException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_UnsupportedGrantTypeExceptionRes");
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
// src/submodules/sso-oidc/commands/CreateTokenCommand.ts
var CreateTokenCommand = class extends import_smithy_client6.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {
static {
__name(this, "CreateTokenCommand");
}
};
// src/submodules/sso-oidc/SSOOIDC.ts
var commands = {
CreateTokenCommand
};
var SSOOIDC = class extends SSOOIDCClient {
static {
__name(this, "SSOOIDC");
}
};
(0, import_smithy_client7.createAggregatedClient)(commands, SSOOIDC);
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 77277:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(88842));
const core_1 = __nccwpck_require__(59963);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const config_resolver_1 = __nccwpck_require__(53098);
const hash_node_1 = __nccwpck_require__(3081);
const middleware_retry_1 = __nccwpck_require__(96039);
const node_config_provider_1 = __nccwpck_require__(33461);
const node_http_handler_1 = __nccwpck_require__(20258);
const util_body_length_node_1 = __nccwpck_require__(68075);
const util_retry_1 = __nccwpck_require__(84902);
const runtimeConfig_shared_1 = __nccwpck_require__(49513);
const smithy_client_1 = __nccwpck_require__(63570);
const util_defaults_mode_node_1 = __nccwpck_require__(72429);
const smithy_client_2 = __nccwpck_require__(63570);
const getRuntimeConfig = (config) => {
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
const profileConfig = { profile: config?.profile };
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ??
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
(0, node_config_provider_1.loadConfig)({
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 49513:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const core_1 = __nccwpck_require__(59963);
const core_2 = __nccwpck_require__(55829);
const smithy_client_1 = __nccwpck_require__(63570);
const url_parser_1 = __nccwpck_require__(14681);
const util_base64_1 = __nccwpck_require__(75600);
const util_utf8_1 = __nccwpck_require__(41895);
const httpAuthSchemeProvider_1 = __nccwpck_require__(59414);
const endpointResolver_1 = __nccwpck_require__(60005);
const getRuntimeConfig = (config) => {
return {
apiVersion: "2019-06-10",
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new core_1.AwsSdkSigV4Signer(),
},
{
schemeId: "smithy.api#noAuth",
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
signer: new core_2.NoAuthSigner(),
},
],
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
serviceId: config?.serviceId ?? "SSO OIDC",
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 68974:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.STSClient = exports.__Client = void 0;
const middleware_host_header_1 = __nccwpck_require__(22545);
const middleware_logger_1 = __nccwpck_require__(20014);
const middleware_recursion_detection_1 = __nccwpck_require__(85525);
const middleware_user_agent_1 = __nccwpck_require__(64688);
const config_resolver_1 = __nccwpck_require__(53098);
const core_1 = __nccwpck_require__(55829);
const middleware_content_length_1 = __nccwpck_require__(82800);
const middleware_endpoint_1 = __nccwpck_require__(82918);
const middleware_retry_1 = __nccwpck_require__(96039);
const smithy_client_1 = __nccwpck_require__(63570);
Object.defineProperty(exports, "__Client", ({ enumerable: true, get: function () { return smithy_client_1.Client; } }));
const httpAuthSchemeProvider_1 = __nccwpck_require__(48013);
const EndpointParameters_1 = __nccwpck_require__(41765);
const runtimeConfig_1 = __nccwpck_require__(1798);
const runtimeExtensions_1 = __nccwpck_require__(30669);
class STSClient extends smithy_client_1.Client {
config;
constructor(...[configuration]) {
const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);
const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);
const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);
const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials,
}),
}));
this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
}
destroy() {
super.destroy();
}
}
exports.STSClient = STSClient;
/***/ }),
/***/ 14935:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
}
else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
},
};
};
exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
const resolveHttpAuthRuntimeConfig = (config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials(),
};
};
exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
/***/ }),
/***/ 48013:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;
const core_1 = __nccwpck_require__(59963);
const util_middleware_1 = __nccwpck_require__(2390);
const STSClient_1 = __nccwpck_require__(68974);
const defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
(() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "sts",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
return {
schemeId: "smithy.api#noAuth",
};
}
const defaultSTSHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
case "AssumeRoleWithWebIdentity": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;
const resolveStsAuthConfig = (input) => Object.assign(input, {
stsClientCtor: STSClient_1.STSClient,
});
exports.resolveStsAuthConfig = resolveStsAuthConfig;
const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = (0, exports.resolveStsAuthConfig)(config);
const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);
return Object.assign(config_1, {});
};
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
/***/ }),
/***/ 41765:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.commonParams = exports.resolveClientEndpointParameters = void 0;
const resolveClientEndpointParameters = (options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
useGlobalEndpoint: options.useGlobalEndpoint ?? false,
defaultSigningName: "sts",
});
};
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
exports.commonParams = {
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
/***/ }),
/***/ 47561:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultEndpointResolver = void 0;
const util_endpoints_1 = __nccwpck_require__(13350);
const util_endpoints_2 = __nccwpck_require__(45473);
const ruleset_1 = __nccwpck_require__(39127);
const cache = new util_endpoints_2.EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"],
});
const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
exports.defaultEndpointResolver = defaultEndpointResolver;
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
/***/ }),
/***/ 39127:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ruleSet = void 0;
const F = "required", G = "type", H = "fn", I = "argv", J = "ref";
const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "String" }, n = { [F]: true, "default": false, [G]: "Boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y];
const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
exports.ruleSet = _data;
/***/ }),
/***/ 2273:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/submodules/sts/index.ts
var index_exports = {};
__export(index_exports, {
AssumeRoleCommand: () => AssumeRoleCommand,
AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog,
AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand,
AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog,
AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog,
ClientInputEndpointParameters: () => import_EndpointParameters3.ClientInputEndpointParameters,
CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,
ExpiredTokenException: () => ExpiredTokenException,
IDPCommunicationErrorException: () => IDPCommunicationErrorException,
IDPRejectedClaimException: () => IDPRejectedClaimException,
InvalidIdentityTokenException: () => InvalidIdentityTokenException,
MalformedPolicyDocumentException: () => MalformedPolicyDocumentException,
PackedPolicyTooLargeException: () => PackedPolicyTooLargeException,
RegionDisabledException: () => RegionDisabledException,
STS: () => STS,
STSServiceException: () => STSServiceException,
decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,
getDefaultRoleAssumer: () => getDefaultRoleAssumer2,
getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2
});
module.exports = __toCommonJS(index_exports);
__reExport(index_exports, __nccwpck_require__(68974), module.exports);
// src/submodules/sts/STS.ts
var import_smithy_client6 = __nccwpck_require__(63570);
// src/submodules/sts/commands/AssumeRoleCommand.ts
var import_middleware_endpoint = __nccwpck_require__(82918);
var import_middleware_serde = __nccwpck_require__(81238);
var import_smithy_client4 = __nccwpck_require__(63570);
var import_EndpointParameters = __nccwpck_require__(41765);
// src/submodules/sts/models/models_0.ts
var import_smithy_client2 = __nccwpck_require__(63570);
// src/submodules/sts/models/STSServiceException.ts
var import_smithy_client = __nccwpck_require__(63570);
var STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException {
static {
__name(this, "STSServiceException");
}
/**
* @internal
*/
constructor(options) {
super(options);
Object.setPrototypeOf(this, _STSServiceException.prototype);
}
};
// src/submodules/sts/models/models_0.ts
var CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client2.SENSITIVE_STRING }
}), "CredentialsFilterSensitiveLog");
var AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
}), "AssumeRoleResponseFilterSensitiveLog");
var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {
static {
__name(this, "ExpiredTokenException");
}
name = "ExpiredTokenException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ExpiredTokenException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
}
};
var MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {
static {
__name(this, "MalformedPolicyDocumentException");
}
name = "MalformedPolicyDocumentException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "MalformedPolicyDocumentException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);
}
};
var PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {
static {
__name(this, "PackedPolicyTooLargeException");
}
name = "PackedPolicyTooLargeException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "PackedPolicyTooLargeException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);
}
};
var RegionDisabledException = class _RegionDisabledException extends STSServiceException {
static {
__name(this, "RegionDisabledException");
}
name = "RegionDisabledException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "RegionDisabledException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _RegionDisabledException.prototype);
}
};
var IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {
static {
__name(this, "IDPRejectedClaimException");
}
name = "IDPRejectedClaimException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "IDPRejectedClaimException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);
}
};
var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {
static {
__name(this, "InvalidIdentityTokenException");
}
name = "InvalidIdentityTokenException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidIdentityTokenException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);
}
};
var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client2.SENSITIVE_STRING }
}), "AssumeRoleWithWebIdentityRequestFilterSensitiveLog");
var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
}), "AssumeRoleWithWebIdentityResponseFilterSensitiveLog");
var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {
static {
__name(this, "IDPCommunicationErrorException");
}
name = "IDPCommunicationErrorException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "IDPCommunicationErrorException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);
}
};
// src/submodules/sts/protocols/Aws_query.ts
var import_core = __nccwpck_require__(59963);
var import_protocol_http = __nccwpck_require__(64418);
var import_smithy_client3 = __nccwpck_require__(63570);
var se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_AssumeRoleRequest(input, context),
[_A]: _AR,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_AssumeRoleCommand");
var se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {
const headers = SHARED_HEADERS;
let body;
body = buildFormUrlencodedString({
...se_AssumeRoleWithWebIdentityRequest(input, context),
[_A]: _ARWWI,
[_V]: _
});
return buildHttpRpcRequest(context, headers, "/", void 0, body);
}, "se_AssumeRoleWithWebIdentityCommand");
var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core.parseXmlBody)(output.body, context);
let contents = {};
contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_AssumeRoleCommand");
var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await (0, import_core.parseXmlBody)(output.body, context);
let contents = {};
contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents
};
return response;
}, "de_AssumeRoleWithWebIdentityCommand");
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await (0, import_core.parseXmlErrorBody)(output.body, context)
};
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ExpiredTokenException":
case "com.amazonaws.sts#ExpiredTokenException":
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
case "MalformedPolicyDocument":
case "com.amazonaws.sts#MalformedPolicyDocumentException":
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
case "PackedPolicyTooLarge":
case "com.amazonaws.sts#PackedPolicyTooLargeException":
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
case "RegionDisabledException":
case "com.amazonaws.sts#RegionDisabledException":
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
case "IDPCommunicationError":
case "com.amazonaws.sts#IDPCommunicationErrorException":
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
case "IDPRejectedClaim":
case "com.amazonaws.sts#IDPRejectedClaimException":
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
case "InvalidIdentityToken":
case "com.amazonaws.sts#InvalidIdentityTokenException":
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody: parsedBody.Error,
errorCode
});
}
}, "de_CommandError");
var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_ExpiredTokenException(body.Error, context);
const exception = new ExpiredTokenException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client3.decorateServiceException)(exception, body);
}, "de_ExpiredTokenExceptionRes");
var de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_IDPCommunicationErrorException(body.Error, context);
const exception = new IDPCommunicationErrorException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client3.decorateServiceException)(exception, body);
}, "de_IDPCommunicationErrorExceptionRes");
var de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_IDPRejectedClaimException(body.Error, context);
const exception = new IDPRejectedClaimException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client3.decorateServiceException)(exception, body);
}, "de_IDPRejectedClaimExceptionRes");
var de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_InvalidIdentityTokenException(body.Error, context);
const exception = new InvalidIdentityTokenException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client3.decorateServiceException)(exception, body);
}, "de_InvalidIdentityTokenExceptionRes");
var de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_MalformedPolicyDocumentException(body.Error, context);
const exception = new MalformedPolicyDocumentException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client3.decorateServiceException)(exception, body);
}, "de_MalformedPolicyDocumentExceptionRes");
var de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_PackedPolicyTooLargeException(body.Error, context);
const exception = new PackedPolicyTooLargeException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client3.decorateServiceException)(exception, body);
}, "de_PackedPolicyTooLargeExceptionRes");
var de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = de_RegionDisabledException(body.Error, context);
const exception = new RegionDisabledException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized
});
return (0, import_smithy_client3.decorateServiceException)(exception, body);
}, "de_RegionDisabledExceptionRes");
var se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RA] != null) {
entries[_RA] = input[_RA];
}
if (input[_RSN] != null) {
entries[_RSN] = input[_RSN];
}
if (input[_PA] != null) {
const memberEntries = se_policyDescriptorListType(input[_PA], context);
if (input[_PA]?.length === 0) {
entries.PolicyArns = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `PolicyArns.${key}`;
entries[loc] = value;
});
}
if (input[_P] != null) {
entries[_P] = input[_P];
}
if (input[_DS] != null) {
entries[_DS] = input[_DS];
}
if (input[_T] != null) {
const memberEntries = se_tagListType(input[_T], context);
if (input[_T]?.length === 0) {
entries.Tags = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Tags.${key}`;
entries[loc] = value;
});
}
if (input[_TTK] != null) {
const memberEntries = se_tagKeyListType(input[_TTK], context);
if (input[_TTK]?.length === 0) {
entries.TransitiveTagKeys = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `TransitiveTagKeys.${key}`;
entries[loc] = value;
});
}
if (input[_EI] != null) {
entries[_EI] = input[_EI];
}
if (input[_SN] != null) {
entries[_SN] = input[_SN];
}
if (input[_TC] != null) {
entries[_TC] = input[_TC];
}
if (input[_SI] != null) {
entries[_SI] = input[_SI];
}
if (input[_PC] != null) {
const memberEntries = se_ProvidedContextsListType(input[_PC], context);
if (input[_PC]?.length === 0) {
entries.ProvidedContexts = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `ProvidedContexts.${key}`;
entries[loc] = value;
});
}
return entries;
}, "se_AssumeRoleRequest");
var se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_RA] != null) {
entries[_RA] = input[_RA];
}
if (input[_RSN] != null) {
entries[_RSN] = input[_RSN];
}
if (input[_WIT] != null) {
entries[_WIT] = input[_WIT];
}
if (input[_PI] != null) {
entries[_PI] = input[_PI];
}
if (input[_PA] != null) {
const memberEntries = se_policyDescriptorListType(input[_PA], context);
if (input[_PA]?.length === 0) {
entries.PolicyArns = [];
}
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `PolicyArns.${key}`;
entries[loc] = value;
});
}
if (input[_P] != null) {
entries[_P] = input[_P];
}
if (input[_DS] != null) {
entries[_DS] = input[_DS];
}
return entries;
}, "se_AssumeRoleWithWebIdentityRequest");
var se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_PolicyDescriptorType(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_policyDescriptorListType");
var se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_a] != null) {
entries[_a] = input[_a];
}
return entries;
}, "se_PolicyDescriptorType");
var se_ProvidedContext = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_PAr] != null) {
entries[_PAr] = input[_PAr];
}
if (input[_CA] != null) {
entries[_CA] = input[_CA];
}
return entries;
}, "se_ProvidedContext");
var se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_ProvidedContext(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_ProvidedContextsListType");
var se_Tag = /* @__PURE__ */ __name((input, context) => {
const entries = {};
if (input[_K] != null) {
entries[_K] = input[_K];
}
if (input[_Va] != null) {
entries[_Va] = input[_Va];
}
return entries;
}, "se_Tag");
var se_tagKeyListType = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
}, "se_tagKeyListType");
var se_tagListType = /* @__PURE__ */ __name((input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = se_Tag(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
}, "se_tagListType");
var de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_ARI] != null) {
contents[_ARI] = (0, import_smithy_client3.expectString)(output[_ARI]);
}
if (output[_Ar] != null) {
contents[_Ar] = (0, import_smithy_client3.expectString)(output[_Ar]);
}
return contents;
}, "de_AssumedRoleUser");
var de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_C] != null) {
contents[_C] = de_Credentials(output[_C], context);
}
if (output[_ARU] != null) {
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
}
if (output[_PPS] != null) {
contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]);
}
return contents;
}, "de_AssumeRoleResponse");
var de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_C] != null) {
contents[_C] = de_Credentials(output[_C], context);
}
if (output[_SFWIT] != null) {
contents[_SFWIT] = (0, import_smithy_client3.expectString)(output[_SFWIT]);
}
if (output[_ARU] != null) {
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
}
if (output[_PPS] != null) {
contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]);
}
if (output[_Pr] != null) {
contents[_Pr] = (0, import_smithy_client3.expectString)(output[_Pr]);
}
if (output[_Au] != null) {
contents[_Au] = (0, import_smithy_client3.expectString)(output[_Au]);
}
if (output[_SI] != null) {
contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]);
}
return contents;
}, "de_AssumeRoleWithWebIdentityResponse");
var de_Credentials = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_AKI] != null) {
contents[_AKI] = (0, import_smithy_client3.expectString)(output[_AKI]);
}
if (output[_SAK] != null) {
contents[_SAK] = (0, import_smithy_client3.expectString)(output[_SAK]);
}
if (output[_ST] != null) {
contents[_ST] = (0, import_smithy_client3.expectString)(output[_ST]);
}
if (output[_E] != null) {
contents[_E] = (0, import_smithy_client3.expectNonNull)((0, import_smithy_client3.parseRfc3339DateTimeWithOffset)(output[_E]));
}
return contents;
}, "de_Credentials");
var de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_m] != null) {
contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
}
return contents;
}, "de_ExpiredTokenException");
var de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_m] != null) {
contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
}
return contents;
}, "de_IDPCommunicationErrorException");
var de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_m] != null) {
contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
}
return contents;
}, "de_IDPRejectedClaimException");
var de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_m] != null) {
contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
}
return contents;
}, "de_InvalidIdentityTokenException");
var de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_m] != null) {
contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
}
return contents;
}, "de_MalformedPolicyDocumentException");
var de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_m] != null) {
contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
}
return contents;
}, "de_PackedPolicyTooLargeException");
var de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => {
const contents = {};
if (output[_m] != null) {
contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
}
return contents;
}, "de_RegionDisabledException");
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
var throwDefaultError = (0, import_smithy_client3.withBaseException)(STSServiceException);
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents = {
protocol,
hostname,
port,
method: "POST",
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers
};
if (resolvedHostname !== void 0) {
contents.hostname = resolvedHostname;
}
if (body !== void 0) {
contents.body = body;
}
return new import_protocol_http.HttpRequest(contents);
}, "buildHttpRpcRequest");
var SHARED_HEADERS = {
"content-type": "application/x-www-form-urlencoded"
};
var _ = "2011-06-15";
var _A = "Action";
var _AKI = "AccessKeyId";
var _AR = "AssumeRole";
var _ARI = "AssumedRoleId";
var _ARU = "AssumedRoleUser";
var _ARWWI = "AssumeRoleWithWebIdentity";
var _Ar = "Arn";
var _Au = "Audience";
var _C = "Credentials";
var _CA = "ContextAssertion";
var _DS = "DurationSeconds";
var _E = "Expiration";
var _EI = "ExternalId";
var _K = "Key";
var _P = "Policy";
var _PA = "PolicyArns";
var _PAr = "ProviderArn";
var _PC = "ProvidedContexts";
var _PI = "ProviderId";
var _PPS = "PackedPolicySize";
var _Pr = "Provider";
var _RA = "RoleArn";
var _RSN = "RoleSessionName";
var _SAK = "SecretAccessKey";
var _SFWIT = "SubjectFromWebIdentityToken";
var _SI = "SourceIdentity";
var _SN = "SerialNumber";
var _ST = "SessionToken";
var _T = "Tags";
var _TC = "TokenCode";
var _TTK = "TransitiveTagKeys";
var _V = "Version";
var _Va = "Value";
var _WIT = "WebIdentityToken";
var _a = "arn";
var _m = "message";
var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client3.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client3.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString");
var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {
if (data.Error?.Code !== void 0) {
return data.Error.Code;
}
if (output.statusCode == 404) {
return "NotFound";
}
}, "loadQueryErrorCode");
// src/submodules/sts/commands/AssumeRoleCommand.ts
var AssumeRoleCommand = class extends import_smithy_client4.Command.classBuilder().ep(import_EndpointParameters.commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {
static {
__name(this, "AssumeRoleCommand");
}
};
// src/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.ts
var import_middleware_endpoint2 = __nccwpck_require__(82918);
var import_middleware_serde2 = __nccwpck_require__(81238);
var import_smithy_client5 = __nccwpck_require__(63570);
var import_EndpointParameters2 = __nccwpck_require__(41765);
var AssumeRoleWithWebIdentityCommand = class extends import_smithy_client5.Command.classBuilder().ep(import_EndpointParameters2.commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {
static {
__name(this, "AssumeRoleWithWebIdentityCommand");
}
};
// src/submodules/sts/STS.ts
var import_STSClient = __nccwpck_require__(68974);
var commands = {
AssumeRoleCommand,
AssumeRoleWithWebIdentityCommand
};
var STS = class extends import_STSClient.STSClient {
static {
__name(this, "STS");
}
};
(0, import_smithy_client6.createAggregatedClient)(commands, STS);
// src/submodules/sts/index.ts
var import_EndpointParameters3 = __nccwpck_require__(41765);
// src/submodules/sts/defaultStsRoleAssumers.ts
var import_client = __nccwpck_require__(2825);
var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
var getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => {
if (typeof assumedRoleUser?.Arn === "string") {
const arnComponents = assumedRoleUser.Arn.split(":");
if (arnComponents.length > 4 && arnComponents[4] !== "") {
return arnComponents[4];
}
}
return void 0;
}, "getAccountIdFromAssumedRoleUser");
var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => {
const region = typeof _region === "function" ? await _region() : _region;
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
credentialProviderLogger?.debug?.(
"@aws-sdk/client-sts::resolveRegion",
"accepting first of:",
`${region} (provider)`,
`${parentRegion} (parent client)`,
`${ASSUME_ROLE_DEFAULT_REGION} (STS default)`
);
return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;
}, "resolveRegion");
var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, STSClient3) => {
let stsClient;
let closureSourceCreds;
return async (sourceCreds, params) => {
closureSourceCreds = sourceCreds;
if (!stsClient) {
const {
logger = stsOptions?.parentClientConfig?.logger,
region,
requestHandler = stsOptions?.parentClientConfig?.requestHandler,
credentialProviderLogger
} = stsOptions;
const resolvedRegion = await resolveRegion(
region,
stsOptions?.parentClientConfig?.region,
credentialProviderLogger
);
const isCompatibleRequestHandler = !isH2(requestHandler);
stsClient = new STSClient3({
profile: stsOptions?.parentClientConfig?.profile,
// A hack to make sts client uses the credential in current closure.
credentialDefaultProvider: /* @__PURE__ */ __name(() => async () => closureSourceCreds, "credentialDefaultProvider"),
region: resolvedRegion,
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
logger
});
}
const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params));
if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
}
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
const credentials = {
accessKeyId: Credentials2.AccessKeyId,
secretAccessKey: Credentials2.SecretAccessKey,
sessionToken: Credentials2.SessionToken,
expiration: Credentials2.Expiration,
// TODO(credentialScope): access normally when shape is updated.
...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
...accountId && { accountId }
};
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
return credentials;
};
}, "getDefaultRoleAssumer");
var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, STSClient3) => {
let stsClient;
return async (params) => {
if (!stsClient) {
const {
logger = stsOptions?.parentClientConfig?.logger,
region,
requestHandler = stsOptions?.parentClientConfig?.requestHandler,
credentialProviderLogger
} = stsOptions;
const resolvedRegion = await resolveRegion(
region,
stsOptions?.parentClientConfig?.region,
credentialProviderLogger
);
const isCompatibleRequestHandler = !isH2(requestHandler);
stsClient = new STSClient3({
profile: stsOptions?.parentClientConfig?.profile,
region: resolvedRegion,
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
logger
});
}
const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
}
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
const credentials = {
accessKeyId: Credentials2.AccessKeyId,
secretAccessKey: Credentials2.SecretAccessKey,
sessionToken: Credentials2.SessionToken,
expiration: Credentials2.Expiration,
// TODO(credentialScope): access normally when shape is updated.
...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
...accountId && { accountId }
};
if (accountId) {
(0, import_client.setCredentialFeature)(credentials, "RESOLVED_ACCOUNT_ID", "T");
}
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
return credentials;
};
}, "getDefaultRoleAssumerWithWebIdentity");
var isH2 = /* @__PURE__ */ __name((requestHandler) => {
return requestHandler?.metadata?.handlerProtocol === "h2";
}, "isH2");
// src/submodules/sts/defaultRoleAssumers.ts
var import_STSClient2 = __nccwpck_require__(68974);
var getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => {
if (!customizations) return baseCtor;
else
return class CustomizableSTSClient extends baseCtor {
static {
__name(this, "CustomizableSTSClient");
}
constructor(config) {
super(config);
for (const customization of customizations) {
this.middlewareStack.use(customization);
}
}
};
}, "getCustomizableStsClientCtor");
var getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer");
var getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity");
var decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({
roleAssumer: getDefaultRoleAssumer2(input),
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),
...input
}), "decorateDefaultCredentialProvider");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 1798:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(88842));
const core_1 = __nccwpck_require__(59963);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const config_resolver_1 = __nccwpck_require__(53098);
const core_2 = __nccwpck_require__(55829);
const hash_node_1 = __nccwpck_require__(3081);
const middleware_retry_1 = __nccwpck_require__(96039);
const node_config_provider_1 = __nccwpck_require__(33461);
const node_http_handler_1 = __nccwpck_require__(20258);
const util_body_length_node_1 = __nccwpck_require__(68075);
const util_retry_1 = __nccwpck_require__(84902);
const runtimeConfig_shared_1 = __nccwpck_require__(75238);
const smithy_client_1 = __nccwpck_require__(63570);
const util_defaults_mode_node_1 = __nccwpck_require__(72429);
const smithy_client_2 = __nccwpck_require__(63570);
const getRuntimeConfig = (config) => {
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
const profileConfig = { profile: config?.profile };
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") ||
(async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
signer: new core_1.AwsSdkSigV4Signer(),
},
{
schemeId: "smithy.api#noAuth",
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
signer: new core_2.NoAuthSigner(),
},
],
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ??
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
(0, node_config_provider_1.loadConfig)({
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 75238:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const core_1 = __nccwpck_require__(59963);
const core_2 = __nccwpck_require__(55829);
const smithy_client_1 = __nccwpck_require__(63570);
const url_parser_1 = __nccwpck_require__(14681);
const util_base64_1 = __nccwpck_require__(75600);
const util_utf8_1 = __nccwpck_require__(41895);
const httpAuthSchemeProvider_1 = __nccwpck_require__(48013);
const endpointResolver_1 = __nccwpck_require__(47561);
const getRuntimeConfig = (config) => {
return {
apiVersion: "2011-06-15",
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new core_1.AwsSdkSigV4Signer(),
},
{
schemeId: "smithy.api#noAuth",
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
signer: new core_2.NoAuthSigner(),
},
],
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
serviceId: config?.serviceId ?? "STS",
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 30669:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveRuntimeExtensions = void 0;
const region_config_resolver_1 = __nccwpck_require__(18156);
const protocol_http_1 = __nccwpck_require__(64418);
const smithy_client_1 = __nccwpck_require__(63570);
const httpAuthExtensionConfiguration_1 = __nccwpck_require__(14935);
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
};
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
/***/ }),
/***/ 18156:
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,
NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,
REGION_ENV_NAME: () => REGION_ENV_NAME,
REGION_INI_NAME: () => REGION_INI_NAME,
getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration,
resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration,
resolveRegionConfig: () => resolveRegionConfig
});
module.exports = __toCommonJS(index_exports);
// src/extensions/index.ts
var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
return {
setRegion(region) {
runtimeConfig.region = region;
},
region() {
return runtimeConfig.region;
}
};
}, "getAwsRegionExtensionConfiguration");
var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => {
return {
region: awsRegionExtensionConfiguration.region()
};
}, "resolveAwsRegionExtensionConfiguration");
// src/regionConfig/config.ts
var REGION_ENV_NAME = "AWS_REGION";
var REGION_INI_NAME = "region";
var NODE_REGION_CONFIG_OPTIONS = {
environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], "environmentVariableSelector"),
configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"),
default: /* @__PURE__ */ __name(() => {
throw new Error("Region is missing");
}, "default")
};
var NODE_REGION_CONFIG_FILE_OPTIONS = {
preferredFile: "credentials"
};
// src/regionConfig/isFipsRegion.ts
var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion");
// src/regionConfig/getRealRegion.ts
var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion");
// src/regionConfig/resolveRegionConfig.ts
var resolveRegionConfig = /* @__PURE__ */ __name((input) => {
const { region, useFipsEndpoint } = input;
if (!region) {
throw new Error("Region is missing");
}
return Object.assign(input, {
region: /* @__PURE__ */ __name(async () => {
if (typeof region === "string") {
return getRealRegion(region);
}
const providedRegion = await region();
return getRealRegion(providedRegion);
}, "region"),
useFipsEndpoint: /* @__PURE__ */ __name(async () => {
const providedRegion = typeof region === "string" ? region : await region();
if (isFipsRegion(providedRegion)) {
return true;
}
return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
}, "useFipsEndpoint")
});
}, "resolveRegionConfig");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 51856:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
SignatureV4MultiRegion: () => SignatureV4MultiRegion,
signatureV4CrtContainer: () => signatureV4CrtContainer
});
module.exports = __toCommonJS(index_exports);
// src/SignatureV4MultiRegion.ts
var import_middleware_sdk_s3 = __nccwpck_require__(81139);
// src/signature-v4-crt-container.ts
var signatureV4CrtContainer = {
CrtSignerV4: null
};
// src/SignatureV4MultiRegion.ts
var SignatureV4MultiRegion = class {
static {
__name(this, "SignatureV4MultiRegion");
}
sigv4aSigner;
sigv4Signer;
signerOptions;
constructor(options) {
this.sigv4Signer = new import_middleware_sdk_s3.SignatureV4S3Express(options);
this.signerOptions = options;
}
async sign(requestToSign, options = {}) {
if (options.signingRegion === "*") {
if (this.signerOptions.runtime !== "node")
throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");
return this.getSigv4aSigner().sign(requestToSign, options);
}
return this.sigv4Signer.sign(requestToSign, options);
}
/**
* Sign with alternate credentials to the ones provided in the constructor.
*/
async signWithCredentials(requestToSign, credentials, options = {}) {
if (options.signingRegion === "*") {
if (this.signerOptions.runtime !== "node")
throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");
return this.getSigv4aSigner().signWithCredentials(requestToSign, credentials, options);
}
return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);
}
async presign(originalRequest, options = {}) {
if (options.signingRegion === "*") {
if (this.signerOptions.runtime !== "node")
throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");
return this.getSigv4aSigner().presign(originalRequest, options);
}
return this.sigv4Signer.presign(originalRequest, options);
}
async presignWithCredentials(originalRequest, credentials, options = {}) {
if (options.signingRegion === "*") {
throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");
}
return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);
}
getSigv4aSigner() {
if (!this.sigv4aSigner) {
let CrtSignerV4 = null;
try {
CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
if (typeof CrtSignerV4 !== "function") throw new Error();
} catch (e) {
e.message = `${e.message}
Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly.
You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";].
For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`;
throw e;
}
this.sigv4aSigner = new CrtSignerV4({
...this.signerOptions,
signingAlgorithm: 1
});
}
return this.sigv4aSigner;
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 52843:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
fromSso: () => fromSso,
fromStatic: () => fromStatic,
nodeProvider: () => nodeProvider
});
module.exports = __toCommonJS(index_exports);
// src/fromSso.ts
// src/constants.ts
var EXPIRE_WINDOW_MS = 5 * 60 * 1e3;
var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
// src/getSsoOidcClient.ts
var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion, init = {}) => {
const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(27334)));
const ssoOidcClient = new SSOOIDCClient(
Object.assign({}, init.clientConfig ?? {}, {
region: ssoRegion ?? init.clientConfig?.region,
logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger
})
);
return ssoOidcClient;
}, "getSsoOidcClient");
// src/getNewSsoOidcToken.ts
var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion, init = {}) => {
const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(27334)));
const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);
return ssoOidcClient.send(
new CreateTokenCommand({
clientId: ssoToken.clientId,
clientSecret: ssoToken.clientSecret,
refreshToken: ssoToken.refreshToken,
grantType: "refresh_token"
})
);
}, "getNewSsoOidcToken");
// src/validateTokenExpiry.ts
var import_property_provider = __nccwpck_require__(79721);
var validateTokenExpiry = /* @__PURE__ */ __name((token) => {
if (token.expiration && token.expiration.getTime() < Date.now()) {
throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
}
}, "validateTokenExpiry");
// src/validateTokenKey.ts
var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => {
if (typeof value === "undefined") {
throw new import_property_provider.TokenProviderError(
`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`,
false
);
}
}, "validateTokenKey");
// src/writeSSOTokenToFile.ts
var import_shared_ini_file_loader = __nccwpck_require__(43507);
var import_fs = __nccwpck_require__(57147);
var { writeFile } = import_fs.promises;
var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => {
const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id);
const tokenString = JSON.stringify(ssoToken, null, 2);
return writeFile(tokenFilepath, tokenString);
}, "writeSSOTokenToFile");
// src/fromSso.ts
var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
var fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => {
const init = {
..._init,
parentClientConfig: {
...callerClientConfig,
..._init.parentClientConfig
}
};
init.logger?.debug("@aws-sdk/token-providers - fromSso");
const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
const profileName = (0, import_shared_ini_file_loader.getProfileName)({
profile: init.profile ?? callerClientConfig?.profile
});
const profile = profiles[profileName];
if (!profile) {
throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
} else if (!profile["sso_session"]) {
throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
}
const ssoSessionName = profile["sso_session"];
const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);
const ssoSession = ssoSessions[ssoSessionName];
if (!ssoSession) {
throw new import_property_provider.TokenProviderError(
`Sso session '${ssoSessionName}' could not be found in shared credentials file.`,
false
);
}
for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
if (!ssoSession[ssoSessionRequiredKey]) {
throw new import_property_provider.TokenProviderError(
`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`,
false
);
}
}
const ssoStartUrl = ssoSession["sso_start_url"];
const ssoRegion = ssoSession["sso_region"];
let ssoToken;
try {
ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName);
} catch (e) {
throw new import_property_provider.TokenProviderError(
`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,
false
);
}
validateTokenKey("accessToken", ssoToken.accessToken);
validateTokenKey("expiresAt", ssoToken.expiresAt);
const { accessToken, expiresAt } = ssoToken;
const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
return existingToken;
}
if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
validateTokenExpiry(existingToken);
return existingToken;
}
validateTokenKey("clientId", ssoToken.clientId, true);
validateTokenKey("clientSecret", ssoToken.clientSecret, true);
validateTokenKey("refreshToken", ssoToken.refreshToken, true);
try {
lastRefreshAttemptTime.setTime(Date.now());
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
try {
await writeSSOTokenToFile(ssoSessionName, {
...ssoToken,
accessToken: newSsoOidcToken.accessToken,
expiresAt: newTokenExpiration.toISOString(),
refreshToken: newSsoOidcToken.refreshToken
});
} catch (error) {
}
return {
token: newSsoOidcToken.accessToken,
expiration: newTokenExpiration
};
} catch (error) {
validateTokenExpiry(existingToken);
return existingToken;
}
}, "fromSso");
// src/fromStatic.ts
var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => {
logger?.debug("@aws-sdk/token-providers - fromStatic");
if (!token || !token.token) {
throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
}
return token;
}, "fromStatic");
// src/nodeProvider.ts
var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(
(0, import_property_provider.chain)(fromSso(init), async () => {
throw new import_property_provider.TokenProviderError("Could not load token from any providers", false);
}),
(token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5,
(token) => token.expiration !== void 0
), "nodeProvider");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 85487:
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
build: () => build,
parse: () => parse,
validate: () => validate
});
module.exports = __toCommonJS(src_exports);
var validate = /* @__PURE__ */ __name((str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6, "validate");
var parse = /* @__PURE__ */ __name((arn) => {
const segments = arn.split(":");
if (segments.length < 6 || segments[0] !== "arn")
throw new Error("Malformed ARN");
const [
,
//Skip "arn" literal
partition,
service,
region,
accountId,
...resource
] = segments;
return {
partition,
service,
region,
accountId,
resource: resource.join(":")
};
}, "parse");
var build = /* @__PURE__ */ __name((arnObject) => {
const { partition = "aws", service, region, accountId, resource } = arnObject;
if ([service, region, accountId, resource].some((segment) => typeof segment !== "string")) {
throw new Error("Input ARN object is invalid");
}
return `arn:${partition}:${service}:${region}:${accountId}:${resource}`;
}, "build");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 13350:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
ConditionObject: () => import_util_endpoints.ConditionObject,
DeprecatedObject: () => import_util_endpoints.DeprecatedObject,
EndpointError: () => import_util_endpoints.EndpointError,
EndpointObject: () => import_util_endpoints.EndpointObject,
EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders,
EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties,
EndpointParams: () => import_util_endpoints.EndpointParams,
EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions,
EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject,
ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject,
EvaluateOptions: () => import_util_endpoints.EvaluateOptions,
Expression: () => import_util_endpoints.Expression,
FunctionArgv: () => import_util_endpoints.FunctionArgv,
FunctionObject: () => import_util_endpoints.FunctionObject,
FunctionReturn: () => import_util_endpoints.FunctionReturn,
ParameterObject: () => import_util_endpoints.ParameterObject,
ReferenceObject: () => import_util_endpoints.ReferenceObject,
ReferenceRecord: () => import_util_endpoints.ReferenceRecord,
RuleSetObject: () => import_util_endpoints.RuleSetObject,
RuleSetRules: () => import_util_endpoints.RuleSetRules,
TreeRuleObject: () => import_util_endpoints.TreeRuleObject,
awsEndpointFunctions: () => awsEndpointFunctions,
getUserAgentPrefix: () => getUserAgentPrefix,
isIpAddress: () => import_util_endpoints.isIpAddress,
partition: () => partition,
resolveEndpoint: () => import_util_endpoints.resolveEndpoint,
setPartitionInfo: () => setPartitionInfo,
useDefaultPartitionInfo: () => useDefaultPartitionInfo
});
module.exports = __toCommonJS(index_exports);
// src/aws.ts
// src/lib/aws/isVirtualHostableS3Bucket.ts
// src/lib/isIpAddress.ts
var import_util_endpoints = __nccwpck_require__(45473);
// src/lib/aws/isVirtualHostableS3Bucket.ts
var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => {
if (allowSubDomains) {
for (const label of value.split(".")) {
if (!isVirtualHostableS3Bucket(label)) {
return false;
}
}
return true;
}
if (!(0, import_util_endpoints.isValidHostLabel)(value)) {
return false;
}
if (value.length < 3 || value.length > 63) {
return false;
}
if (value !== value.toLowerCase()) {
return false;
}
if ((0, import_util_endpoints.isIpAddress)(value)) {
return false;
}
return true;
}, "isVirtualHostableS3Bucket");
// src/lib/aws/parseArn.ts
var ARN_DELIMITER = ":";
var RESOURCE_DELIMITER = "/";
var parseArn = /* @__PURE__ */ __name((value) => {
const segments = value.split(ARN_DELIMITER);
if (segments.length < 6) return null;
const [arn, partition2, service, region, accountId, ...resourcePath] = segments;
if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") return null;
const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();
return {
partition: partition2,
service,
region,
accountId,
resourceId
};
}, "parseArn");
// src/lib/aws/partitions.json
var partitions_default = {
partitions: [{
id: "aws",
outputs: {
dnsSuffix: "amazonaws.com",
dualStackDnsSuffix: "api.aws",
implicitGlobalRegion: "us-east-1",
name: "aws",
supportsDualStack: true,
supportsFIPS: true
},
regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
regions: {
"af-south-1": {
description: "Africa (Cape Town)"
},
"ap-east-1": {
description: "Asia Pacific (Hong Kong)"
},
"ap-northeast-1": {
description: "Asia Pacific (Tokyo)"
},
"ap-northeast-2": {
description: "Asia Pacific (Seoul)"
},
"ap-northeast-3": {
description: "Asia Pacific (Osaka)"
},
"ap-south-1": {
description: "Asia Pacific (Mumbai)"
},
"ap-south-2": {
description: "Asia Pacific (Hyderabad)"
},
"ap-southeast-1": {
description: "Asia Pacific (Singapore)"
},
"ap-southeast-2": {
description: "Asia Pacific (Sydney)"
},
"ap-southeast-3": {
description: "Asia Pacific (Jakarta)"
},
"ap-southeast-4": {
description: "Asia Pacific (Melbourne)"
},
"ap-southeast-5": {
description: "Asia Pacific (Malaysia)"
},
"ap-southeast-7": {
description: "Asia Pacific (Thailand)"
},
"aws-global": {
description: "AWS Standard global region"
},
"ca-central-1": {
description: "Canada (Central)"
},
"ca-west-1": {
description: "Canada West (Calgary)"
},
"eu-central-1": {
description: "Europe (Frankfurt)"
},
"eu-central-2": {
description: "Europe (Zurich)"
},
"eu-north-1": {
description: "Europe (Stockholm)"
},
"eu-south-1": {
description: "Europe (Milan)"
},
"eu-south-2": {
description: "Europe (Spain)"
},
"eu-west-1": {
description: "Europe (Ireland)"
},
"eu-west-2": {
description: "Europe (London)"
},
"eu-west-3": {
description: "Europe (Paris)"
},
"il-central-1": {
description: "Israel (Tel Aviv)"
},
"me-central-1": {
description: "Middle East (UAE)"
},
"me-south-1": {
description: "Middle East (Bahrain)"
},
"mx-central-1": {
description: "Mexico (Central)"
},
"sa-east-1": {
description: "South America (Sao Paulo)"
},
"us-east-1": {
description: "US East (N. Virginia)"
},
"us-east-2": {
description: "US East (Ohio)"
},
"us-west-1": {
description: "US West (N. California)"
},
"us-west-2": {
description: "US West (Oregon)"
}
}
}, {
id: "aws-cn",
outputs: {
dnsSuffix: "amazonaws.com.cn",
dualStackDnsSuffix: "api.amazonwebservices.com.cn",
implicitGlobalRegion: "cn-northwest-1",
name: "aws-cn",
supportsDualStack: true,
supportsFIPS: true
},
regionRegex: "^cn\\-\\w+\\-\\d+$",
regions: {
"aws-cn-global": {
description: "AWS China global region"
},
"cn-north-1": {
description: "China (Beijing)"
},
"cn-northwest-1": {
description: "China (Ningxia)"
}
}
}, {
id: "aws-us-gov",
outputs: {
dnsSuffix: "amazonaws.com",
dualStackDnsSuffix: "api.aws",
implicitGlobalRegion: "us-gov-west-1",
name: "aws-us-gov",
supportsDualStack: true,
supportsFIPS: true
},
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
regions: {
"aws-us-gov-global": {
description: "AWS GovCloud (US) global region"
},
"us-gov-east-1": {
description: "AWS GovCloud (US-East)"
},
"us-gov-west-1": {
description: "AWS GovCloud (US-West)"
}
}
}, {
id: "aws-iso",
outputs: {
dnsSuffix: "c2s.ic.gov",
dualStackDnsSuffix: "c2s.ic.gov",
implicitGlobalRegion: "us-iso-east-1",
name: "aws-iso",
supportsDualStack: false,
supportsFIPS: true
},
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
regions: {
"aws-iso-global": {
description: "AWS ISO (US) global region"
},
"us-iso-east-1": {
description: "US ISO East"
},
"us-iso-west-1": {
description: "US ISO WEST"
}
}
}, {
id: "aws-iso-b",
outputs: {
dnsSuffix: "sc2s.sgov.gov",
dualStackDnsSuffix: "sc2s.sgov.gov",
implicitGlobalRegion: "us-isob-east-1",
name: "aws-iso-b",
supportsDualStack: false,
supportsFIPS: true
},
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
regions: {
"aws-iso-b-global": {
description: "AWS ISOB (US) global region"
},
"us-isob-east-1": {
description: "US ISOB East (Ohio)"
}
}
}, {
id: "aws-iso-e",
outputs: {
dnsSuffix: "cloud.adc-e.uk",
dualStackDnsSuffix: "cloud.adc-e.uk",
implicitGlobalRegion: "eu-isoe-west-1",
name: "aws-iso-e",
supportsDualStack: false,
supportsFIPS: true
},
regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
regions: {
"eu-isoe-west-1": {
description: "EU ISOE West"
}
}
}, {
id: "aws-iso-f",
outputs: {
dnsSuffix: "csp.hci.ic.gov",
dualStackDnsSuffix: "csp.hci.ic.gov",
implicitGlobalRegion: "us-isof-south-1",
name: "aws-iso-f",
supportsDualStack: false,
supportsFIPS: true
},
regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
regions: {
"aws-iso-f-global": {
description: "AWS ISOF global region"
},
"us-isof-east-1": {
description: "US ISOF EAST"
},
"us-isof-south-1": {
description: "US ISOF SOUTH"
}
}
}],
version: "1.1"
};
// src/lib/aws/partition.ts
var selectedPartitionsInfo = partitions_default;
var selectedUserAgentPrefix = "";
var partition = /* @__PURE__ */ __name((value) => {
const { partitions } = selectedPartitionsInfo;
for (const partition2 of partitions) {
const { regions, outputs } = partition2;
for (const [region, regionData] of Object.entries(regions)) {
if (region === value) {
return {
...outputs,
...regionData
};
}
}
}
for (const partition2 of partitions) {
const { regionRegex, outputs } = partition2;
if (new RegExp(regionRegex).test(value)) {
return {
...outputs
};
}
}
const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws");
if (!DEFAULT_PARTITION) {
throw new Error(
"Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist."
);
}
return {
...DEFAULT_PARTITION.outputs
};
}, "partition");
var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => {
selectedPartitionsInfo = partitionsInfo;
selectedUserAgentPrefix = userAgentPrefix;
}, "setPartitionInfo");
var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => {
setPartitionInfo(partitions_default, "");
}, "useDefaultPartitionInfo");
var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix");
// src/aws.ts
var awsEndpointFunctions = {
isVirtualHostableS3Bucket,
parseArn,
partition
};
import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions;
// src/resolveEndpoint.ts
// src/types/EndpointError.ts
// src/types/EndpointRuleObject.ts
// src/types/ErrorRuleObject.ts
// src/types/RuleSetObject.ts
// src/types/TreeRuleObject.ts
// src/types/shared.ts
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 98095:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
NODE_APP_ID_CONFIG_OPTIONS: () => NODE_APP_ID_CONFIG_OPTIONS,
UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME,
UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME,
createDefaultUserAgentProvider: () => createDefaultUserAgentProvider,
crtAvailability: () => crtAvailability,
defaultUserAgent: () => defaultUserAgent
});
module.exports = __toCommonJS(index_exports);
// src/defaultUserAgent.ts
var import_os = __nccwpck_require__(22037);
var import_process = __nccwpck_require__(77282);
// src/crt-availability.ts
var crtAvailability = {
isCrtAvailable: false
};
// src/is-crt-available.ts
var isCrtAvailable = /* @__PURE__ */ __name(() => {
if (crtAvailability.isCrtAvailable) {
return ["md/crt-avail"];
}
return null;
}, "isCrtAvailable");
// src/defaultUserAgent.ts
var createDefaultUserAgentProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => {
return async (config) => {
const sections = [
// sdk-metadata
["aws-sdk-js", clientVersion],
// ua-metadata
["ua", "2.1"],
// os-metadata
[`os/${(0, import_os.platform)()}`, (0, import_os.release)()],
// language-metadata
// ECMAScript edition doesn't matter in JS, so no version needed.
["lang/js"],
["md/nodejs", `${import_process.versions.node}`]
];
const crtAvailable = isCrtAvailable();
if (crtAvailable) {
sections.push(crtAvailable);
}
if (serviceId) {
sections.push([`api/${serviceId}`, clientVersion]);
}
if (import_process.env.AWS_EXECUTION_ENV) {
sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]);
}
const appId = await config?.userAgentAppId?.();
const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
return resolvedUserAgent;
};
}, "createDefaultUserAgentProvider");
var defaultUserAgent = createDefaultUserAgentProvider;
// src/nodeAppIdConfigOptions.ts
var import_middleware_user_agent = __nccwpck_require__(64688);
var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
var UA_APP_ID_INI_NAME = "sdk_ua_app_id";
var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
var NODE_APP_ID_CONFIG_OPTIONS = {
environmentVariableSelector: /* @__PURE__ */ __name((env2) => env2[UA_APP_ID_ENV_NAME], "environmentVariableSelector"),
configFileSelector: /* @__PURE__ */ __name((profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], "configFileSelector"),
default: import_middleware_user_agent.DEFAULT_UA_APP_ID
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 42329:
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
XmlNode: () => XmlNode,
XmlText: () => XmlText
});
module.exports = __toCommonJS(index_exports);
// src/escape-attribute.ts
function escapeAttribute(value) {
return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """);
}
__name(escapeAttribute, "escapeAttribute");
// src/escape-element.ts
function escapeElement(value) {
return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, "
").replace(/\n/g, "
").replace(/\u0085/g, "
").replace(/\u2028/, "
");
}
__name(escapeElement, "escapeElement");
// src/XmlText.ts
var XmlText = class {
constructor(value) {
this.value = value;
}
static {
__name(this, "XmlText");
}
toString() {
return escapeElement("" + this.value);
}
};
// src/XmlNode.ts
var XmlNode = class _XmlNode {
constructor(name, children = []) {
this.name = name;
this.children = children;
}
static {
__name(this, "XmlNode");
}
attributes = {};
static of(name, childText, withName) {
const node = new _XmlNode(name);
if (childText !== void 0) {
node.addChildNode(new XmlText(childText));
}
if (withName !== void 0) {
node.withName(withName);
}
return node;
}
withName(name) {
this.name = name;
return this;
}
addAttribute(name, value) {
this.attributes[name] = value;
return this;
}
addChildNode(child) {
this.children.push(child);
return this;
}
removeAttribute(name) {
delete this.attributes[name];
return this;
}
/**
* @internal
* Alias of {@link XmlNode#withName(string)} for codegen brevity.
*/
n(name) {
this.name = name;
return this;
}
/**
* @internal
* Alias of {@link XmlNode#addChildNode(string)} for codegen brevity.
*/
c(child) {
this.children.push(child);
return this;
}
/**
* @internal
* Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity.
*/
a(name, value) {
if (value != null) {
this.attributes[name] = value;
}
return this;
}
/**
* Create a child node.
* Used in serialization of string fields.
* @internal
*/
cc(input, field, withName = field) {
if (input[field] != null) {
const node = _XmlNode.of(field, input[field]).withName(withName);
this.c(node);
}
}
/**
* Creates list child nodes.
* @internal
*/
l(input, listName, memberName, valueProvider) {
if (input[listName] != null) {
const nodes = valueProvider();
nodes.map((node) => {
node.withName(memberName);
this.c(node);
});
}
}
/**
* Creates list child nodes with container.
* @internal
*/
lc(input, listName, memberName, valueProvider) {
if (input[listName] != null) {
const nodes = valueProvider();
const containerNode = new _XmlNode(memberName);
nodes.map((node) => {
containerNode.c(node);
});
this.c(containerNode);
}
}
toString() {
const hasChildren = Boolean(this.children.length);
let xmlText = `<${this.name}`;
const attributes = this.attributes;
for (const attributeName of Object.keys(attributes)) {
const attribute = attributes[attributeName];
if (attribute != null) {
xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`;
}
}
return xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}${this.name}>`;
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
/***/ }),
/***/ 84100:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
var coreRestPipeline = __nccwpck_require__(29146);
var tslib = __nccwpck_require__(4351);
var coreAuth = __nccwpck_require__(98834);
var coreUtil = __nccwpck_require__(80637);
var coreHttpCompat = __nccwpck_require__(32859);
var coreClient = __nccwpck_require__(7611);
var coreXml = __nccwpck_require__(17309);
var logger$1 = __nccwpck_require__(89497);
var abortController = __nccwpck_require__(60583);
var crypto = __nccwpck_require__(6113);
var coreTracing = __nccwpck_require__(19363);
var stream = __nccwpck_require__(12781);
var coreLro = __nccwpck_require__(90334);
var events = __nccwpck_require__(82361);
var fs = __nccwpck_require__(57147);
var util = __nccwpck_require__(73837);
var buffer = __nccwpck_require__(14300);
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var coreHttpCompat__namespace = /*#__PURE__*/_interopNamespaceDefault(coreHttpCompat);
var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
var util__namespace = /*#__PURE__*/_interopNamespaceDefault(util);
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* The `@azure/logger` configuration for this package.
*/
const logger = logger$1.createClientLogger("storage-blob");
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* The base class from which all request policies derive.
*/
class BaseRequestPolicy {
/**
* The main method to implement that manipulates a request/response.
*/
constructor(
/**
* The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline.
*/
_nextPolicy,
/**
* The options that can be passed to a given request policy.
*/
_options) {
this._nextPolicy = _nextPolicy;
this._options = _options;
}
/**
* Get whether or not a log with the provided log level should be logged.
* @param logLevel - The log level of the log that will be logged.
* @returns Whether or not a log with the provided log level should be logged.
*/
shouldLog(logLevel) {
return this._options.shouldLog(logLevel);
}
/**
* Attempt to log the provided message to the provided logger. If no logger was provided or if
* the log level does not meat the logger's threshold, then nothing will be logged.
* @param logLevel - The log level of this log.
* @param message - The message of this log.
*/
log(logLevel, message) {
this._options.log(logLevel, message);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const SDK_VERSION = "12.27.0";
const SERVICE_VERSION = "2025-05-05";
const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
const BLOCK_BLOB_MAX_BLOCKS = 50000;
const DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB
const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB
const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5;
const REQUEST_TIMEOUT = 100 * 1000; // In ms
/**
* The OAuth scope to use with Azure Storage.
*/
const StorageOAuthScopes = "https://storage.azure.com/.default";
const URLConstants = {
Parameters: {
FORCE_BROWSER_NO_CACHE: "_",
SNAPSHOT: "snapshot",
VERSIONID: "versionid",
TIMEOUT: "timeout",
},
};
const HTTPURLConnection = {
HTTP_ACCEPTED: 202};
const HeaderConstants = {
AUTHORIZATION: "Authorization",
CONTENT_ENCODING: "Content-Encoding",
CONTENT_ID: "Content-ID",
CONTENT_LANGUAGE: "Content-Language",
CONTENT_LENGTH: "Content-Length",
CONTENT_MD5: "Content-Md5",
CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding",
CONTENT_TYPE: "Content-Type",
COOKIE: "Cookie",
DATE: "date",
IF_MATCH: "if-match",
IF_MODIFIED_SINCE: "if-modified-since",
IF_NONE_MATCH: "if-none-match",
IF_UNMODIFIED_SINCE: "if-unmodified-since",
PREFIX_FOR_STORAGE: "x-ms-",
RANGE: "Range",
X_MS_DATE: "x-ms-date",
X_MS_ERROR_CODE: "x-ms-error-code",
X_MS_VERSION: "x-ms-version"};
const ETagNone = "";
const ETagAny = "*";
const SIZE_1_MB = 1 * 1024 * 1024;
const BATCH_MAX_REQUEST = 256;
const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB;
const HTTP_LINE_ENDING = "\r\n";
const HTTP_VERSION_1_1 = "HTTP/1.1";
const EncryptionAlgorithmAES25 = "AES256";
const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;
const StorageBlobLoggingAllowedHeaderNames = [
"Access-Control-Allow-Origin",
"Cache-Control",
"Content-Length",
"Content-Type",
"Date",
"Request-Id",
"traceparent",
"Transfer-Encoding",
"User-Agent",
"x-ms-client-request-id",
"x-ms-date",
"x-ms-error-code",
"x-ms-request-id",
"x-ms-return-client-request-id",
"x-ms-version",
"Accept-Ranges",
"Content-Disposition",
"Content-Encoding",
"Content-Language",
"Content-MD5",
"Content-Range",
"ETag",
"Last-Modified",
"Server",
"Vary",
"x-ms-content-crc64",
"x-ms-copy-action",
"x-ms-copy-completion-time",
"x-ms-copy-id",
"x-ms-copy-progress",
"x-ms-copy-status",
"x-ms-has-immutability-policy",
"x-ms-has-legal-hold",
"x-ms-lease-state",
"x-ms-lease-status",
"x-ms-range",
"x-ms-request-server-encrypted",
"x-ms-server-encrypted",
"x-ms-snapshot",
"x-ms-source-range",
"If-Match",
"If-Modified-Since",
"If-None-Match",
"If-Unmodified-Since",
"x-ms-access-tier",
"x-ms-access-tier-change-time",
"x-ms-access-tier-inferred",
"x-ms-account-kind",
"x-ms-archive-status",
"x-ms-blob-append-offset",
"x-ms-blob-cache-control",
"x-ms-blob-committed-block-count",
"x-ms-blob-condition-appendpos",
"x-ms-blob-condition-maxsize",
"x-ms-blob-content-disposition",
"x-ms-blob-content-encoding",
"x-ms-blob-content-language",
"x-ms-blob-content-length",
"x-ms-blob-content-md5",
"x-ms-blob-content-type",
"x-ms-blob-public-access",
"x-ms-blob-sequence-number",
"x-ms-blob-type",
"x-ms-copy-destination-snapshot",
"x-ms-creation-time",
"x-ms-default-encryption-scope",
"x-ms-delete-snapshots",
"x-ms-delete-type-permanent",
"x-ms-deny-encryption-scope-override",
"x-ms-encryption-algorithm",
"x-ms-if-sequence-number-eq",
"x-ms-if-sequence-number-le",
"x-ms-if-sequence-number-lt",
"x-ms-incremental-copy",
"x-ms-lease-action",
"x-ms-lease-break-period",
"x-ms-lease-duration",
"x-ms-lease-id",
"x-ms-lease-time",
"x-ms-page-write",
"x-ms-proposed-lease-id",
"x-ms-range-get-content-md5",
"x-ms-rehydrate-priority",
"x-ms-sequence-number-action",
"x-ms-sku-name",
"x-ms-source-content-md5",
"x-ms-source-if-match",
"x-ms-source-if-modified-since",
"x-ms-source-if-none-match",
"x-ms-source-if-unmodified-since",
"x-ms-tag-count",
"x-ms-encryption-key-sha256",
"x-ms-copy-source-error-code",
"x-ms-copy-source-status-code",
"x-ms-if-tags",
"x-ms-source-if-tags",
];
const StorageBlobLoggingAllowedQueryParameters = [
"comp",
"maxresults",
"rscc",
"rscd",
"rsce",
"rscl",
"rsct",
"se",
"si",
"sip",
"sp",
"spr",
"sr",
"srt",
"ss",
"st",
"sv",
"include",
"marker",
"prefix",
"copyid",
"restype",
"blockid",
"blocklisttype",
"delimiter",
"prevsnapshot",
"ske",
"skoid",
"sks",
"skt",
"sktid",
"skv",
"snapshot",
];
const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption";
const BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption";
/// List of ports used for path style addressing.
/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.
const PathStylePorts = [
"10000",
"10001",
"10002",
"10003",
"10004",
"10100",
"10101",
"10102",
"10103",
"10104",
"11000",
"11001",
"11002",
"11003",
"11004",
"11100",
"11101",
"11102",
"11103",
"11104",
];
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Reserved URL characters must be properly escaped for Storage services like Blob or File.
*
* ## URL encode and escape strategy for JS SDKs
*
* When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not.
* But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL
* string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors.
*
* ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.
*
* This is what legacy V2 SDK does, simple and works for most of the cases.
* - When customer URL string is "http://account.blob.core.windows.net/con/b:",
* SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created.
* - When customer URL string is "http://account.blob.core.windows.net/con/b%3A",
* SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created.
*
* But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is
* "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name.
* If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created.
* V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.
* We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two:
*
* ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.
*
* This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.
* - When customer URL string is "http://account.blob.core.windows.net/con/b:",
* SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created.
* - When customer URL string is "http://account.blob.core.windows.net/con/b%3A",
* There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created.
* - When customer URL string is "http://account.blob.core.windows.net/con/b%253A",
* There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created.
*
* This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string
* is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL.
* If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample.
* And following URL strings are invalid:
* - "http://account.blob.core.windows.net/con/b%"
* - "http://account.blob.core.windows.net/con/b%2"
* - "http://account.blob.core.windows.net/con/b%G"
*
* Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string.
*
* ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)`
*
* We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata
*
* @param url -
*/
function escapeURLPath(url) {
const urlParsed = new URL(url);
let path = urlParsed.pathname;
path = path || "/";
path = escape(path);
urlParsed.pathname = path;
return urlParsed.toString();
}
function getProxyUriFromDevConnString(connectionString) {
// Development Connection String
// https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key
let proxyUri = "";
if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) {
// CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri
const matchCredentials = connectionString.split(";");
for (const element of matchCredentials) {
if (element.trim().startsWith("DevelopmentStorageProxyUri=")) {
proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1];
}
}
}
return proxyUri;
}
function getValueInConnString(connectionString, argument) {
const elements = connectionString.split(";");
for (const element of elements) {
if (element.trim().startsWith(argument)) {
return element.trim().match(argument + "=(.*)")[1];
}
}
return "";
}
/**
* Extracts the parts of an Azure Storage account connection string.
*
* @param connectionString - Connection string.
* @returns String key value pairs of the storage account's url and credentials.
*/
function extractConnectionStringParts(connectionString) {
let proxyUri = "";
if (connectionString.startsWith("UseDevelopmentStorage=true")) {
// Development connection string
proxyUri = getProxyUriFromDevConnString(connectionString);
connectionString = DevelopmentConnectionString;
}
// Matching BlobEndpoint in the Account connection string
let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint");
// Slicing off '/' at the end if exists
// (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)
blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint;
if (connectionString.search("DefaultEndpointsProtocol=") !== -1 &&
connectionString.search("AccountKey=") !== -1) {
// Account connection string
let defaultEndpointsProtocol = "";
let accountName = "";
let accountKey = Buffer.from("accountKey", "base64");
let endpointSuffix = "";
// Get account name and key
accountName = getValueInConnString(connectionString, "AccountName");
accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64");
if (!blobEndpoint) {
// BlobEndpoint is not present in the Account connection string
// Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`
defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol");
const protocol = defaultEndpointsProtocol.toLowerCase();
if (protocol !== "https" && protocol !== "http") {
throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");
}
endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix");
if (!endpointSuffix) {
throw new Error("Invalid EndpointSuffix in the provided Connection String");
}
blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;
}
if (!accountName) {
throw new Error("Invalid AccountName in the provided Connection String");
}
else if (accountKey.length === 0) {
throw new Error("Invalid AccountKey in the provided Connection String");
}
return {
kind: "AccountConnString",
url: blobEndpoint,
accountName,
accountKey,
proxyUri,
};
}
else {
// SAS connection string
let accountSas = getValueInConnString(connectionString, "SharedAccessSignature");
let accountName = getValueInConnString(connectionString, "AccountName");
// if accountName is empty, try to read it from BlobEndpoint
if (!accountName) {
accountName = getAccountNameFromUrl(blobEndpoint);
}
if (!blobEndpoint) {
throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");
}
else if (!accountSas) {
throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String");
}
// client constructors assume accountSas does *not* start with ?
if (accountSas.startsWith("?")) {
accountSas = accountSas.substring(1);
}
return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas };
}
}
/**
* Internal escape method implemented Strategy Two mentioned in escapeURL() description.
*
* @param text -
*/
function escape(text) {
return encodeURIComponent(text)
.replace(/%2F/g, "/") // Don't escape for "/"
.replace(/'/g, "%27") // Escape for "'"
.replace(/\+/g, "%20")
.replace(/%25/g, "%"); // Revert encoded "%"
}
/**
* Append a string to URL path. Will remove duplicated "/" in front of the string
* when URL path ends with a "/".
*
* @param url - Source URL string
* @param name - String to be appended to URL
* @returns An updated URL string
*/
function appendToURLPath(url, name) {
const urlParsed = new URL(url);
let path = urlParsed.pathname;
path = path ? (path.endsWith("/") ? `${path}${name}` : `${path}/${name}`) : name;
urlParsed.pathname = path;
return urlParsed.toString();
}
/**
* Set URL parameter name and value. If name exists in URL parameters, old value
* will be replaced by name key. If not provide value, the parameter will be deleted.
*
* @param url - Source URL string
* @param name - Parameter name
* @param value - Parameter value
* @returns An updated URL string
*/
function setURLParameter(url, name, value) {
const urlParsed = new URL(url);
const encodedName = encodeURIComponent(name);
const encodedValue = value ? encodeURIComponent(value) : undefined;
// mutating searchParams will change the encoding, so we have to do this ourselves
const searchString = urlParsed.search === "" ? "?" : urlParsed.search;
const searchPieces = [];
for (const pair of searchString.slice(1).split("&")) {
if (pair) {
const [key] = pair.split("=", 2);
if (key !== encodedName) {
searchPieces.push(pair);
}
}
}
if (encodedValue) {
searchPieces.push(`${encodedName}=${encodedValue}`);
}
urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : "";
return urlParsed.toString();
}
/**
* Get URL parameter by name.
*
* @param url -
* @param name -
*/
function getURLParameter(url, name) {
var _a;
const urlParsed = new URL(url);
return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : undefined;
}
/**
* Set URL host.
*
* @param url - Source URL string
* @param host - New host string
* @returns An updated URL string
*/
function setURLHost(url, host) {
const urlParsed = new URL(url);
urlParsed.hostname = host;
return urlParsed.toString();
}
/**
* Get URL path from an URL string.
*
* @param url - Source URL string
*/
function getURLPath(url) {
try {
const urlParsed = new URL(url);
return urlParsed.pathname;
}
catch (e) {
return undefined;
}
}
/**
* Get URL scheme from an URL string.
*
* @param url - Source URL string
*/
function getURLScheme(url) {
try {
const urlParsed = new URL(url);
return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol;
}
catch (e) {
return undefined;
}
}
/**
* Get URL path and query from an URL string.
*
* @param url - Source URL string
*/
function getURLPathAndQuery(url) {
const urlParsed = new URL(url);
const pathString = urlParsed.pathname;
if (!pathString) {
throw new RangeError("Invalid url without valid path.");
}
let queryString = urlParsed.search || "";
queryString = queryString.trim();
if (queryString !== "") {
queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; // Ensure query string start with '?'
}
return `${pathString}${queryString}`;
}
/**
* Get URL query key value pairs from an URL string.
*
* @param url -
*/
function getURLQueries(url) {
let queryString = new URL(url).search;
if (!queryString) {
return {};
}
queryString = queryString.trim();
queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString;
let querySubStrings = queryString.split("&");
querySubStrings = querySubStrings.filter((value) => {
const indexOfEqual = value.indexOf("=");
const lastIndexOfEqual = value.lastIndexOf("=");
return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1);
});
const queries = {};
for (const querySubString of querySubStrings) {
const splitResults = querySubString.split("=");
const key = splitResults[0];
const value = splitResults[1];
queries[key] = value;
}
return queries;
}
/**
* Append a string to URL query.
*
* @param url - Source URL string.
* @param queryParts - String to be appended to the URL query.
* @returns An updated URL string.
*/
function appendToURLQuery(url, queryParts) {
const urlParsed = new URL(url);
let query = urlParsed.search;
if (query) {
query += "&" + queryParts;
}
else {
query = queryParts;
}
urlParsed.search = query;
return urlParsed.toString();
}
/**
* Rounds a date off to seconds.
*
* @param date -
* @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;
* If false, YYYY-MM-DDThh:mm:ssZ will be returned.
* @returns Date string in ISO8061 format, with or without 7 milliseconds component
*/
function truncatedISO8061Date(date, withMilliseconds = true) {
// Date.toISOString() will return like "2018-10-29T06:34:36.139Z"
const dateString = date.toISOString();
return withMilliseconds
? dateString.substring(0, dateString.length - 1) + "0000" + "Z"
: dateString.substring(0, dateString.length - 5) + "Z";
}
/**
* Base64 encode.
*
* @param content -
*/
function base64encode(content) {
return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64");
}
/**
* Generate a 64 bytes base64 block ID string.
*
* @param blockIndex -
*/
function generateBlockID(blockIDPrefix, blockIndex) {
// To generate a 64 bytes base64 string, source string should be 48
const maxSourceStringLength = 48;
// A blob can have a maximum of 100,000 uncommitted blocks at any given time
const maxBlockIndexLength = 6;
const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;
if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {
blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);
}
const res = blockIDPrefix +
padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0");
return base64encode(res);
}
/**
* Delay specified time interval.
*
* @param timeInMs -
* @param aborter -
* @param abortError -
*/
async function delay(timeInMs, aborter, abortError) {
return new Promise((resolve, reject) => {
/* eslint-disable-next-line prefer-const */
let timeout;
const abortHandler = () => {
if (timeout !== undefined) {
clearTimeout(timeout);
}
reject(abortError);
};
const resolveHandler = () => {
if (aborter !== undefined) {
aborter.removeEventListener("abort", abortHandler);
}
resolve();
};
timeout = setTimeout(resolveHandler, timeInMs);
if (aborter !== undefined) {
aborter.addEventListener("abort", abortHandler);
}
});
}
/**
* String.prototype.padStart()
*
* @param currentString -
* @param targetLength -
* @param padString -
*/
function padStart(currentString, targetLength, padString = " ") {
// @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes
if (String.prototype.padStart) {
return currentString.padStart(targetLength, padString);
}
padString = padString || " ";
if (currentString.length > targetLength) {
return currentString;
}
else {
targetLength = targetLength - currentString.length;
if (targetLength > padString.length) {
padString += padString.repeat(targetLength / padString.length);
}
return padString.slice(0, targetLength) + currentString;
}
}
/**
* If two strings are equal when compared case insensitive.
*
* @param str1 -
* @param str2 -
*/
function iEqual(str1, str2) {
return str1.toLocaleLowerCase() === str2.toLocaleLowerCase();
}
/**
* Extracts account name from the url
* @param url - url to extract the account name from
* @returns with the account name
*/
function getAccountNameFromUrl(url) {
const parsedUrl = new URL(url);
let accountName;
try {
if (parsedUrl.hostname.split(".")[1] === "blob") {
// `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;
accountName = parsedUrl.hostname.split(".")[0];
}
else if (isIpEndpointStyle(parsedUrl)) {
// IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/
// Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/
// .getPath() -> /devstoreaccount1/
accountName = parsedUrl.pathname.split("/")[1];
}
else {
// Custom domain case: "https://customdomain.com/containername/blob".
accountName = "";
}
return accountName;
}
catch (error) {
throw new Error("Unable to extract accountName with provided information.");
}
}
function isIpEndpointStyle(parsedUrl) {
const host = parsedUrl.host;
// Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.
// Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part.
// Case 3: Ipv4, use broad regex which just check if host contains Ipv4.
// For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.
return (/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) ||
(Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port)));
}
/**
* Convert Tags to encoded string.
*
* @param tags -
*/
function toBlobTagsString(tags) {
if (tags === undefined) {
return undefined;
}
const tagPairs = [];
for (const key in tags) {
if (Object.prototype.hasOwnProperty.call(tags, key)) {
const value = tags[key];
tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
}
}
return tagPairs.join("&");
}
/**
* Convert Tags type to BlobTags.
*
* @param tags -
*/
function toBlobTags(tags) {
if (tags === undefined) {
return undefined;
}
const res = {
blobTagSet: [],
};
for (const key in tags) {
if (Object.prototype.hasOwnProperty.call(tags, key)) {
const value = tags[key];
res.blobTagSet.push({
key,
value,
});
}
}
return res;
}
/**
* Covert BlobTags to Tags type.
*
* @param tags -
*/
function toTags(tags) {
if (tags === undefined) {
return undefined;
}
const res = {};
for (const blobTag of tags.blobTagSet) {
res[blobTag.key] = blobTag.value;
}
return res;
}
/**
* Convert BlobQueryTextConfiguration to QuerySerialization type.
*
* @param textConfiguration -
*/
function toQuerySerialization(textConfiguration) {
if (textConfiguration === undefined) {
return undefined;
}
switch (textConfiguration.kind) {
case "csv":
return {
format: {
type: "delimited",
delimitedTextConfiguration: {
columnSeparator: textConfiguration.columnSeparator || ",",
fieldQuote: textConfiguration.fieldQuote || "",
recordSeparator: textConfiguration.recordSeparator,
escapeChar: textConfiguration.escapeCharacter || "",
headersPresent: textConfiguration.hasHeaders || false,
},
},
};
case "json":
return {
format: {
type: "json",
jsonTextConfiguration: {
recordSeparator: textConfiguration.recordSeparator,
},
},
};
case "arrow":
return {
format: {
type: "arrow",
arrowConfiguration: {
schema: textConfiguration.schema,
},
},
};
case "parquet":
return {
format: {
type: "parquet",
},
};
default:
throw Error("Invalid BlobQueryTextConfiguration.");
}
}
function parseObjectReplicationRecord(objectReplicationRecord) {
if (!objectReplicationRecord) {
return undefined;
}
if ("policy-id" in objectReplicationRecord) {
// If the dictionary contains a key with policy id, we are not required to do any parsing since
// the policy id should already be stored in the ObjectReplicationDestinationPolicyId.
return undefined;
}
const orProperties = [];
for (const key in objectReplicationRecord) {
const ids = key.split("_");
const policyPrefix = "or-";
if (ids[0].startsWith(policyPrefix)) {
ids[0] = ids[0].substring(policyPrefix.length);
}
const rule = {
ruleId: ids[1],
replicationStatus: objectReplicationRecord[key],
};
const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
if (policyIndex > -1) {
orProperties[policyIndex].rules.push(rule);
}
else {
orProperties.push({
policyId: ids[0],
rules: [rule],
});
}
}
return orProperties;
}
function httpAuthorizationToString(httpAuthorization) {
return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined;
}
function BlobNameToString(name) {
if (name.encoded) {
return decodeURIComponent(name.content);
}
else {
return name.content;
}
}
function ConvertInternalResponseOfListBlobFlat(internalResponse) {
return Object.assign(Object.assign({}, internalResponse), { segment: {
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
return blobItem;
}),
} });
}
function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
var _a;
return Object.assign(Object.assign({}, internalResponse), { segment: {
blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) });
return blobPrefix;
}),
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
return blobItem;
}),
} });
}
function* ExtractPageRangeInfoItems(getPageRangesSegment) {
let pageRange = [];
let clearRange = [];
if (getPageRangesSegment.pageRange)
pageRange = getPageRangesSegment.pageRange;
if (getPageRangesSegment.clearRange)
clearRange = getPageRangesSegment.clearRange;
let pageRangeIndex = 0;
let clearRangeIndex = 0;
while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) {
if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) {
yield {
start: pageRange[pageRangeIndex].start,
end: pageRange[pageRangeIndex].end,
isClear: false,
};
++pageRangeIndex;
}
else {
yield {
start: clearRange[clearRangeIndex].start,
end: clearRange[clearRangeIndex].end,
isClear: true,
};
++clearRangeIndex;
}
}
for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) {
yield {
start: pageRange[pageRangeIndex].start,
end: pageRange[pageRangeIndex].end,
isClear: false,
};
}
for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) {
yield {
start: clearRange[clearRangeIndex].start,
end: clearRange[clearRangeIndex].end,
isClear: true,
};
}
}
/**
* Escape the blobName but keep path separator ('/').
*/
function EscapePath(blobName) {
const split = blobName.split("/");
for (let i = 0; i < split.length; i++) {
split[i] = encodeURIComponent(split[i]);
}
return split.join("/");
}
/**
* A typesafe helper for ensuring that a given response object has
* the original _response attached.
* @param response - A response object from calling a client operation
* @returns The same object, but with known _response property
*/
function assertResponse(response) {
if (`_response` in response) {
return response;
}
throw new TypeError(`Unexpected response object ${response}`);
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* RetryPolicy types.
*/
exports.StorageRetryPolicyType = void 0;
(function (StorageRetryPolicyType) {
/**
* Exponential retry. Retry time delay grows exponentially.
*/
StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL";
/**
* Linear retry. Retry time delay grows linearly.
*/
StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED";
})(exports.StorageRetryPolicyType || (exports.StorageRetryPolicyType = {}));
// Default values of StorageRetryOptions
const DEFAULT_RETRY_OPTIONS$1 = {
maxRetryDelayInMs: 120 * 1000,
maxTries: 4,
retryDelayInMs: 4 * 1000,
retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
secondaryHost: "",
tryTimeoutInMs: undefined, // Use server side default timeout strategy
};
const RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted.");
/**
* Retry policy with exponential retry and linear retry implemented.
*/
class StorageRetryPolicy extends BaseRequestPolicy {
/**
* Creates an instance of RetryPolicy.
*
* @param nextPolicy -
* @param options -
* @param retryOptions -
*/
constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) {
super(nextPolicy, options);
// Initialize retry options
this.retryOptions = {
retryPolicyType: retryOptions.retryPolicyType
? retryOptions.retryPolicyType
: DEFAULT_RETRY_OPTIONS$1.retryPolicyType,
maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1
? Math.floor(retryOptions.maxTries)
: DEFAULT_RETRY_OPTIONS$1.maxTries,
tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0
? retryOptions.tryTimeoutInMs
: DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs,
retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0
? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs
? retryOptions.maxRetryDelayInMs
: DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs)
: DEFAULT_RETRY_OPTIONS$1.retryDelayInMs,
maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0
? retryOptions.maxRetryDelayInMs
: DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs,
secondaryHost: retryOptions.secondaryHost
? retryOptions.secondaryHost
: DEFAULT_RETRY_OPTIONS$1.secondaryHost,
};
}
/**
* Sends request.
*
* @param request -
*/
async sendRequest(request) {
return this.attemptSendRequest(request, false, 1);
}
/**
* Decide and perform next retry. Won't mutate request parameter.
*
* @param request -
* @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then
* the resource was not found. This may be due to replication delay. So, in this
* case, we'll never try the secondary again for this operation.
* @param attempt - How many retries has been attempted to performed, starting from 1, which includes
* the attempt will be performed by this method call.
*/
async attemptSendRequest(request, secondaryHas404, attempt) {
const newRequest = request.clone();
const isPrimaryRetry = secondaryHas404 ||
!this.retryOptions.secondaryHost ||
!(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") ||
attempt % 2 === 1;
if (!isPrimaryRetry) {
newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost);
}
// Set the server-side timeout query parameter "timeout=[seconds]"
if (this.retryOptions.tryTimeoutInMs) {
newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString());
}
let response;
try {
logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`);
response = await this._nextPolicy.sendRequest(newRequest);
if (!this.shouldRetry(isPrimaryRetry, attempt, response)) {
return response;
}
secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404);
}
catch (err) {
logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`);
if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) {
throw err;
}
}
await this.delay(isPrimaryRetry, attempt, request.abortSignal);
return this.attemptSendRequest(request, secondaryHas404, ++attempt);
}
/**
* Decide whether to retry according to last HTTP response and retry counters.
*
* @param isPrimaryRetry -
* @param attempt -
* @param response -
* @param err -
*/
shouldRetry(isPrimaryRetry, attempt, response, err) {
if (attempt >= this.retryOptions.maxTries) {
logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions
.maxTries}, no further try.`);
return false;
}
// Handle network failures, you may need to customize the list when you implement
// your own http client
const retriableErrors = [
"ETIMEDOUT",
"ESOCKETTIMEDOUT",
"ECONNREFUSED",
"ECONNRESET",
"ENOENT",
"ENOTFOUND",
"TIMEOUT",
"EPIPE",
"REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js
];
if (err) {
for (const retriableError of retriableErrors) {
if (err.name.toUpperCase().includes(retriableError) ||
err.message.toUpperCase().includes(retriableError) ||
(err.code && err.code.toString().toUpperCase() === retriableError)) {
logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`);
return true;
}
}
}
// If attempt was against the secondary & it returned a StatusNotFound (404), then
// the resource was not found. This may be due to replication delay. So, in this
// case, we'll never try the secondary again for this operation.
if (response || err) {
const statusCode = response ? response.status : err ? err.statusCode : 0;
if (!isPrimaryRetry && statusCode === 404) {
logger.info(`RetryPolicy: Secondary access with 404, will retry.`);
return true;
}
// Server internal error or server timeout
if (statusCode === 503 || statusCode === 500) {
logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);
return true;
}
}
// [Copy source error code] Feature is pending on service side, skip retry on copy source error for now.
// if (response) {
// // Retry select Copy Source Error Codes.
// if (response?.status >= 400) {
// const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode);
// if (copySourceError !== undefined) {
// switch (copySourceError) {
// case "InternalError":
// case "OperationTimedOut":
// case "ServerBusy":
// return true;
// }
// }
// }
// }
if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) {
logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry.");
return true;
}
return false;
}
/**
* Delay a calculated time between retries.
*
* @param isPrimaryRetry -
* @param attempt -
* @param abortSignal -
*/
async delay(isPrimaryRetry, attempt, abortSignal) {
let delayTimeInMs = 0;
if (isPrimaryRetry) {
switch (this.retryOptions.retryPolicyType) {
case exports.StorageRetryPolicyType.EXPONENTIAL:
delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs);
break;
case exports.StorageRetryPolicyType.FIXED:
delayTimeInMs = this.retryOptions.retryDelayInMs;
break;
}
}
else {
delayTimeInMs = Math.random() * 1000;
}
logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);
return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.
*/
class StorageRetryPolicyFactory {
/**
* Creates an instance of StorageRetryPolicyFactory.
* @param retryOptions -
*/
constructor(retryOptions) {
this.retryOptions = retryOptions;
}
/**
* Creates a StorageRetryPolicy object.
*
* @param nextPolicy -
* @param options -
*/
create(nextPolicy, options) {
return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Credential policy used to sign HTTP(S) requests before sending. This is an
* abstract class.
*/
class CredentialPolicy extends BaseRequestPolicy {
/**
* Sends out request.
*
* @param request -
*/
sendRequest(request) {
return this._nextPolicy.sendRequest(this.signRequest(request));
}
/**
* Child classes must implement this method with request signing. This method
* will be executed in {@link sendRequest}.
*
* @param request -
*/
signRequest(request) {
// Child classes must override this method with request signing. This method
// will be executed in sendRequest().
return request;
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/*
* We need to imitate .Net culture-aware sorting, which is used in storage service.
* Below tables contain sort-keys for en-US culture.
*/
const table_lv0 = new Uint32Array([
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721,
0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e,
0xd20, 0xd22, 0xd24, 0xd26, 0xd28, 0xd2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe02, 0xe09, 0xe0a,
0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, 0xe7c, 0xe7e, 0xe89,
0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x0, 0x0, 0x743, 0x744, 0x748,
0xe02, 0xe09, 0xe0a, 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70,
0xe7c, 0xe7e, 0xe89, 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x74c,
0x0, 0x750, 0x0,
]);
const table_lv2 = new Uint32Array([
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,
0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,
0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
]);
const table_lv4 = new Uint32Array([
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
]);
function compareHeader(lhs, rhs) {
if (isLessThan(lhs, rhs))
return -1;
return 1;
}
function isLessThan(lhs, rhs) {
const tables = [table_lv0, table_lv2, table_lv4];
let curr_level = 0;
let i = 0;
let j = 0;
while (curr_level < tables.length) {
if (curr_level === tables.length - 1 && i !== j) {
return i > j;
}
const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1;
const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1;
if (weight1 === 0x1 && weight2 === 0x1) {
i = 0;
j = 0;
++curr_level;
}
else if (weight1 === weight2) {
++i;
++j;
}
else if (weight1 === 0) {
++i;
}
else if (weight2 === 0) {
++j;
}
else {
return weight1 < weight2;
}
}
return false;
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.
*/
class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
/**
* Creates an instance of StorageSharedKeyCredentialPolicy.
* @param nextPolicy -
* @param options -
* @param factory -
*/
constructor(nextPolicy, options, factory) {
super(nextPolicy, options);
this.factory = factory;
}
/**
* Signs request.
*
* @param request -
*/
signRequest(request) {
request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
if (request.body &&
(typeof request.body === "string" || request.body !== undefined) &&
request.body.length > 0) {
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
}
const stringToSign = [
request.method.toUpperCase(),
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),
this.getHeaderValueToSign(request, HeaderConstants.DATE),
this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),
this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
this.getHeaderValueToSign(request, HeaderConstants.RANGE),
].join("\n") +
"\n" +
this.getCanonicalizedHeadersString(request) +
this.getCanonicalizedResourceString(request);
const signature = this.factory.computeHMACSHA256(stringToSign);
request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`);
// console.log(`[URL]:${request.url}`);
// console.log(`[HEADERS]:${request.headers.toString()}`);
// console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);
// console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);
return request;
}
/**
* Retrieve header value according to shared key sign rules.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
*
* @param request -
* @param headerName -
*/
getHeaderValueToSign(request, headerName) {
const value = request.headers.get(headerName);
if (!value) {
return "";
}
// When using version 2015-02-21 or later, if Content-Length is zero, then
// set the Content-Length part of the StringToSign to an empty string.
// https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") {
return "";
}
return value;
}
/**
* To construct the CanonicalizedHeaders portion of the signature string, follow these steps:
* 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.
* 2. Convert each HTTP header name to lowercase.
* 3. Sort the headers lexicographically by header name, in ascending order.
* Each header may appear only once in the string.
* 4. Replace any linear whitespace in the header value with a single space.
* 5. Trim any whitespace around the colon in the header.
* 6. Finally, append a new-line character to each canonicalized header in the resulting list.
* Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.
*
* @param request -
*/
getCanonicalizedHeadersString(request) {
let headersArray = request.headers.headersArray().filter((value) => {
return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE);
});
headersArray.sort((a, b) => {
return compareHeader(a.name.toLowerCase(), b.name.toLowerCase());
});
// Remove duplicate headers
headersArray = headersArray.filter((value, index, array) => {
if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {
return false;
}
return true;
});
let canonicalizedHeadersStringToSign = "";
headersArray.forEach((header) => {
canonicalizedHeadersStringToSign += `${header.name
.toLowerCase()
.trimRight()}:${header.value.trimLeft()}\n`;
});
return canonicalizedHeadersStringToSign;
}
/**
* Retrieves the webResource canonicalized resource string.
*
* @param request -
*/
getCanonicalizedResourceString(request) {
const path = getURLPath(request.url) || "/";
let canonicalizedResourceString = "";
canonicalizedResourceString += `/${this.factory.accountName}${path}`;
const queries = getURLQueries(request.url);
const lowercaseQueries = {};
if (queries) {
const queryKeys = [];
for (const key in queries) {
if (Object.prototype.hasOwnProperty.call(queries, key)) {
const lowercaseKey = key.toLowerCase();
lowercaseQueries[lowercaseKey] = queries[key];
queryKeys.push(lowercaseKey);
}
}
queryKeys.sort();
for (const key of queryKeys) {
canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;
}
}
return canonicalizedResourceString;
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Credential is an abstract class for Azure Storage HTTP requests signing. This
* class will host an credentialPolicyCreator factory which generates CredentialPolicy.
*/
class Credential {
/**
* Creates a RequestPolicy object.
*
* @param _nextPolicy -
* @param _options -
*/
create(_nextPolicy, _options) {
throw new Error("Method should be implemented in children classes.");
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* StorageSharedKeyCredential for account key authorization of Azure Storage service.
*/
class StorageSharedKeyCredential extends Credential {
/**
* Creates an instance of StorageSharedKeyCredential.
* @param accountName -
* @param accountKey -
*/
constructor(accountName, accountKey) {
super();
this.accountName = accountName;
this.accountKey = Buffer.from(accountKey, "base64");
}
/**
* Creates a StorageSharedKeyCredentialPolicy object.
*
* @param nextPolicy -
* @param options -
*/
create(nextPolicy, options) {
return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this);
}
/**
* Generates a hash signature for an HTTP request or for a SAS.
*
* @param stringToSign -
*/
computeHMACSHA256(stringToSign) {
return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources
* or for use with Shared Access Signatures (SAS).
*/
class AnonymousCredentialPolicy extends CredentialPolicy {
/**
* Creates an instance of AnonymousCredentialPolicy.
* @param nextPolicy -
* @param options -
*/
// The base class has a protected constructor. Adding a public one to enable constructing of this class.
/* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/
constructor(nextPolicy, options) {
super(nextPolicy, options);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* AnonymousCredential provides a credentialPolicyCreator member used to create
* AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with
* HTTP(S) requests that read public resources or for use with Shared Access
* Signatures (SAS).
*/
class AnonymousCredential extends Credential {
/**
* Creates an {@link AnonymousCredentialPolicy} object.
*
* @param nextPolicy -
* @param options -
*/
create(nextPolicy, options) {
return new AnonymousCredentialPolicy(nextPolicy, options);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
let _defaultHttpClient;
function getCachedDefaultHttpClient() {
if (!_defaultHttpClient) {
_defaultHttpClient = coreRestPipeline.createDefaultHttpClient();
}
return _defaultHttpClient;
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* The programmatic identifier of the StorageBrowserPolicy.
*/
const storageBrowserPolicyName = "storageBrowserPolicy";
/**
* storageBrowserPolicy is a policy used to prevent browsers from caching requests
* and to remove cookies and explicit content-length headers.
*/
function storageBrowserPolicy() {
return {
name: storageBrowserPolicyName,
async sendRequest(request, next) {
if (coreUtil.isNode) {
return next(request);
}
if (request.method === "GET" || request.method === "HEAD") {
request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());
}
request.headers.delete(HeaderConstants.COOKIE);
// According to XHR standards, content-length should be fully controlled by browsers
request.headers.delete(HeaderConstants.CONTENT_LENGTH);
return next(request);
},
};
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Name of the {@link storageRetryPolicy}
*/
const storageRetryPolicyName = "storageRetryPolicy";
/**
* RetryPolicy types.
*/
var StorageRetryPolicyType;
(function (StorageRetryPolicyType) {
/**
* Exponential retry. Retry time delay grows exponentially.
*/
StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL";
/**
* Linear retry. Retry time delay grows linearly.
*/
StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED";
})(StorageRetryPolicyType || (StorageRetryPolicyType = {}));
// Default values of StorageRetryOptions
const DEFAULT_RETRY_OPTIONS = {
maxRetryDelayInMs: 120 * 1000,
maxTries: 4,
retryDelayInMs: 4 * 1000,
retryPolicyType: StorageRetryPolicyType.EXPONENTIAL,
secondaryHost: "",
tryTimeoutInMs: undefined, // Use server side default timeout strategy
};
const retriableErrors = [
"ETIMEDOUT",
"ESOCKETTIMEDOUT",
"ECONNREFUSED",
"ECONNRESET",
"ENOENT",
"ENOTFOUND",
"TIMEOUT",
"EPIPE",
"REQUEST_SEND_ERROR",
];
const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
/**
* Retry policy with exponential retry and linear retry implemented.
*/
function storageRetryPolicy(options = {}) {
var _a, _b, _c, _d, _e, _f;
const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType;
const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries;
const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs;
const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs;
const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost;
const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs;
function shouldRetry({ isPrimaryRetry, attempt, response, error, }) {
var _a, _b;
if (attempt >= maxTries) {
logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`);
return false;
}
if (error) {
for (const retriableError of retriableErrors) {
if (error.name.toUpperCase().includes(retriableError) ||
error.message.toUpperCase().includes(retriableError) ||
(error.code && error.code.toString().toUpperCase() === retriableError)) {
logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`);
return true;
}
}
if ((error === null || error === void 0 ? void 0 : error.code) === "PARSE_ERROR" &&
(error === null || error === void 0 ? void 0 : error.message.startsWith(`Error "Error: Unclosed root tag`))) {
logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry.");
return true;
}
}
// If attempt was against the secondary & it returned a StatusNotFound (404), then
// the resource was not found. This may be due to replication delay. So, in this
// case, we'll never try the secondary again for this operation.
if (response || error) {
const statusCode = (_b = (_a = response === null || response === void 0 ? void 0 : response.status) !== null && _a !== void 0 ? _a : error === null || error === void 0 ? void 0 : error.statusCode) !== null && _b !== void 0 ? _b : 0;
if (!isPrimaryRetry && statusCode === 404) {
logger.info(`RetryPolicy: Secondary access with 404, will retry.`);
return true;
}
// Server internal error or server timeout
if (statusCode === 503 || statusCode === 500) {
logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);
return true;
}
}
// [Copy source error code] Feature is pending on service side, skip retry on copy source error for now.
// if (response) {
// // Retry select Copy Source Error Codes.
// if (response?.status >= 400) {
// const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode);
// if (copySourceError !== undefined) {
// switch (copySourceError) {
// case "InternalError":
// case "OperationTimedOut":
// case "ServerBusy":
// return true;
// }
// }
// }
// }
return false;
}
function calculateDelay(isPrimaryRetry, attempt) {
let delayTimeInMs = 0;
if (isPrimaryRetry) {
switch (retryPolicyType) {
case StorageRetryPolicyType.EXPONENTIAL:
delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs);
break;
case StorageRetryPolicyType.FIXED:
delayTimeInMs = retryDelayInMs;
break;
}
}
else {
delayTimeInMs = Math.random() * 1000;
}
logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);
return delayTimeInMs;
}
return {
name: storageRetryPolicyName,
async sendRequest(request, next) {
// Set the server-side timeout query parameter "timeout=[seconds]"
if (tryTimeoutInMs) {
request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1000)));
}
const primaryUrl = request.url;
const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : undefined;
let secondaryHas404 = false;
let attempt = 1;
let retryAgain = true;
let response;
let error;
while (retryAgain) {
const isPrimaryRetry = secondaryHas404 ||
!secondaryUrl ||
!["GET", "HEAD", "OPTIONS"].includes(request.method) ||
attempt % 2 === 1;
request.url = isPrimaryRetry ? primaryUrl : secondaryUrl;
response = undefined;
error = undefined;
try {
logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`);
response = await next(request);
secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404);
}
catch (e) {
if (coreRestPipeline.isRestError(e)) {
logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`);
error = e;
}
else {
logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`);
throw e;
}
}
retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error });
if (retryAgain) {
await delay(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR);
}
attempt++;
}
if (response) {
return response;
}
throw error !== null && error !== void 0 ? error : new coreRestPipeline.RestError("RetryPolicy failed without known error.");
},
};
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* The programmatic identifier of the storageSharedKeyCredentialPolicy.
*/
const storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy";
/**
* storageSharedKeyCredentialPolicy handles signing requests using storage account keys.
*/
function storageSharedKeyCredentialPolicy(options) {
function signRequest(request) {
request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
if (request.body &&
(typeof request.body === "string" || Buffer.isBuffer(request.body)) &&
request.body.length > 0) {
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
}
const stringToSign = [
request.method.toUpperCase(),
getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),
getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),
getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),
getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),
getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),
getHeaderValueToSign(request, HeaderConstants.DATE),
getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),
getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
getHeaderValueToSign(request, HeaderConstants.RANGE),
].join("\n") +
"\n" +
getCanonicalizedHeadersString(request) +
getCanonicalizedResourceString(request);
const signature = crypto.createHmac("sha256", options.accountKey)
.update(stringToSign, "utf8")
.digest("base64");
request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`);
// console.log(`[URL]:${request.url}`);
// console.log(`[HEADERS]:${request.headers.toString()}`);
// console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);
// console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);
}
/**
* Retrieve header value according to shared key sign rules.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
*/
function getHeaderValueToSign(request, headerName) {
const value = request.headers.get(headerName);
if (!value) {
return "";
}
// When using version 2015-02-21 or later, if Content-Length is zero, then
// set the Content-Length part of the StringToSign to an empty string.
// https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") {
return "";
}
return value;
}
/**
* To construct the CanonicalizedHeaders portion of the signature string, follow these steps:
* 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.
* 2. Convert each HTTP header name to lowercase.
* 3. Sort the headers lexicographically by header name, in ascending order.
* Each header may appear only once in the string.
* 4. Replace any linear whitespace in the header value with a single space.
* 5. Trim any whitespace around the colon in the header.
* 6. Finally, append a new-line character to each canonicalized header in the resulting list.
* Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.
*
*/
function getCanonicalizedHeadersString(request) {
let headersArray = [];
for (const [name, value] of request.headers) {
if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) {
headersArray.push({ name, value });
}
}
headersArray.sort((a, b) => {
return compareHeader(a.name.toLowerCase(), b.name.toLowerCase());
});
// Remove duplicate headers
headersArray = headersArray.filter((value, index, array) => {
if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {
return false;
}
return true;
});
let canonicalizedHeadersStringToSign = "";
headersArray.forEach((header) => {
canonicalizedHeadersStringToSign += `${header.name
.toLowerCase()
.trimRight()}:${header.value.trimLeft()}\n`;
});
return canonicalizedHeadersStringToSign;
}
function getCanonicalizedResourceString(request) {
const path = getURLPath(request.url) || "/";
let canonicalizedResourceString = "";
canonicalizedResourceString += `/${options.accountName}${path}`;
const queries = getURLQueries(request.url);
const lowercaseQueries = {};
if (queries) {
const queryKeys = [];
for (const key in queries) {
if (Object.prototype.hasOwnProperty.call(queries, key)) {
const lowercaseKey = key.toLowerCase();
lowercaseQueries[lowercaseKey] = queries[key];
queryKeys.push(lowercaseKey);
}
}
queryKeys.sort();
for (const key of queryKeys) {
canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;
}
}
return canonicalizedResourceString;
}
return {
name: storageSharedKeyCredentialPolicyName,
async sendRequest(request, next) {
signRequest(request);
return next(request);
},
};
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:
*
* 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'.
* StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL
* thus avoid the browser cache.
*
* 2. Remove cookie header for security
*
* 3. Remove content-length header to avoid browsers warning
*/
class StorageBrowserPolicy extends BaseRequestPolicy {
/**
* Creates an instance of StorageBrowserPolicy.
* @param nextPolicy -
* @param options -
*/
// The base class has a protected constructor. Adding a public one to enable constructing of this class.
/* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/
constructor(nextPolicy, options) {
super(nextPolicy, options);
}
/**
* Sends out request.
*
* @param request -
*/
async sendRequest(request) {
if (coreUtil.isNode) {
return this._nextPolicy.sendRequest(request);
}
if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") {
request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());
}
request.headers.remove(HeaderConstants.COOKIE);
// According to XHR standards, content-length should be fully controlled by browsers
request.headers.remove(HeaderConstants.CONTENT_LENGTH);
return this._nextPolicy.sendRequest(request);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.
*/
class StorageBrowserPolicyFactory {
/**
* Creates a StorageBrowserPolicyFactory object.
*
* @param nextPolicy -
* @param options -
*/
create(nextPolicy, options) {
return new StorageBrowserPolicy(nextPolicy, options);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* The programmatic identifier of the storageCorrectContentLengthPolicy.
*/
const storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy";
/**
* storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length.
*/
function storageCorrectContentLengthPolicy() {
function correctContentLength(request) {
if (request.body &&
(typeof request.body === "string" || Buffer.isBuffer(request.body)) &&
request.body.length > 0) {
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
}
}
return {
name: storageCorrectContentLengthPolicyName,
async sendRequest(request, next) {
correctContentLength(request);
return next(request);
},
};
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* A helper to decide if a given argument satisfies the Pipeline contract
* @param pipeline - An argument that may be a Pipeline
* @returns true when the argument satisfies the Pipeline contract
*/
function isPipelineLike(pipeline) {
if (!pipeline || typeof pipeline !== "object") {
return false;
}
const castPipeline = pipeline;
return (Array.isArray(castPipeline.factories) &&
typeof castPipeline.options === "object" &&
typeof castPipeline.toServiceClientOptions === "function");
}
/**
* A Pipeline class containing HTTP request policies.
* You can create a default Pipeline by calling {@link newPipeline}.
* Or you can create a Pipeline with your own policies by the constructor of Pipeline.
*
* Refer to {@link newPipeline} and provided policies before implementing your
* customized Pipeline.
*/
class Pipeline {
/**
* Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.
*
* @param factories -
* @param options -
*/
constructor(factories, options = {}) {
this.factories = factories;
this.options = options;
}
/**
* Transfer Pipeline object to ServiceClientOptions object which is required by
* ServiceClient constructor.
*
* @returns The ServiceClientOptions object from this Pipeline.
*/
toServiceClientOptions() {
return {
httpClient: this.options.httpClient,
requestPolicyFactories: this.factories,
};
}
}
/**
* Creates a new Pipeline object with Credential provided.
*
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
* @param pipelineOptions - Optional. Options.
* @returns A new Pipeline object.
*/
function newPipeline(credential, pipelineOptions = {}) {
if (!credential) {
credential = new AnonymousCredential();
}
const pipeline = new Pipeline([], pipelineOptions);
pipeline._credential = credential;
return pipeline;
}
function processDownlevelPipeline(pipeline) {
const knownFactoryFunctions = [
isAnonymousCredential,
isStorageSharedKeyCredential,
isCoreHttpBearerTokenFactory,
isStorageBrowserPolicyFactory,
isStorageRetryPolicyFactory,
isStorageTelemetryPolicyFactory,
isCoreHttpPolicyFactory,
];
if (pipeline.factories.length) {
const novelFactories = pipeline.factories.filter((factory) => {
return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory));
});
if (novelFactories.length) {
const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory));
// if there are any left over, wrap in a requestPolicyFactoryPolicy
return {
wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories),
afterRetry: hasInjector,
};
}
}
return undefined;
}
function getCoreClientOptions(pipeline) {
var _a;
const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]);
let httpClient = pipeline._coreHttpClient;
if (!httpClient) {
httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient();
pipeline._coreHttpClient = httpClient;
}
let corePipeline = pipeline._corePipeline;
if (!corePipeline) {
const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`;
const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix
? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;
corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: {
additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,
logger: logger.info,
}, userAgentOptions: {
userAgentPrefix,
}, serializationOptions: {
stringifyXML: coreXml.stringifyXML,
serializerOptions: {
xml: {
// Use customized XML char key of "#" so we can deserialize metadata
// with "_" key
xmlCharKey: "#",
},
},
}, deserializationOptions: {
parseXML: coreXml.parseXML,
serializerOptions: {
xml: {
// Use customized XML char key of "#" so we can deserialize metadata
// with "_" key
xmlCharKey: "#",
},
},
} }));
corePipeline.removePolicy({ phase: "Retry" });
corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName });
corePipeline.addPolicy(storageCorrectContentLengthPolicy());
corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" });
corePipeline.addPolicy(storageBrowserPolicy());
const downlevelResults = processDownlevelPipeline(pipeline);
if (downlevelResults) {
corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : undefined);
}
const credential = getCredentialFromPipeline(pipeline);
if (coreAuth.isTokenCredential(credential)) {
corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
credential,
scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes,
challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge },
}), { phase: "Sign" });
}
else if (credential instanceof StorageSharedKeyCredential) {
corePipeline.addPolicy(storageSharedKeyCredentialPolicy({
accountName: credential.accountName,
accountKey: credential.accountKey,
}), { phase: "Sign" });
}
pipeline._corePipeline = corePipeline;
}
return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline });
}
function getCredentialFromPipeline(pipeline) {
// see if we squirreled one away on the type itself
if (pipeline._credential) {
return pipeline._credential;
}
// if it came from another package, loop over the factories and look for one like before
let credential = new AnonymousCredential();
for (const factory of pipeline.factories) {
if (coreAuth.isTokenCredential(factory.credential)) {
// Only works if the factory has been attached a "credential" property.
// We do that in newPipeline() when using TokenCredential.
credential = factory.credential;
}
else if (isStorageSharedKeyCredential(factory)) {
return factory;
}
}
return credential;
}
function isStorageSharedKeyCredential(factory) {
if (factory instanceof StorageSharedKeyCredential) {
return true;
}
return factory.constructor.name === "StorageSharedKeyCredential";
}
function isAnonymousCredential(factory) {
if (factory instanceof AnonymousCredential) {
return true;
}
return factory.constructor.name === "AnonymousCredential";
}
function isCoreHttpBearerTokenFactory(factory) {
return coreAuth.isTokenCredential(factory.credential);
}
function isStorageBrowserPolicyFactory(factory) {
if (factory instanceof StorageBrowserPolicyFactory) {
return true;
}
return factory.constructor.name === "StorageBrowserPolicyFactory";
}
function isStorageRetryPolicyFactory(factory) {
if (factory instanceof StorageRetryPolicyFactory) {
return true;
}
return factory.constructor.name === "StorageRetryPolicyFactory";
}
function isStorageTelemetryPolicyFactory(factory) {
return factory.constructor.name === "TelemetryPolicyFactory";
}
function isInjectorPolicyFactory(factory) {
return factory.constructor.name === "InjectorPolicyFactory";
}
function isCoreHttpPolicyFactory(factory) {
const knownPolicies = [
"GenerateClientRequestIdPolicy",
"TracingPolicy",
"LogPolicy",
"ProxyPolicy",
"DisableResponseDecompressionPolicy",
"KeepAlivePolicy",
"DeserializationPolicy",
];
const mockHttpClient = {
sendRequest: async (request) => {
return {
request,
headers: request.headers.clone(),
status: 500,
};
},
};
const mockRequestPolicyOptions = {
log(_logLevel, _message) {
/* do nothing */
},
shouldLog(_logLevel) {
return false;
},
};
const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions);
const policyName = policyInstance.constructor.name;
// bundlers sometimes add a custom suffix to the class name to make it unique
return knownPolicies.some((knownPolicyName) => {
return policyName.startsWith(knownPolicyName);
});
}
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
const BlobServiceProperties = {
serializedName: "BlobServiceProperties",
xmlName: "StorageServiceProperties",
type: {
name: "Composite",
className: "BlobServiceProperties",
modelProperties: {
blobAnalyticsLogging: {
serializedName: "Logging",
xmlName: "Logging",
type: {
name: "Composite",
className: "Logging",
},
},
hourMetrics: {
serializedName: "HourMetrics",
xmlName: "HourMetrics",
type: {
name: "Composite",
className: "Metrics",
},
},
minuteMetrics: {
serializedName: "MinuteMetrics",
xmlName: "MinuteMetrics",
type: {
name: "Composite",
className: "Metrics",
},
},
cors: {
serializedName: "Cors",
xmlName: "Cors",
xmlIsWrapped: true,
xmlElementName: "CorsRule",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "CorsRule",
},
},
},
},
defaultServiceVersion: {
serializedName: "DefaultServiceVersion",
xmlName: "DefaultServiceVersion",
type: {
name: "String",
},
},
deleteRetentionPolicy: {
serializedName: "DeleteRetentionPolicy",
xmlName: "DeleteRetentionPolicy",
type: {
name: "Composite",
className: "RetentionPolicy",
},
},
staticWebsite: {
serializedName: "StaticWebsite",
xmlName: "StaticWebsite",
type: {
name: "Composite",
className: "StaticWebsite",
},
},
},
},
};
const Logging = {
serializedName: "Logging",
type: {
name: "Composite",
className: "Logging",
modelProperties: {
version: {
serializedName: "Version",
required: true,
xmlName: "Version",
type: {
name: "String",
},
},
deleteProperty: {
serializedName: "Delete",
required: true,
xmlName: "Delete",
type: {
name: "Boolean",
},
},
read: {
serializedName: "Read",
required: true,
xmlName: "Read",
type: {
name: "Boolean",
},
},
write: {
serializedName: "Write",
required: true,
xmlName: "Write",
type: {
name: "Boolean",
},
},
retentionPolicy: {
serializedName: "RetentionPolicy",
xmlName: "RetentionPolicy",
type: {
name: "Composite",
className: "RetentionPolicy",
},
},
},
},
};
const RetentionPolicy = {
serializedName: "RetentionPolicy",
type: {
name: "Composite",
className: "RetentionPolicy",
modelProperties: {
enabled: {
serializedName: "Enabled",
required: true,
xmlName: "Enabled",
type: {
name: "Boolean",
},
},
days: {
constraints: {
InclusiveMinimum: 1,
},
serializedName: "Days",
xmlName: "Days",
type: {
name: "Number",
},
},
},
},
};
const Metrics = {
serializedName: "Metrics",
type: {
name: "Composite",
className: "Metrics",
modelProperties: {
version: {
serializedName: "Version",
xmlName: "Version",
type: {
name: "String",
},
},
enabled: {
serializedName: "Enabled",
required: true,
xmlName: "Enabled",
type: {
name: "Boolean",
},
},
includeAPIs: {
serializedName: "IncludeAPIs",
xmlName: "IncludeAPIs",
type: {
name: "Boolean",
},
},
retentionPolicy: {
serializedName: "RetentionPolicy",
xmlName: "RetentionPolicy",
type: {
name: "Composite",
className: "RetentionPolicy",
},
},
},
},
};
const CorsRule = {
serializedName: "CorsRule",
type: {
name: "Composite",
className: "CorsRule",
modelProperties: {
allowedOrigins: {
serializedName: "AllowedOrigins",
required: true,
xmlName: "AllowedOrigins",
type: {
name: "String",
},
},
allowedMethods: {
serializedName: "AllowedMethods",
required: true,
xmlName: "AllowedMethods",
type: {
name: "String",
},
},
allowedHeaders: {
serializedName: "AllowedHeaders",
required: true,
xmlName: "AllowedHeaders",
type: {
name: "String",
},
},
exposedHeaders: {
serializedName: "ExposedHeaders",
required: true,
xmlName: "ExposedHeaders",
type: {
name: "String",
},
},
maxAgeInSeconds: {
constraints: {
InclusiveMinimum: 0,
},
serializedName: "MaxAgeInSeconds",
required: true,
xmlName: "MaxAgeInSeconds",
type: {
name: "Number",
},
},
},
},
};
const StaticWebsite = {
serializedName: "StaticWebsite",
type: {
name: "Composite",
className: "StaticWebsite",
modelProperties: {
enabled: {
serializedName: "Enabled",
required: true,
xmlName: "Enabled",
type: {
name: "Boolean",
},
},
indexDocument: {
serializedName: "IndexDocument",
xmlName: "IndexDocument",
type: {
name: "String",
},
},
errorDocument404Path: {
serializedName: "ErrorDocument404Path",
xmlName: "ErrorDocument404Path",
type: {
name: "String",
},
},
defaultIndexDocumentPath: {
serializedName: "DefaultIndexDocumentPath",
xmlName: "DefaultIndexDocumentPath",
type: {
name: "String",
},
},
},
},
};
const StorageError = {
serializedName: "StorageError",
type: {
name: "Composite",
className: "StorageError",
modelProperties: {
message: {
serializedName: "Message",
xmlName: "Message",
type: {
name: "String",
},
},
code: {
serializedName: "Code",
xmlName: "Code",
type: {
name: "String",
},
},
authenticationErrorDetail: {
serializedName: "AuthenticationErrorDetail",
xmlName: "AuthenticationErrorDetail",
type: {
name: "String",
},
},
},
},
};
const BlobServiceStatistics = {
serializedName: "BlobServiceStatistics",
xmlName: "StorageServiceStats",
type: {
name: "Composite",
className: "BlobServiceStatistics",
modelProperties: {
geoReplication: {
serializedName: "GeoReplication",
xmlName: "GeoReplication",
type: {
name: "Composite",
className: "GeoReplication",
},
},
},
},
};
const GeoReplication = {
serializedName: "GeoReplication",
type: {
name: "Composite",
className: "GeoReplication",
modelProperties: {
status: {
serializedName: "Status",
required: true,
xmlName: "Status",
type: {
name: "Enum",
allowedValues: ["live", "bootstrap", "unavailable"],
},
},
lastSyncOn: {
serializedName: "LastSyncTime",
required: true,
xmlName: "LastSyncTime",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const ListContainersSegmentResponse = {
serializedName: "ListContainersSegmentResponse",
xmlName: "EnumerationResults",
type: {
name: "Composite",
className: "ListContainersSegmentResponse",
modelProperties: {
serviceEndpoint: {
serializedName: "ServiceEndpoint",
required: true,
xmlName: "ServiceEndpoint",
xmlIsAttribute: true,
type: {
name: "String",
},
},
prefix: {
serializedName: "Prefix",
xmlName: "Prefix",
type: {
name: "String",
},
},
marker: {
serializedName: "Marker",
xmlName: "Marker",
type: {
name: "String",
},
},
maxPageSize: {
serializedName: "MaxResults",
xmlName: "MaxResults",
type: {
name: "Number",
},
},
containerItems: {
serializedName: "ContainerItems",
required: true,
xmlName: "Containers",
xmlIsWrapped: true,
xmlElementName: "Container",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ContainerItem",
},
},
},
},
continuationToken: {
serializedName: "NextMarker",
xmlName: "NextMarker",
type: {
name: "String",
},
},
},
},
};
const ContainerItem = {
serializedName: "ContainerItem",
xmlName: "Container",
type: {
name: "Composite",
className: "ContainerItem",
modelProperties: {
name: {
serializedName: "Name",
required: true,
xmlName: "Name",
type: {
name: "String",
},
},
deleted: {
serializedName: "Deleted",
xmlName: "Deleted",
type: {
name: "Boolean",
},
},
version: {
serializedName: "Version",
xmlName: "Version",
type: {
name: "String",
},
},
properties: {
serializedName: "Properties",
xmlName: "Properties",
type: {
name: "Composite",
className: "ContainerProperties",
},
},
metadata: {
serializedName: "Metadata",
xmlName: "Metadata",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
},
},
};
const ContainerProperties = {
serializedName: "ContainerProperties",
type: {
name: "Composite",
className: "ContainerProperties",
modelProperties: {
lastModified: {
serializedName: "Last-Modified",
required: true,
xmlName: "Last-Modified",
type: {
name: "DateTimeRfc1123",
},
},
etag: {
serializedName: "Etag",
required: true,
xmlName: "Etag",
type: {
name: "String",
},
},
leaseStatus: {
serializedName: "LeaseStatus",
xmlName: "LeaseStatus",
type: {
name: "Enum",
allowedValues: ["locked", "unlocked"],
},
},
leaseState: {
serializedName: "LeaseState",
xmlName: "LeaseState",
type: {
name: "Enum",
allowedValues: [
"available",
"leased",
"expired",
"breaking",
"broken",
],
},
},
leaseDuration: {
serializedName: "LeaseDuration",
xmlName: "LeaseDuration",
type: {
name: "Enum",
allowedValues: ["infinite", "fixed"],
},
},
publicAccess: {
serializedName: "PublicAccess",
xmlName: "PublicAccess",
type: {
name: "Enum",
allowedValues: ["container", "blob"],
},
},
hasImmutabilityPolicy: {
serializedName: "HasImmutabilityPolicy",
xmlName: "HasImmutabilityPolicy",
type: {
name: "Boolean",
},
},
hasLegalHold: {
serializedName: "HasLegalHold",
xmlName: "HasLegalHold",
type: {
name: "Boolean",
},
},
defaultEncryptionScope: {
serializedName: "DefaultEncryptionScope",
xmlName: "DefaultEncryptionScope",
type: {
name: "String",
},
},
preventEncryptionScopeOverride: {
serializedName: "DenyEncryptionScopeOverride",
xmlName: "DenyEncryptionScopeOverride",
type: {
name: "Boolean",
},
},
deletedOn: {
serializedName: "DeletedTime",
xmlName: "DeletedTime",
type: {
name: "DateTimeRfc1123",
},
},
remainingRetentionDays: {
serializedName: "RemainingRetentionDays",
xmlName: "RemainingRetentionDays",
type: {
name: "Number",
},
},
isImmutableStorageWithVersioningEnabled: {
serializedName: "ImmutableStorageWithVersioningEnabled",
xmlName: "ImmutableStorageWithVersioningEnabled",
type: {
name: "Boolean",
},
},
},
},
};
const KeyInfo = {
serializedName: "KeyInfo",
type: {
name: "Composite",
className: "KeyInfo",
modelProperties: {
startsOn: {
serializedName: "Start",
required: true,
xmlName: "Start",
type: {
name: "String",
},
},
expiresOn: {
serializedName: "Expiry",
required: true,
xmlName: "Expiry",
type: {
name: "String",
},
},
},
},
};
const UserDelegationKey = {
serializedName: "UserDelegationKey",
type: {
name: "Composite",
className: "UserDelegationKey",
modelProperties: {
signedObjectId: {
serializedName: "SignedOid",
required: true,
xmlName: "SignedOid",
type: {
name: "String",
},
},
signedTenantId: {
serializedName: "SignedTid",
required: true,
xmlName: "SignedTid",
type: {
name: "String",
},
},
signedStartsOn: {
serializedName: "SignedStart",
required: true,
xmlName: "SignedStart",
type: {
name: "String",
},
},
signedExpiresOn: {
serializedName: "SignedExpiry",
required: true,
xmlName: "SignedExpiry",
type: {
name: "String",
},
},
signedService: {
serializedName: "SignedService",
required: true,
xmlName: "SignedService",
type: {
name: "String",
},
},
signedVersion: {
serializedName: "SignedVersion",
required: true,
xmlName: "SignedVersion",
type: {
name: "String",
},
},
value: {
serializedName: "Value",
required: true,
xmlName: "Value",
type: {
name: "String",
},
},
},
},
};
const FilterBlobSegment = {
serializedName: "FilterBlobSegment",
xmlName: "EnumerationResults",
type: {
name: "Composite",
className: "FilterBlobSegment",
modelProperties: {
serviceEndpoint: {
serializedName: "ServiceEndpoint",
required: true,
xmlName: "ServiceEndpoint",
xmlIsAttribute: true,
type: {
name: "String",
},
},
where: {
serializedName: "Where",
required: true,
xmlName: "Where",
type: {
name: "String",
},
},
blobs: {
serializedName: "Blobs",
required: true,
xmlName: "Blobs",
xmlIsWrapped: true,
xmlElementName: "Blob",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "FilterBlobItem",
},
},
},
},
continuationToken: {
serializedName: "NextMarker",
xmlName: "NextMarker",
type: {
name: "String",
},
},
},
},
};
const FilterBlobItem = {
serializedName: "FilterBlobItem",
xmlName: "Blob",
type: {
name: "Composite",
className: "FilterBlobItem",
modelProperties: {
name: {
serializedName: "Name",
required: true,
xmlName: "Name",
type: {
name: "String",
},
},
containerName: {
serializedName: "ContainerName",
required: true,
xmlName: "ContainerName",
type: {
name: "String",
},
},
tags: {
serializedName: "Tags",
xmlName: "Tags",
type: {
name: "Composite",
className: "BlobTags",
},
},
},
},
};
const BlobTags = {
serializedName: "BlobTags",
xmlName: "Tags",
type: {
name: "Composite",
className: "BlobTags",
modelProperties: {
blobTagSet: {
serializedName: "BlobTagSet",
required: true,
xmlName: "TagSet",
xmlIsWrapped: true,
xmlElementName: "Tag",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "BlobTag",
},
},
},
},
},
},
};
const BlobTag = {
serializedName: "BlobTag",
xmlName: "Tag",
type: {
name: "Composite",
className: "BlobTag",
modelProperties: {
key: {
serializedName: "Key",
required: true,
xmlName: "Key",
type: {
name: "String",
},
},
value: {
serializedName: "Value",
required: true,
xmlName: "Value",
type: {
name: "String",
},
},
},
},
};
const SignedIdentifier = {
serializedName: "SignedIdentifier",
xmlName: "SignedIdentifier",
type: {
name: "Composite",
className: "SignedIdentifier",
modelProperties: {
id: {
serializedName: "Id",
required: true,
xmlName: "Id",
type: {
name: "String",
},
},
accessPolicy: {
serializedName: "AccessPolicy",
xmlName: "AccessPolicy",
type: {
name: "Composite",
className: "AccessPolicy",
},
},
},
},
};
const AccessPolicy = {
serializedName: "AccessPolicy",
type: {
name: "Composite",
className: "AccessPolicy",
modelProperties: {
startsOn: {
serializedName: "Start",
xmlName: "Start",
type: {
name: "String",
},
},
expiresOn: {
serializedName: "Expiry",
xmlName: "Expiry",
type: {
name: "String",
},
},
permissions: {
serializedName: "Permission",
xmlName: "Permission",
type: {
name: "String",
},
},
},
},
};
const ListBlobsFlatSegmentResponse = {
serializedName: "ListBlobsFlatSegmentResponse",
xmlName: "EnumerationResults",
type: {
name: "Composite",
className: "ListBlobsFlatSegmentResponse",
modelProperties: {
serviceEndpoint: {
serializedName: "ServiceEndpoint",
required: true,
xmlName: "ServiceEndpoint",
xmlIsAttribute: true,
type: {
name: "String",
},
},
containerName: {
serializedName: "ContainerName",
required: true,
xmlName: "ContainerName",
xmlIsAttribute: true,
type: {
name: "String",
},
},
prefix: {
serializedName: "Prefix",
xmlName: "Prefix",
type: {
name: "String",
},
},
marker: {
serializedName: "Marker",
xmlName: "Marker",
type: {
name: "String",
},
},
maxPageSize: {
serializedName: "MaxResults",
xmlName: "MaxResults",
type: {
name: "Number",
},
},
segment: {
serializedName: "Segment",
xmlName: "Blobs",
type: {
name: "Composite",
className: "BlobFlatListSegment",
},
},
continuationToken: {
serializedName: "NextMarker",
xmlName: "NextMarker",
type: {
name: "String",
},
},
},
},
};
const BlobFlatListSegment = {
serializedName: "BlobFlatListSegment",
xmlName: "Blobs",
type: {
name: "Composite",
className: "BlobFlatListSegment",
modelProperties: {
blobItems: {
serializedName: "BlobItems",
required: true,
xmlName: "BlobItems",
xmlElementName: "Blob",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "BlobItemInternal",
},
},
},
},
},
},
};
const BlobItemInternal = {
serializedName: "BlobItemInternal",
xmlName: "Blob",
type: {
name: "Composite",
className: "BlobItemInternal",
modelProperties: {
name: {
serializedName: "Name",
xmlName: "Name",
type: {
name: "Composite",
className: "BlobName",
},
},
deleted: {
serializedName: "Deleted",
required: true,
xmlName: "Deleted",
type: {
name: "Boolean",
},
},
snapshot: {
serializedName: "Snapshot",
required: true,
xmlName: "Snapshot",
type: {
name: "String",
},
},
versionId: {
serializedName: "VersionId",
xmlName: "VersionId",
type: {
name: "String",
},
},
isCurrentVersion: {
serializedName: "IsCurrentVersion",
xmlName: "IsCurrentVersion",
type: {
name: "Boolean",
},
},
properties: {
serializedName: "Properties",
xmlName: "Properties",
type: {
name: "Composite",
className: "BlobPropertiesInternal",
},
},
metadata: {
serializedName: "Metadata",
xmlName: "Metadata",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
blobTags: {
serializedName: "BlobTags",
xmlName: "Tags",
type: {
name: "Composite",
className: "BlobTags",
},
},
objectReplicationMetadata: {
serializedName: "ObjectReplicationMetadata",
xmlName: "OrMetadata",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
hasVersionsOnly: {
serializedName: "HasVersionsOnly",
xmlName: "HasVersionsOnly",
type: {
name: "Boolean",
},
},
},
},
};
const BlobName = {
serializedName: "BlobName",
type: {
name: "Composite",
className: "BlobName",
modelProperties: {
encoded: {
serializedName: "Encoded",
xmlName: "Encoded",
xmlIsAttribute: true,
type: {
name: "Boolean",
},
},
content: {
serializedName: "content",
xmlName: "content",
xmlIsMsText: true,
type: {
name: "String",
},
},
},
},
};
const BlobPropertiesInternal = {
serializedName: "BlobPropertiesInternal",
xmlName: "Properties",
type: {
name: "Composite",
className: "BlobPropertiesInternal",
modelProperties: {
createdOn: {
serializedName: "Creation-Time",
xmlName: "Creation-Time",
type: {
name: "DateTimeRfc1123",
},
},
lastModified: {
serializedName: "Last-Modified",
required: true,
xmlName: "Last-Modified",
type: {
name: "DateTimeRfc1123",
},
},
etag: {
serializedName: "Etag",
required: true,
xmlName: "Etag",
type: {
name: "String",
},
},
contentLength: {
serializedName: "Content-Length",
xmlName: "Content-Length",
type: {
name: "Number",
},
},
contentType: {
serializedName: "Content-Type",
xmlName: "Content-Type",
type: {
name: "String",
},
},
contentEncoding: {
serializedName: "Content-Encoding",
xmlName: "Content-Encoding",
type: {
name: "String",
},
},
contentLanguage: {
serializedName: "Content-Language",
xmlName: "Content-Language",
type: {
name: "String",
},
},
contentMD5: {
serializedName: "Content-MD5",
xmlName: "Content-MD5",
type: {
name: "ByteArray",
},
},
contentDisposition: {
serializedName: "Content-Disposition",
xmlName: "Content-Disposition",
type: {
name: "String",
},
},
cacheControl: {
serializedName: "Cache-Control",
xmlName: "Cache-Control",
type: {
name: "String",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
blobType: {
serializedName: "BlobType",
xmlName: "BlobType",
type: {
name: "Enum",
allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"],
},
},
leaseStatus: {
serializedName: "LeaseStatus",
xmlName: "LeaseStatus",
type: {
name: "Enum",
allowedValues: ["locked", "unlocked"],
},
},
leaseState: {
serializedName: "LeaseState",
xmlName: "LeaseState",
type: {
name: "Enum",
allowedValues: [
"available",
"leased",
"expired",
"breaking",
"broken",
],
},
},
leaseDuration: {
serializedName: "LeaseDuration",
xmlName: "LeaseDuration",
type: {
name: "Enum",
allowedValues: ["infinite", "fixed"],
},
},
copyId: {
serializedName: "CopyId",
xmlName: "CopyId",
type: {
name: "String",
},
},
copyStatus: {
serializedName: "CopyStatus",
xmlName: "CopyStatus",
type: {
name: "Enum",
allowedValues: ["pending", "success", "aborted", "failed"],
},
},
copySource: {
serializedName: "CopySource",
xmlName: "CopySource",
type: {
name: "String",
},
},
copyProgress: {
serializedName: "CopyProgress",
xmlName: "CopyProgress",
type: {
name: "String",
},
},
copyCompletedOn: {
serializedName: "CopyCompletionTime",
xmlName: "CopyCompletionTime",
type: {
name: "DateTimeRfc1123",
},
},
copyStatusDescription: {
serializedName: "CopyStatusDescription",
xmlName: "CopyStatusDescription",
type: {
name: "String",
},
},
serverEncrypted: {
serializedName: "ServerEncrypted",
xmlName: "ServerEncrypted",
type: {
name: "Boolean",
},
},
incrementalCopy: {
serializedName: "IncrementalCopy",
xmlName: "IncrementalCopy",
type: {
name: "Boolean",
},
},
destinationSnapshot: {
serializedName: "DestinationSnapshot",
xmlName: "DestinationSnapshot",
type: {
name: "String",
},
},
deletedOn: {
serializedName: "DeletedTime",
xmlName: "DeletedTime",
type: {
name: "DateTimeRfc1123",
},
},
remainingRetentionDays: {
serializedName: "RemainingRetentionDays",
xmlName: "RemainingRetentionDays",
type: {
name: "Number",
},
},
accessTier: {
serializedName: "AccessTier",
xmlName: "AccessTier",
type: {
name: "Enum",
allowedValues: [
"P4",
"P6",
"P10",
"P15",
"P20",
"P30",
"P40",
"P50",
"P60",
"P70",
"P80",
"Hot",
"Cool",
"Archive",
"Cold",
],
},
},
accessTierInferred: {
serializedName: "AccessTierInferred",
xmlName: "AccessTierInferred",
type: {
name: "Boolean",
},
},
archiveStatus: {
serializedName: "ArchiveStatus",
xmlName: "ArchiveStatus",
type: {
name: "Enum",
allowedValues: [
"rehydrate-pending-to-hot",
"rehydrate-pending-to-cool",
"rehydrate-pending-to-cold",
],
},
},
customerProvidedKeySha256: {
serializedName: "CustomerProvidedKeySha256",
xmlName: "CustomerProvidedKeySha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "EncryptionScope",
xmlName: "EncryptionScope",
type: {
name: "String",
},
},
accessTierChangedOn: {
serializedName: "AccessTierChangeTime",
xmlName: "AccessTierChangeTime",
type: {
name: "DateTimeRfc1123",
},
},
tagCount: {
serializedName: "TagCount",
xmlName: "TagCount",
type: {
name: "Number",
},
},
expiresOn: {
serializedName: "Expiry-Time",
xmlName: "Expiry-Time",
type: {
name: "DateTimeRfc1123",
},
},
isSealed: {
serializedName: "Sealed",
xmlName: "Sealed",
type: {
name: "Boolean",
},
},
rehydratePriority: {
serializedName: "RehydratePriority",
xmlName: "RehydratePriority",
type: {
name: "Enum",
allowedValues: ["High", "Standard"],
},
},
lastAccessedOn: {
serializedName: "LastAccessTime",
xmlName: "LastAccessTime",
type: {
name: "DateTimeRfc1123",
},
},
immutabilityPolicyExpiresOn: {
serializedName: "ImmutabilityPolicyUntilDate",
xmlName: "ImmutabilityPolicyUntilDate",
type: {
name: "DateTimeRfc1123",
},
},
immutabilityPolicyMode: {
serializedName: "ImmutabilityPolicyMode",
xmlName: "ImmutabilityPolicyMode",
type: {
name: "Enum",
allowedValues: ["Mutable", "Unlocked", "Locked"],
},
},
legalHold: {
serializedName: "LegalHold",
xmlName: "LegalHold",
type: {
name: "Boolean",
},
},
},
},
};
const ListBlobsHierarchySegmentResponse = {
serializedName: "ListBlobsHierarchySegmentResponse",
xmlName: "EnumerationResults",
type: {
name: "Composite",
className: "ListBlobsHierarchySegmentResponse",
modelProperties: {
serviceEndpoint: {
serializedName: "ServiceEndpoint",
required: true,
xmlName: "ServiceEndpoint",
xmlIsAttribute: true,
type: {
name: "String",
},
},
containerName: {
serializedName: "ContainerName",
required: true,
xmlName: "ContainerName",
xmlIsAttribute: true,
type: {
name: "String",
},
},
prefix: {
serializedName: "Prefix",
xmlName: "Prefix",
type: {
name: "String",
},
},
marker: {
serializedName: "Marker",
xmlName: "Marker",
type: {
name: "String",
},
},
maxPageSize: {
serializedName: "MaxResults",
xmlName: "MaxResults",
type: {
name: "Number",
},
},
delimiter: {
serializedName: "Delimiter",
xmlName: "Delimiter",
type: {
name: "String",
},
},
segment: {
serializedName: "Segment",
xmlName: "Blobs",
type: {
name: "Composite",
className: "BlobHierarchyListSegment",
},
},
continuationToken: {
serializedName: "NextMarker",
xmlName: "NextMarker",
type: {
name: "String",
},
},
},
},
};
const BlobHierarchyListSegment = {
serializedName: "BlobHierarchyListSegment",
xmlName: "Blobs",
type: {
name: "Composite",
className: "BlobHierarchyListSegment",
modelProperties: {
blobPrefixes: {
serializedName: "BlobPrefixes",
xmlName: "BlobPrefixes",
xmlElementName: "BlobPrefix",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "BlobPrefix",
},
},
},
},
blobItems: {
serializedName: "BlobItems",
required: true,
xmlName: "BlobItems",
xmlElementName: "Blob",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "BlobItemInternal",
},
},
},
},
},
},
};
const BlobPrefix = {
serializedName: "BlobPrefix",
type: {
name: "Composite",
className: "BlobPrefix",
modelProperties: {
name: {
serializedName: "Name",
xmlName: "Name",
type: {
name: "Composite",
className: "BlobName",
},
},
},
},
};
const BlockLookupList = {
serializedName: "BlockLookupList",
xmlName: "BlockList",
type: {
name: "Composite",
className: "BlockLookupList",
modelProperties: {
committed: {
serializedName: "Committed",
xmlName: "Committed",
xmlElementName: "Committed",
type: {
name: "Sequence",
element: {
type: {
name: "String",
},
},
},
},
uncommitted: {
serializedName: "Uncommitted",
xmlName: "Uncommitted",
xmlElementName: "Uncommitted",
type: {
name: "Sequence",
element: {
type: {
name: "String",
},
},
},
},
latest: {
serializedName: "Latest",
xmlName: "Latest",
xmlElementName: "Latest",
type: {
name: "Sequence",
element: {
type: {
name: "String",
},
},
},
},
},
},
};
const BlockList = {
serializedName: "BlockList",
type: {
name: "Composite",
className: "BlockList",
modelProperties: {
committedBlocks: {
serializedName: "CommittedBlocks",
xmlName: "CommittedBlocks",
xmlIsWrapped: true,
xmlElementName: "Block",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "Block",
},
},
},
},
uncommittedBlocks: {
serializedName: "UncommittedBlocks",
xmlName: "UncommittedBlocks",
xmlIsWrapped: true,
xmlElementName: "Block",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "Block",
},
},
},
},
},
},
};
const Block = {
serializedName: "Block",
type: {
name: "Composite",
className: "Block",
modelProperties: {
name: {
serializedName: "Name",
required: true,
xmlName: "Name",
type: {
name: "String",
},
},
size: {
serializedName: "Size",
required: true,
xmlName: "Size",
type: {
name: "Number",
},
},
},
},
};
const PageList = {
serializedName: "PageList",
type: {
name: "Composite",
className: "PageList",
modelProperties: {
pageRange: {
serializedName: "PageRange",
xmlName: "PageRange",
xmlElementName: "PageRange",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "PageRange",
},
},
},
},
clearRange: {
serializedName: "ClearRange",
xmlName: "ClearRange",
xmlElementName: "ClearRange",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ClearRange",
},
},
},
},
continuationToken: {
serializedName: "NextMarker",
xmlName: "NextMarker",
type: {
name: "String",
},
},
},
},
};
const PageRange = {
serializedName: "PageRange",
xmlName: "PageRange",
type: {
name: "Composite",
className: "PageRange",
modelProperties: {
start: {
serializedName: "Start",
required: true,
xmlName: "Start",
type: {
name: "Number",
},
},
end: {
serializedName: "End",
required: true,
xmlName: "End",
type: {
name: "Number",
},
},
},
},
};
const ClearRange = {
serializedName: "ClearRange",
xmlName: "ClearRange",
type: {
name: "Composite",
className: "ClearRange",
modelProperties: {
start: {
serializedName: "Start",
required: true,
xmlName: "Start",
type: {
name: "Number",
},
},
end: {
serializedName: "End",
required: true,
xmlName: "End",
type: {
name: "Number",
},
},
},
},
};
const QueryRequest = {
serializedName: "QueryRequest",
xmlName: "QueryRequest",
type: {
name: "Composite",
className: "QueryRequest",
modelProperties: {
queryType: {
serializedName: "QueryType",
required: true,
xmlName: "QueryType",
type: {
name: "String",
},
},
expression: {
serializedName: "Expression",
required: true,
xmlName: "Expression",
type: {
name: "String",
},
},
inputSerialization: {
serializedName: "InputSerialization",
xmlName: "InputSerialization",
type: {
name: "Composite",
className: "QuerySerialization",
},
},
outputSerialization: {
serializedName: "OutputSerialization",
xmlName: "OutputSerialization",
type: {
name: "Composite",
className: "QuerySerialization",
},
},
},
},
};
const QuerySerialization = {
serializedName: "QuerySerialization",
type: {
name: "Composite",
className: "QuerySerialization",
modelProperties: {
format: {
serializedName: "Format",
xmlName: "Format",
type: {
name: "Composite",
className: "QueryFormat",
},
},
},
},
};
const QueryFormat = {
serializedName: "QueryFormat",
type: {
name: "Composite",
className: "QueryFormat",
modelProperties: {
type: {
serializedName: "Type",
required: true,
xmlName: "Type",
type: {
name: "Enum",
allowedValues: ["delimited", "json", "arrow", "parquet"],
},
},
delimitedTextConfiguration: {
serializedName: "DelimitedTextConfiguration",
xmlName: "DelimitedTextConfiguration",
type: {
name: "Composite",
className: "DelimitedTextConfiguration",
},
},
jsonTextConfiguration: {
serializedName: "JsonTextConfiguration",
xmlName: "JsonTextConfiguration",
type: {
name: "Composite",
className: "JsonTextConfiguration",
},
},
arrowConfiguration: {
serializedName: "ArrowConfiguration",
xmlName: "ArrowConfiguration",
type: {
name: "Composite",
className: "ArrowConfiguration",
},
},
parquetTextConfiguration: {
serializedName: "ParquetTextConfiguration",
xmlName: "ParquetTextConfiguration",
type: {
name: "Dictionary",
value: { type: { name: "any" } },
},
},
},
},
};
const DelimitedTextConfiguration = {
serializedName: "DelimitedTextConfiguration",
xmlName: "DelimitedTextConfiguration",
type: {
name: "Composite",
className: "DelimitedTextConfiguration",
modelProperties: {
columnSeparator: {
serializedName: "ColumnSeparator",
xmlName: "ColumnSeparator",
type: {
name: "String",
},
},
fieldQuote: {
serializedName: "FieldQuote",
xmlName: "FieldQuote",
type: {
name: "String",
},
},
recordSeparator: {
serializedName: "RecordSeparator",
xmlName: "RecordSeparator",
type: {
name: "String",
},
},
escapeChar: {
serializedName: "EscapeChar",
xmlName: "EscapeChar",
type: {
name: "String",
},
},
headersPresent: {
serializedName: "HeadersPresent",
xmlName: "HasHeaders",
type: {
name: "Boolean",
},
},
},
},
};
const JsonTextConfiguration = {
serializedName: "JsonTextConfiguration",
xmlName: "JsonTextConfiguration",
type: {
name: "Composite",
className: "JsonTextConfiguration",
modelProperties: {
recordSeparator: {
serializedName: "RecordSeparator",
xmlName: "RecordSeparator",
type: {
name: "String",
},
},
},
},
};
const ArrowConfiguration = {
serializedName: "ArrowConfiguration",
xmlName: "ArrowConfiguration",
type: {
name: "Composite",
className: "ArrowConfiguration",
modelProperties: {
schema: {
serializedName: "Schema",
required: true,
xmlName: "Schema",
xmlIsWrapped: true,
xmlElementName: "Field",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ArrowField",
},
},
},
},
},
},
};
const ArrowField = {
serializedName: "ArrowField",
xmlName: "Field",
type: {
name: "Composite",
className: "ArrowField",
modelProperties: {
type: {
serializedName: "Type",
required: true,
xmlName: "Type",
type: {
name: "String",
},
},
name: {
serializedName: "Name",
xmlName: "Name",
type: {
name: "String",
},
},
precision: {
serializedName: "Precision",
xmlName: "Precision",
type: {
name: "Number",
},
},
scale: {
serializedName: "Scale",
xmlName: "Scale",
type: {
name: "Number",
},
},
},
},
};
const ServiceSetPropertiesHeaders = {
serializedName: "Service_setPropertiesHeaders",
type: {
name: "Composite",
className: "ServiceSetPropertiesHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceSetPropertiesExceptionHeaders = {
serializedName: "Service_setPropertiesExceptionHeaders",
type: {
name: "Composite",
className: "ServiceSetPropertiesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceGetPropertiesHeaders = {
serializedName: "Service_getPropertiesHeaders",
type: {
name: "Composite",
className: "ServiceGetPropertiesHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceGetPropertiesExceptionHeaders = {
serializedName: "Service_getPropertiesExceptionHeaders",
type: {
name: "Composite",
className: "ServiceGetPropertiesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceGetStatisticsHeaders = {
serializedName: "Service_getStatisticsHeaders",
type: {
name: "Composite",
className: "ServiceGetStatisticsHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceGetStatisticsExceptionHeaders = {
serializedName: "Service_getStatisticsExceptionHeaders",
type: {
name: "Composite",
className: "ServiceGetStatisticsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceListContainersSegmentHeaders = {
serializedName: "Service_listContainersSegmentHeaders",
type: {
name: "Composite",
className: "ServiceListContainersSegmentHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceListContainersSegmentExceptionHeaders = {
serializedName: "Service_listContainersSegmentExceptionHeaders",
type: {
name: "Composite",
className: "ServiceListContainersSegmentExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceGetUserDelegationKeyHeaders = {
serializedName: "Service_getUserDelegationKeyHeaders",
type: {
name: "Composite",
className: "ServiceGetUserDelegationKeyHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceGetUserDelegationKeyExceptionHeaders = {
serializedName: "Service_getUserDelegationKeyExceptionHeaders",
type: {
name: "Composite",
className: "ServiceGetUserDelegationKeyExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceGetAccountInfoHeaders = {
serializedName: "Service_getAccountInfoHeaders",
type: {
name: "Composite",
className: "ServiceGetAccountInfoHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
skuName: {
serializedName: "x-ms-sku-name",
xmlName: "x-ms-sku-name",
type: {
name: "Enum",
allowedValues: [
"Standard_LRS",
"Standard_GRS",
"Standard_RAGRS",
"Standard_ZRS",
"Premium_LRS",
],
},
},
accountKind: {
serializedName: "x-ms-account-kind",
xmlName: "x-ms-account-kind",
type: {
name: "Enum",
allowedValues: [
"Storage",
"BlobStorage",
"StorageV2",
"FileStorage",
"BlockBlobStorage",
],
},
},
isHierarchicalNamespaceEnabled: {
serializedName: "x-ms-is-hns-enabled",
xmlName: "x-ms-is-hns-enabled",
type: {
name: "Boolean",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceGetAccountInfoExceptionHeaders = {
serializedName: "Service_getAccountInfoExceptionHeaders",
type: {
name: "Composite",
className: "ServiceGetAccountInfoExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceSubmitBatchHeaders = {
serializedName: "Service_submitBatchHeaders",
type: {
name: "Composite",
className: "ServiceSubmitBatchHeaders",
modelProperties: {
contentType: {
serializedName: "content-type",
xmlName: "content-type",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceSubmitBatchExceptionHeaders = {
serializedName: "Service_submitBatchExceptionHeaders",
type: {
name: "Composite",
className: "ServiceSubmitBatchExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceFilterBlobsHeaders = {
serializedName: "Service_filterBlobsHeaders",
type: {
name: "Composite",
className: "ServiceFilterBlobsHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ServiceFilterBlobsExceptionHeaders = {
serializedName: "Service_filterBlobsExceptionHeaders",
type: {
name: "Composite",
className: "ServiceFilterBlobsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerCreateHeaders = {
serializedName: "Container_createHeaders",
type: {
name: "Composite",
className: "ContainerCreateHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerCreateExceptionHeaders = {
serializedName: "Container_createExceptionHeaders",
type: {
name: "Composite",
className: "ContainerCreateExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerGetPropertiesHeaders = {
serializedName: "Container_getPropertiesHeaders",
type: {
name: "Composite",
className: "ContainerGetPropertiesHeaders",
modelProperties: {
metadata: {
serializedName: "x-ms-meta",
headerCollectionPrefix: "x-ms-meta-",
xmlName: "x-ms-meta",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
leaseDuration: {
serializedName: "x-ms-lease-duration",
xmlName: "x-ms-lease-duration",
type: {
name: "Enum",
allowedValues: ["infinite", "fixed"],
},
},
leaseState: {
serializedName: "x-ms-lease-state",
xmlName: "x-ms-lease-state",
type: {
name: "Enum",
allowedValues: [
"available",
"leased",
"expired",
"breaking",
"broken",
],
},
},
leaseStatus: {
serializedName: "x-ms-lease-status",
xmlName: "x-ms-lease-status",
type: {
name: "Enum",
allowedValues: ["locked", "unlocked"],
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
blobPublicAccess: {
serializedName: "x-ms-blob-public-access",
xmlName: "x-ms-blob-public-access",
type: {
name: "Enum",
allowedValues: ["container", "blob"],
},
},
hasImmutabilityPolicy: {
serializedName: "x-ms-has-immutability-policy",
xmlName: "x-ms-has-immutability-policy",
type: {
name: "Boolean",
},
},
hasLegalHold: {
serializedName: "x-ms-has-legal-hold",
xmlName: "x-ms-has-legal-hold",
type: {
name: "Boolean",
},
},
defaultEncryptionScope: {
serializedName: "x-ms-default-encryption-scope",
xmlName: "x-ms-default-encryption-scope",
type: {
name: "String",
},
},
denyEncryptionScopeOverride: {
serializedName: "x-ms-deny-encryption-scope-override",
xmlName: "x-ms-deny-encryption-scope-override",
type: {
name: "Boolean",
},
},
isImmutableStorageWithVersioningEnabled: {
serializedName: "x-ms-immutable-storage-with-versioning-enabled",
xmlName: "x-ms-immutable-storage-with-versioning-enabled",
type: {
name: "Boolean",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerGetPropertiesExceptionHeaders = {
serializedName: "Container_getPropertiesExceptionHeaders",
type: {
name: "Composite",
className: "ContainerGetPropertiesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerDeleteHeaders = {
serializedName: "Container_deleteHeaders",
type: {
name: "Composite",
className: "ContainerDeleteHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerDeleteExceptionHeaders = {
serializedName: "Container_deleteExceptionHeaders",
type: {
name: "Composite",
className: "ContainerDeleteExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerSetMetadataHeaders = {
serializedName: "Container_setMetadataHeaders",
type: {
name: "Composite",
className: "ContainerSetMetadataHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerSetMetadataExceptionHeaders = {
serializedName: "Container_setMetadataExceptionHeaders",
type: {
name: "Composite",
className: "ContainerSetMetadataExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerGetAccessPolicyHeaders = {
serializedName: "Container_getAccessPolicyHeaders",
type: {
name: "Composite",
className: "ContainerGetAccessPolicyHeaders",
modelProperties: {
blobPublicAccess: {
serializedName: "x-ms-blob-public-access",
xmlName: "x-ms-blob-public-access",
type: {
name: "Enum",
allowedValues: ["container", "blob"],
},
},
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerGetAccessPolicyExceptionHeaders = {
serializedName: "Container_getAccessPolicyExceptionHeaders",
type: {
name: "Composite",
className: "ContainerGetAccessPolicyExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerSetAccessPolicyHeaders = {
serializedName: "Container_setAccessPolicyHeaders",
type: {
name: "Composite",
className: "ContainerSetAccessPolicyHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerSetAccessPolicyExceptionHeaders = {
serializedName: "Container_setAccessPolicyExceptionHeaders",
type: {
name: "Composite",
className: "ContainerSetAccessPolicyExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerRestoreHeaders = {
serializedName: "Container_restoreHeaders",
type: {
name: "Composite",
className: "ContainerRestoreHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerRestoreExceptionHeaders = {
serializedName: "Container_restoreExceptionHeaders",
type: {
name: "Composite",
className: "ContainerRestoreExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerRenameHeaders = {
serializedName: "Container_renameHeaders",
type: {
name: "Composite",
className: "ContainerRenameHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerRenameExceptionHeaders = {
serializedName: "Container_renameExceptionHeaders",
type: {
name: "Composite",
className: "ContainerRenameExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerSubmitBatchHeaders = {
serializedName: "Container_submitBatchHeaders",
type: {
name: "Composite",
className: "ContainerSubmitBatchHeaders",
modelProperties: {
contentType: {
serializedName: "content-type",
xmlName: "content-type",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
},
},
};
const ContainerSubmitBatchExceptionHeaders = {
serializedName: "Container_submitBatchExceptionHeaders",
type: {
name: "Composite",
className: "ContainerSubmitBatchExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerFilterBlobsHeaders = {
serializedName: "Container_filterBlobsHeaders",
type: {
name: "Composite",
className: "ContainerFilterBlobsHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const ContainerFilterBlobsExceptionHeaders = {
serializedName: "Container_filterBlobsExceptionHeaders",
type: {
name: "Composite",
className: "ContainerFilterBlobsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerAcquireLeaseHeaders = {
serializedName: "Container_acquireLeaseHeaders",
type: {
name: "Composite",
className: "ContainerAcquireLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
leaseId: {
serializedName: "x-ms-lease-id",
xmlName: "x-ms-lease-id",
type: {
name: "String",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const ContainerAcquireLeaseExceptionHeaders = {
serializedName: "Container_acquireLeaseExceptionHeaders",
type: {
name: "Composite",
className: "ContainerAcquireLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerReleaseLeaseHeaders = {
serializedName: "Container_releaseLeaseHeaders",
type: {
name: "Composite",
className: "ContainerReleaseLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const ContainerReleaseLeaseExceptionHeaders = {
serializedName: "Container_releaseLeaseExceptionHeaders",
type: {
name: "Composite",
className: "ContainerReleaseLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerRenewLeaseHeaders = {
serializedName: "Container_renewLeaseHeaders",
type: {
name: "Composite",
className: "ContainerRenewLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
leaseId: {
serializedName: "x-ms-lease-id",
xmlName: "x-ms-lease-id",
type: {
name: "String",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const ContainerRenewLeaseExceptionHeaders = {
serializedName: "Container_renewLeaseExceptionHeaders",
type: {
name: "Composite",
className: "ContainerRenewLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerBreakLeaseHeaders = {
serializedName: "Container_breakLeaseHeaders",
type: {
name: "Composite",
className: "ContainerBreakLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
leaseTime: {
serializedName: "x-ms-lease-time",
xmlName: "x-ms-lease-time",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const ContainerBreakLeaseExceptionHeaders = {
serializedName: "Container_breakLeaseExceptionHeaders",
type: {
name: "Composite",
className: "ContainerBreakLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerChangeLeaseHeaders = {
serializedName: "Container_changeLeaseHeaders",
type: {
name: "Composite",
className: "ContainerChangeLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
leaseId: {
serializedName: "x-ms-lease-id",
xmlName: "x-ms-lease-id",
type: {
name: "String",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const ContainerChangeLeaseExceptionHeaders = {
serializedName: "Container_changeLeaseExceptionHeaders",
type: {
name: "Composite",
className: "ContainerChangeLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerListBlobFlatSegmentHeaders = {
serializedName: "Container_listBlobFlatSegmentHeaders",
type: {
name: "Composite",
className: "ContainerListBlobFlatSegmentHeaders",
modelProperties: {
contentType: {
serializedName: "content-type",
xmlName: "content-type",
type: {
name: "String",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerListBlobFlatSegmentExceptionHeaders = {
serializedName: "Container_listBlobFlatSegmentExceptionHeaders",
type: {
name: "Composite",
className: "ContainerListBlobFlatSegmentExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerListBlobHierarchySegmentHeaders = {
serializedName: "Container_listBlobHierarchySegmentHeaders",
type: {
name: "Composite",
className: "ContainerListBlobHierarchySegmentHeaders",
modelProperties: {
contentType: {
serializedName: "content-type",
xmlName: "content-type",
type: {
name: "String",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerListBlobHierarchySegmentExceptionHeaders = {
serializedName: "Container_listBlobHierarchySegmentExceptionHeaders",
type: {
name: "Composite",
className: "ContainerListBlobHierarchySegmentExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const ContainerGetAccountInfoHeaders = {
serializedName: "Container_getAccountInfoHeaders",
type: {
name: "Composite",
className: "ContainerGetAccountInfoHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
skuName: {
serializedName: "x-ms-sku-name",
xmlName: "x-ms-sku-name",
type: {
name: "Enum",
allowedValues: [
"Standard_LRS",
"Standard_GRS",
"Standard_RAGRS",
"Standard_ZRS",
"Premium_LRS",
],
},
},
accountKind: {
serializedName: "x-ms-account-kind",
xmlName: "x-ms-account-kind",
type: {
name: "Enum",
allowedValues: [
"Storage",
"BlobStorage",
"StorageV2",
"FileStorage",
"BlockBlobStorage",
],
},
},
isHierarchicalNamespaceEnabled: {
serializedName: "x-ms-is-hns-enabled",
xmlName: "x-ms-is-hns-enabled",
type: {
name: "Boolean",
},
},
},
},
};
const ContainerGetAccountInfoExceptionHeaders = {
serializedName: "Container_getAccountInfoExceptionHeaders",
type: {
name: "Composite",
className: "ContainerGetAccountInfoExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobDownloadHeaders = {
serializedName: "Blob_downloadHeaders",
type: {
name: "Composite",
className: "BlobDownloadHeaders",
modelProperties: {
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
createdOn: {
serializedName: "x-ms-creation-time",
xmlName: "x-ms-creation-time",
type: {
name: "DateTimeRfc1123",
},
},
metadata: {
serializedName: "x-ms-meta",
headerCollectionPrefix: "x-ms-meta-",
xmlName: "x-ms-meta",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
objectReplicationPolicyId: {
serializedName: "x-ms-or-policy-id",
xmlName: "x-ms-or-policy-id",
type: {
name: "String",
},
},
objectReplicationRules: {
serializedName: "x-ms-or",
headerCollectionPrefix: "x-ms-or-",
xmlName: "x-ms-or",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
contentLength: {
serializedName: "content-length",
xmlName: "content-length",
type: {
name: "Number",
},
},
contentType: {
serializedName: "content-type",
xmlName: "content-type",
type: {
name: "String",
},
},
contentRange: {
serializedName: "content-range",
xmlName: "content-range",
type: {
name: "String",
},
},
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
contentEncoding: {
serializedName: "content-encoding",
xmlName: "content-encoding",
type: {
name: "String",
},
},
cacheControl: {
serializedName: "cache-control",
xmlName: "cache-control",
type: {
name: "String",
},
},
contentDisposition: {
serializedName: "content-disposition",
xmlName: "content-disposition",
type: {
name: "String",
},
},
contentLanguage: {
serializedName: "content-language",
xmlName: "content-language",
type: {
name: "String",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
blobType: {
serializedName: "x-ms-blob-type",
xmlName: "x-ms-blob-type",
type: {
name: "Enum",
allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"],
},
},
copyCompletedOn: {
serializedName: "x-ms-copy-completion-time",
xmlName: "x-ms-copy-completion-time",
type: {
name: "DateTimeRfc1123",
},
},
copyStatusDescription: {
serializedName: "x-ms-copy-status-description",
xmlName: "x-ms-copy-status-description",
type: {
name: "String",
},
},
copyId: {
serializedName: "x-ms-copy-id",
xmlName: "x-ms-copy-id",
type: {
name: "String",
},
},
copyProgress: {
serializedName: "x-ms-copy-progress",
xmlName: "x-ms-copy-progress",
type: {
name: "String",
},
},
copySource: {
serializedName: "x-ms-copy-source",
xmlName: "x-ms-copy-source",
type: {
name: "String",
},
},
copyStatus: {
serializedName: "x-ms-copy-status",
xmlName: "x-ms-copy-status",
type: {
name: "Enum",
allowedValues: ["pending", "success", "aborted", "failed"],
},
},
leaseDuration: {
serializedName: "x-ms-lease-duration",
xmlName: "x-ms-lease-duration",
type: {
name: "Enum",
allowedValues: ["infinite", "fixed"],
},
},
leaseState: {
serializedName: "x-ms-lease-state",
xmlName: "x-ms-lease-state",
type: {
name: "Enum",
allowedValues: [
"available",
"leased",
"expired",
"breaking",
"broken",
],
},
},
leaseStatus: {
serializedName: "x-ms-lease-status",
xmlName: "x-ms-lease-status",
type: {
name: "Enum",
allowedValues: ["locked", "unlocked"],
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
isCurrentVersion: {
serializedName: "x-ms-is-current-version",
xmlName: "x-ms-is-current-version",
type: {
name: "Boolean",
},
},
acceptRanges: {
serializedName: "accept-ranges",
xmlName: "accept-ranges",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
blobCommittedBlockCount: {
serializedName: "x-ms-blob-committed-block-count",
xmlName: "x-ms-blob-committed-block-count",
type: {
name: "Number",
},
},
isServerEncrypted: {
serializedName: "x-ms-server-encrypted",
xmlName: "x-ms-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
blobContentMD5: {
serializedName: "x-ms-blob-content-md5",
xmlName: "x-ms-blob-content-md5",
type: {
name: "ByteArray",
},
},
tagCount: {
serializedName: "x-ms-tag-count",
xmlName: "x-ms-tag-count",
type: {
name: "Number",
},
},
isSealed: {
serializedName: "x-ms-blob-sealed",
xmlName: "x-ms-blob-sealed",
type: {
name: "Boolean",
},
},
lastAccessed: {
serializedName: "x-ms-last-access-time",
xmlName: "x-ms-last-access-time",
type: {
name: "DateTimeRfc1123",
},
},
immutabilityPolicyExpiresOn: {
serializedName: "x-ms-immutability-policy-until-date",
xmlName: "x-ms-immutability-policy-until-date",
type: {
name: "DateTimeRfc1123",
},
},
immutabilityPolicyMode: {
serializedName: "x-ms-immutability-policy-mode",
xmlName: "x-ms-immutability-policy-mode",
type: {
name: "Enum",
allowedValues: ["Mutable", "Unlocked", "Locked"],
},
},
legalHold: {
serializedName: "x-ms-legal-hold",
xmlName: "x-ms-legal-hold",
type: {
name: "Boolean",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
contentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
},
},
};
const BlobDownloadExceptionHeaders = {
serializedName: "Blob_downloadExceptionHeaders",
type: {
name: "Composite",
className: "BlobDownloadExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobGetPropertiesHeaders = {
serializedName: "Blob_getPropertiesHeaders",
type: {
name: "Composite",
className: "BlobGetPropertiesHeaders",
modelProperties: {
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
createdOn: {
serializedName: "x-ms-creation-time",
xmlName: "x-ms-creation-time",
type: {
name: "DateTimeRfc1123",
},
},
metadata: {
serializedName: "x-ms-meta",
headerCollectionPrefix: "x-ms-meta-",
xmlName: "x-ms-meta",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
objectReplicationPolicyId: {
serializedName: "x-ms-or-policy-id",
xmlName: "x-ms-or-policy-id",
type: {
name: "String",
},
},
objectReplicationRules: {
serializedName: "x-ms-or",
headerCollectionPrefix: "x-ms-or-",
xmlName: "x-ms-or",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
blobType: {
serializedName: "x-ms-blob-type",
xmlName: "x-ms-blob-type",
type: {
name: "Enum",
allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"],
},
},
copyCompletedOn: {
serializedName: "x-ms-copy-completion-time",
xmlName: "x-ms-copy-completion-time",
type: {
name: "DateTimeRfc1123",
},
},
copyStatusDescription: {
serializedName: "x-ms-copy-status-description",
xmlName: "x-ms-copy-status-description",
type: {
name: "String",
},
},
copyId: {
serializedName: "x-ms-copy-id",
xmlName: "x-ms-copy-id",
type: {
name: "String",
},
},
copyProgress: {
serializedName: "x-ms-copy-progress",
xmlName: "x-ms-copy-progress",
type: {
name: "String",
},
},
copySource: {
serializedName: "x-ms-copy-source",
xmlName: "x-ms-copy-source",
type: {
name: "String",
},
},
copyStatus: {
serializedName: "x-ms-copy-status",
xmlName: "x-ms-copy-status",
type: {
name: "Enum",
allowedValues: ["pending", "success", "aborted", "failed"],
},
},
isIncrementalCopy: {
serializedName: "x-ms-incremental-copy",
xmlName: "x-ms-incremental-copy",
type: {
name: "Boolean",
},
},
destinationSnapshot: {
serializedName: "x-ms-copy-destination-snapshot",
xmlName: "x-ms-copy-destination-snapshot",
type: {
name: "String",
},
},
leaseDuration: {
serializedName: "x-ms-lease-duration",
xmlName: "x-ms-lease-duration",
type: {
name: "Enum",
allowedValues: ["infinite", "fixed"],
},
},
leaseState: {
serializedName: "x-ms-lease-state",
xmlName: "x-ms-lease-state",
type: {
name: "Enum",
allowedValues: [
"available",
"leased",
"expired",
"breaking",
"broken",
],
},
},
leaseStatus: {
serializedName: "x-ms-lease-status",
xmlName: "x-ms-lease-status",
type: {
name: "Enum",
allowedValues: ["locked", "unlocked"],
},
},
contentLength: {
serializedName: "content-length",
xmlName: "content-length",
type: {
name: "Number",
},
},
contentType: {
serializedName: "content-type",
xmlName: "content-type",
type: {
name: "String",
},
},
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
contentEncoding: {
serializedName: "content-encoding",
xmlName: "content-encoding",
type: {
name: "String",
},
},
contentDisposition: {
serializedName: "content-disposition",
xmlName: "content-disposition",
type: {
name: "String",
},
},
contentLanguage: {
serializedName: "content-language",
xmlName: "content-language",
type: {
name: "String",
},
},
cacheControl: {
serializedName: "cache-control",
xmlName: "cache-control",
type: {
name: "String",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
acceptRanges: {
serializedName: "accept-ranges",
xmlName: "accept-ranges",
type: {
name: "String",
},
},
blobCommittedBlockCount: {
serializedName: "x-ms-blob-committed-block-count",
xmlName: "x-ms-blob-committed-block-count",
type: {
name: "Number",
},
},
isServerEncrypted: {
serializedName: "x-ms-server-encrypted",
xmlName: "x-ms-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
accessTier: {
serializedName: "x-ms-access-tier",
xmlName: "x-ms-access-tier",
type: {
name: "String",
},
},
accessTierInferred: {
serializedName: "x-ms-access-tier-inferred",
xmlName: "x-ms-access-tier-inferred",
type: {
name: "Boolean",
},
},
archiveStatus: {
serializedName: "x-ms-archive-status",
xmlName: "x-ms-archive-status",
type: {
name: "String",
},
},
accessTierChangedOn: {
serializedName: "x-ms-access-tier-change-time",
xmlName: "x-ms-access-tier-change-time",
type: {
name: "DateTimeRfc1123",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
isCurrentVersion: {
serializedName: "x-ms-is-current-version",
xmlName: "x-ms-is-current-version",
type: {
name: "Boolean",
},
},
tagCount: {
serializedName: "x-ms-tag-count",
xmlName: "x-ms-tag-count",
type: {
name: "Number",
},
},
expiresOn: {
serializedName: "x-ms-expiry-time",
xmlName: "x-ms-expiry-time",
type: {
name: "DateTimeRfc1123",
},
},
isSealed: {
serializedName: "x-ms-blob-sealed",
xmlName: "x-ms-blob-sealed",
type: {
name: "Boolean",
},
},
rehydratePriority: {
serializedName: "x-ms-rehydrate-priority",
xmlName: "x-ms-rehydrate-priority",
type: {
name: "Enum",
allowedValues: ["High", "Standard"],
},
},
lastAccessed: {
serializedName: "x-ms-last-access-time",
xmlName: "x-ms-last-access-time",
type: {
name: "DateTimeRfc1123",
},
},
immutabilityPolicyExpiresOn: {
serializedName: "x-ms-immutability-policy-until-date",
xmlName: "x-ms-immutability-policy-until-date",
type: {
name: "DateTimeRfc1123",
},
},
immutabilityPolicyMode: {
serializedName: "x-ms-immutability-policy-mode",
xmlName: "x-ms-immutability-policy-mode",
type: {
name: "Enum",
allowedValues: ["Mutable", "Unlocked", "Locked"],
},
},
legalHold: {
serializedName: "x-ms-legal-hold",
xmlName: "x-ms-legal-hold",
type: {
name: "Boolean",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobGetPropertiesExceptionHeaders = {
serializedName: "Blob_getPropertiesExceptionHeaders",
type: {
name: "Composite",
className: "BlobGetPropertiesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobDeleteHeaders = {
serializedName: "Blob_deleteHeaders",
type: {
name: "Composite",
className: "BlobDeleteHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobDeleteExceptionHeaders = {
serializedName: "Blob_deleteExceptionHeaders",
type: {
name: "Composite",
className: "BlobDeleteExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobUndeleteHeaders = {
serializedName: "Blob_undeleteHeaders",
type: {
name: "Composite",
className: "BlobUndeleteHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobUndeleteExceptionHeaders = {
serializedName: "Blob_undeleteExceptionHeaders",
type: {
name: "Composite",
className: "BlobUndeleteExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetExpiryHeaders = {
serializedName: "Blob_setExpiryHeaders",
type: {
name: "Composite",
className: "BlobSetExpiryHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const BlobSetExpiryExceptionHeaders = {
serializedName: "Blob_setExpiryExceptionHeaders",
type: {
name: "Composite",
className: "BlobSetExpiryExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetHttpHeadersHeaders = {
serializedName: "Blob_setHttpHeadersHeaders",
type: {
name: "Composite",
className: "BlobSetHttpHeadersHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetHttpHeadersExceptionHeaders = {
serializedName: "Blob_setHttpHeadersExceptionHeaders",
type: {
name: "Composite",
className: "BlobSetHttpHeadersExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetImmutabilityPolicyHeaders = {
serializedName: "Blob_setImmutabilityPolicyHeaders",
type: {
name: "Composite",
className: "BlobSetImmutabilityPolicyHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
immutabilityPolicyExpiry: {
serializedName: "x-ms-immutability-policy-until-date",
xmlName: "x-ms-immutability-policy-until-date",
type: {
name: "DateTimeRfc1123",
},
},
immutabilityPolicyMode: {
serializedName: "x-ms-immutability-policy-mode",
xmlName: "x-ms-immutability-policy-mode",
type: {
name: "Enum",
allowedValues: ["Mutable", "Unlocked", "Locked"],
},
},
},
},
};
const BlobSetImmutabilityPolicyExceptionHeaders = {
serializedName: "Blob_setImmutabilityPolicyExceptionHeaders",
type: {
name: "Composite",
className: "BlobSetImmutabilityPolicyExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobDeleteImmutabilityPolicyHeaders = {
serializedName: "Blob_deleteImmutabilityPolicyHeaders",
type: {
name: "Composite",
className: "BlobDeleteImmutabilityPolicyHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const BlobDeleteImmutabilityPolicyExceptionHeaders = {
serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders",
type: {
name: "Composite",
className: "BlobDeleteImmutabilityPolicyExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetLegalHoldHeaders = {
serializedName: "Blob_setLegalHoldHeaders",
type: {
name: "Composite",
className: "BlobSetLegalHoldHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
legalHold: {
serializedName: "x-ms-legal-hold",
xmlName: "x-ms-legal-hold",
type: {
name: "Boolean",
},
},
},
},
};
const BlobSetLegalHoldExceptionHeaders = {
serializedName: "Blob_setLegalHoldExceptionHeaders",
type: {
name: "Composite",
className: "BlobSetLegalHoldExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetMetadataHeaders = {
serializedName: "Blob_setMetadataHeaders",
type: {
name: "Composite",
className: "BlobSetMetadataHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetMetadataExceptionHeaders = {
serializedName: "Blob_setMetadataExceptionHeaders",
type: {
name: "Composite",
className: "BlobSetMetadataExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobAcquireLeaseHeaders = {
serializedName: "Blob_acquireLeaseHeaders",
type: {
name: "Composite",
className: "BlobAcquireLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
leaseId: {
serializedName: "x-ms-lease-id",
xmlName: "x-ms-lease-id",
type: {
name: "String",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const BlobAcquireLeaseExceptionHeaders = {
serializedName: "Blob_acquireLeaseExceptionHeaders",
type: {
name: "Composite",
className: "BlobAcquireLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobReleaseLeaseHeaders = {
serializedName: "Blob_releaseLeaseHeaders",
type: {
name: "Composite",
className: "BlobReleaseLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const BlobReleaseLeaseExceptionHeaders = {
serializedName: "Blob_releaseLeaseExceptionHeaders",
type: {
name: "Composite",
className: "BlobReleaseLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobRenewLeaseHeaders = {
serializedName: "Blob_renewLeaseHeaders",
type: {
name: "Composite",
className: "BlobRenewLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
leaseId: {
serializedName: "x-ms-lease-id",
xmlName: "x-ms-lease-id",
type: {
name: "String",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const BlobRenewLeaseExceptionHeaders = {
serializedName: "Blob_renewLeaseExceptionHeaders",
type: {
name: "Composite",
className: "BlobRenewLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobChangeLeaseHeaders = {
serializedName: "Blob_changeLeaseHeaders",
type: {
name: "Composite",
className: "BlobChangeLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
leaseId: {
serializedName: "x-ms-lease-id",
xmlName: "x-ms-lease-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const BlobChangeLeaseExceptionHeaders = {
serializedName: "Blob_changeLeaseExceptionHeaders",
type: {
name: "Composite",
className: "BlobChangeLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobBreakLeaseHeaders = {
serializedName: "Blob_breakLeaseHeaders",
type: {
name: "Composite",
className: "BlobBreakLeaseHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
leaseTime: {
serializedName: "x-ms-lease-time",
xmlName: "x-ms-lease-time",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
},
},
};
const BlobBreakLeaseExceptionHeaders = {
serializedName: "Blob_breakLeaseExceptionHeaders",
type: {
name: "Composite",
className: "BlobBreakLeaseExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobCreateSnapshotHeaders = {
serializedName: "Blob_createSnapshotHeaders",
type: {
name: "Composite",
className: "BlobCreateSnapshotHeaders",
modelProperties: {
snapshot: {
serializedName: "x-ms-snapshot",
xmlName: "x-ms-snapshot",
type: {
name: "String",
},
},
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobCreateSnapshotExceptionHeaders = {
serializedName: "Blob_createSnapshotExceptionHeaders",
type: {
name: "Composite",
className: "BlobCreateSnapshotExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobStartCopyFromURLHeaders = {
serializedName: "Blob_startCopyFromURLHeaders",
type: {
name: "Composite",
className: "BlobStartCopyFromURLHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
copyId: {
serializedName: "x-ms-copy-id",
xmlName: "x-ms-copy-id",
type: {
name: "String",
},
},
copyStatus: {
serializedName: "x-ms-copy-status",
xmlName: "x-ms-copy-status",
type: {
name: "Enum",
allowedValues: ["pending", "success", "aborted", "failed"],
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobStartCopyFromURLExceptionHeaders = {
serializedName: "Blob_startCopyFromURLExceptionHeaders",
type: {
name: "Composite",
className: "BlobStartCopyFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobCopyFromURLHeaders = {
serializedName: "Blob_copyFromURLHeaders",
type: {
name: "Composite",
className: "BlobCopyFromURLHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
copyId: {
serializedName: "x-ms-copy-id",
xmlName: "x-ms-copy-id",
type: {
name: "String",
},
},
copyStatus: {
defaultValue: "success",
isConstant: true,
serializedName: "x-ms-copy-status",
type: {
name: "String",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
xMsContentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobCopyFromURLExceptionHeaders = {
serializedName: "Blob_copyFromURLExceptionHeaders",
type: {
name: "Composite",
className: "BlobCopyFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobAbortCopyFromURLHeaders = {
serializedName: "Blob_abortCopyFromURLHeaders",
type: {
name: "Composite",
className: "BlobAbortCopyFromURLHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobAbortCopyFromURLExceptionHeaders = {
serializedName: "Blob_abortCopyFromURLExceptionHeaders",
type: {
name: "Composite",
className: "BlobAbortCopyFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetTierHeaders = {
serializedName: "Blob_setTierHeaders",
type: {
name: "Composite",
className: "BlobSetTierHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetTierExceptionHeaders = {
serializedName: "Blob_setTierExceptionHeaders",
type: {
name: "Composite",
className: "BlobSetTierExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobGetAccountInfoHeaders = {
serializedName: "Blob_getAccountInfoHeaders",
type: {
name: "Composite",
className: "BlobGetAccountInfoHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
skuName: {
serializedName: "x-ms-sku-name",
xmlName: "x-ms-sku-name",
type: {
name: "Enum",
allowedValues: [
"Standard_LRS",
"Standard_GRS",
"Standard_RAGRS",
"Standard_ZRS",
"Premium_LRS",
],
},
},
accountKind: {
serializedName: "x-ms-account-kind",
xmlName: "x-ms-account-kind",
type: {
name: "Enum",
allowedValues: [
"Storage",
"BlobStorage",
"StorageV2",
"FileStorage",
"BlockBlobStorage",
],
},
},
isHierarchicalNamespaceEnabled: {
serializedName: "x-ms-is-hns-enabled",
xmlName: "x-ms-is-hns-enabled",
type: {
name: "Boolean",
},
},
},
},
};
const BlobGetAccountInfoExceptionHeaders = {
serializedName: "Blob_getAccountInfoExceptionHeaders",
type: {
name: "Composite",
className: "BlobGetAccountInfoExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobQueryHeaders = {
serializedName: "Blob_queryHeaders",
type: {
name: "Composite",
className: "BlobQueryHeaders",
modelProperties: {
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
metadata: {
serializedName: "x-ms-meta",
headerCollectionPrefix: "x-ms-meta-",
xmlName: "x-ms-meta",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
contentLength: {
serializedName: "content-length",
xmlName: "content-length",
type: {
name: "Number",
},
},
contentType: {
serializedName: "content-type",
xmlName: "content-type",
type: {
name: "String",
},
},
contentRange: {
serializedName: "content-range",
xmlName: "content-range",
type: {
name: "String",
},
},
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
contentEncoding: {
serializedName: "content-encoding",
xmlName: "content-encoding",
type: {
name: "String",
},
},
cacheControl: {
serializedName: "cache-control",
xmlName: "cache-control",
type: {
name: "String",
},
},
contentDisposition: {
serializedName: "content-disposition",
xmlName: "content-disposition",
type: {
name: "String",
},
},
contentLanguage: {
serializedName: "content-language",
xmlName: "content-language",
type: {
name: "String",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
blobType: {
serializedName: "x-ms-blob-type",
xmlName: "x-ms-blob-type",
type: {
name: "Enum",
allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"],
},
},
copyCompletionTime: {
serializedName: "x-ms-copy-completion-time",
xmlName: "x-ms-copy-completion-time",
type: {
name: "DateTimeRfc1123",
},
},
copyStatusDescription: {
serializedName: "x-ms-copy-status-description",
xmlName: "x-ms-copy-status-description",
type: {
name: "String",
},
},
copyId: {
serializedName: "x-ms-copy-id",
xmlName: "x-ms-copy-id",
type: {
name: "String",
},
},
copyProgress: {
serializedName: "x-ms-copy-progress",
xmlName: "x-ms-copy-progress",
type: {
name: "String",
},
},
copySource: {
serializedName: "x-ms-copy-source",
xmlName: "x-ms-copy-source",
type: {
name: "String",
},
},
copyStatus: {
serializedName: "x-ms-copy-status",
xmlName: "x-ms-copy-status",
type: {
name: "Enum",
allowedValues: ["pending", "success", "aborted", "failed"],
},
},
leaseDuration: {
serializedName: "x-ms-lease-duration",
xmlName: "x-ms-lease-duration",
type: {
name: "Enum",
allowedValues: ["infinite", "fixed"],
},
},
leaseState: {
serializedName: "x-ms-lease-state",
xmlName: "x-ms-lease-state",
type: {
name: "Enum",
allowedValues: [
"available",
"leased",
"expired",
"breaking",
"broken",
],
},
},
leaseStatus: {
serializedName: "x-ms-lease-status",
xmlName: "x-ms-lease-status",
type: {
name: "Enum",
allowedValues: ["locked", "unlocked"],
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
acceptRanges: {
serializedName: "accept-ranges",
xmlName: "accept-ranges",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
blobCommittedBlockCount: {
serializedName: "x-ms-blob-committed-block-count",
xmlName: "x-ms-blob-committed-block-count",
type: {
name: "Number",
},
},
isServerEncrypted: {
serializedName: "x-ms-server-encrypted",
xmlName: "x-ms-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
blobContentMD5: {
serializedName: "x-ms-blob-content-md5",
xmlName: "x-ms-blob-content-md5",
type: {
name: "ByteArray",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
contentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
},
},
};
const BlobQueryExceptionHeaders = {
serializedName: "Blob_queryExceptionHeaders",
type: {
name: "Composite",
className: "BlobQueryExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobGetTagsHeaders = {
serializedName: "Blob_getTagsHeaders",
type: {
name: "Composite",
className: "BlobGetTagsHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobGetTagsExceptionHeaders = {
serializedName: "Blob_getTagsExceptionHeaders",
type: {
name: "Composite",
className: "BlobGetTagsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetTagsHeaders = {
serializedName: "Blob_setTagsHeaders",
type: {
name: "Composite",
className: "BlobSetTagsHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlobSetTagsExceptionHeaders = {
serializedName: "Blob_setTagsExceptionHeaders",
type: {
name: "Composite",
className: "BlobSetTagsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobCreateHeaders = {
serializedName: "PageBlob_createHeaders",
type: {
name: "Composite",
className: "PageBlobCreateHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobCreateExceptionHeaders = {
serializedName: "PageBlob_createExceptionHeaders",
type: {
name: "Composite",
className: "PageBlobCreateExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobUploadPagesHeaders = {
serializedName: "PageBlob_uploadPagesHeaders",
type: {
name: "Composite",
className: "PageBlobUploadPagesHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
xMsContentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobUploadPagesExceptionHeaders = {
serializedName: "PageBlob_uploadPagesExceptionHeaders",
type: {
name: "Composite",
className: "PageBlobUploadPagesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobClearPagesHeaders = {
serializedName: "PageBlob_clearPagesHeaders",
type: {
name: "Composite",
className: "PageBlobClearPagesHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
xMsContentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobClearPagesExceptionHeaders = {
serializedName: "PageBlob_clearPagesExceptionHeaders",
type: {
name: "Composite",
className: "PageBlobClearPagesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobUploadPagesFromURLHeaders = {
serializedName: "PageBlob_uploadPagesFromURLHeaders",
type: {
name: "Composite",
className: "PageBlobUploadPagesFromURLHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
xMsContentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobUploadPagesFromURLExceptionHeaders = {
serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders",
type: {
name: "Composite",
className: "PageBlobUploadPagesFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobGetPageRangesHeaders = {
serializedName: "PageBlob_getPageRangesHeaders",
type: {
name: "Composite",
className: "PageBlobGetPageRangesHeaders",
modelProperties: {
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
blobContentLength: {
serializedName: "x-ms-blob-content-length",
xmlName: "x-ms-blob-content-length",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobGetPageRangesExceptionHeaders = {
serializedName: "PageBlob_getPageRangesExceptionHeaders",
type: {
name: "Composite",
className: "PageBlobGetPageRangesExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobGetPageRangesDiffHeaders = {
serializedName: "PageBlob_getPageRangesDiffHeaders",
type: {
name: "Composite",
className: "PageBlobGetPageRangesDiffHeaders",
modelProperties: {
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
blobContentLength: {
serializedName: "x-ms-blob-content-length",
xmlName: "x-ms-blob-content-length",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobGetPageRangesDiffExceptionHeaders = {
serializedName: "PageBlob_getPageRangesDiffExceptionHeaders",
type: {
name: "Composite",
className: "PageBlobGetPageRangesDiffExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobResizeHeaders = {
serializedName: "PageBlob_resizeHeaders",
type: {
name: "Composite",
className: "PageBlobResizeHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobResizeExceptionHeaders = {
serializedName: "PageBlob_resizeExceptionHeaders",
type: {
name: "Composite",
className: "PageBlobResizeExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobUpdateSequenceNumberHeaders = {
serializedName: "PageBlob_updateSequenceNumberHeaders",
type: {
name: "Composite",
className: "PageBlobUpdateSequenceNumberHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
blobSequenceNumber: {
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobUpdateSequenceNumberExceptionHeaders = {
serializedName: "PageBlob_updateSequenceNumberExceptionHeaders",
type: {
name: "Composite",
className: "PageBlobUpdateSequenceNumberExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobCopyIncrementalHeaders = {
serializedName: "PageBlob_copyIncrementalHeaders",
type: {
name: "Composite",
className: "PageBlobCopyIncrementalHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
copyId: {
serializedName: "x-ms-copy-id",
xmlName: "x-ms-copy-id",
type: {
name: "String",
},
},
copyStatus: {
serializedName: "x-ms-copy-status",
xmlName: "x-ms-copy-status",
type: {
name: "Enum",
allowedValues: ["pending", "success", "aborted", "failed"],
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const PageBlobCopyIncrementalExceptionHeaders = {
serializedName: "PageBlob_copyIncrementalExceptionHeaders",
type: {
name: "Composite",
className: "PageBlobCopyIncrementalExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const AppendBlobCreateHeaders = {
serializedName: "AppendBlob_createHeaders",
type: {
name: "Composite",
className: "AppendBlobCreateHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const AppendBlobCreateExceptionHeaders = {
serializedName: "AppendBlob_createExceptionHeaders",
type: {
name: "Composite",
className: "AppendBlobCreateExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const AppendBlobAppendBlockHeaders = {
serializedName: "AppendBlob_appendBlockHeaders",
type: {
name: "Composite",
className: "AppendBlobAppendBlockHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
xMsContentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
blobAppendOffset: {
serializedName: "x-ms-blob-append-offset",
xmlName: "x-ms-blob-append-offset",
type: {
name: "String",
},
},
blobCommittedBlockCount: {
serializedName: "x-ms-blob-committed-block-count",
xmlName: "x-ms-blob-committed-block-count",
type: {
name: "Number",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const AppendBlobAppendBlockExceptionHeaders = {
serializedName: "AppendBlob_appendBlockExceptionHeaders",
type: {
name: "Composite",
className: "AppendBlobAppendBlockExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const AppendBlobAppendBlockFromUrlHeaders = {
serializedName: "AppendBlob_appendBlockFromUrlHeaders",
type: {
name: "Composite",
className: "AppendBlobAppendBlockFromUrlHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
xMsContentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
blobAppendOffset: {
serializedName: "x-ms-blob-append-offset",
xmlName: "x-ms-blob-append-offset",
type: {
name: "String",
},
},
blobCommittedBlockCount: {
serializedName: "x-ms-blob-committed-block-count",
xmlName: "x-ms-blob-committed-block-count",
type: {
name: "Number",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const AppendBlobAppendBlockFromUrlExceptionHeaders = {
serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders",
type: {
name: "Composite",
className: "AppendBlobAppendBlockFromUrlExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const AppendBlobSealHeaders = {
serializedName: "AppendBlob_sealHeaders",
type: {
name: "Composite",
className: "AppendBlobSealHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isSealed: {
serializedName: "x-ms-blob-sealed",
xmlName: "x-ms-blob-sealed",
type: {
name: "Boolean",
},
},
},
},
};
const AppendBlobSealExceptionHeaders = {
serializedName: "AppendBlob_sealExceptionHeaders",
type: {
name: "Composite",
className: "AppendBlobSealExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobUploadHeaders = {
serializedName: "BlockBlob_uploadHeaders",
type: {
name: "Composite",
className: "BlockBlobUploadHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobUploadExceptionHeaders = {
serializedName: "BlockBlob_uploadExceptionHeaders",
type: {
name: "Composite",
className: "BlockBlobUploadExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobPutBlobFromUrlHeaders = {
serializedName: "BlockBlob_putBlobFromUrlHeaders",
type: {
name: "Composite",
className: "BlockBlobPutBlobFromUrlHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobPutBlobFromUrlExceptionHeaders = {
serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders",
type: {
name: "Composite",
className: "BlockBlobPutBlobFromUrlExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobStageBlockHeaders = {
serializedName: "BlockBlob_stageBlockHeaders",
type: {
name: "Composite",
className: "BlockBlobStageBlockHeaders",
modelProperties: {
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
xMsContentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobStageBlockExceptionHeaders = {
serializedName: "BlockBlob_stageBlockExceptionHeaders",
type: {
name: "Composite",
className: "BlockBlobStageBlockExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobStageBlockFromURLHeaders = {
serializedName: "BlockBlob_stageBlockFromURLHeaders",
type: {
name: "Composite",
className: "BlockBlobStageBlockFromURLHeaders",
modelProperties: {
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
xMsContentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobStageBlockFromURLExceptionHeaders = {
serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders",
type: {
name: "Composite",
className: "BlockBlobStageBlockFromURLExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobCommitBlockListHeaders = {
serializedName: "BlockBlob_commitBlockListHeaders",
type: {
name: "Composite",
className: "BlockBlobCommitBlockListHeaders",
modelProperties: {
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
contentMD5: {
serializedName: "content-md5",
xmlName: "content-md5",
type: {
name: "ByteArray",
},
},
xMsContentCrc64: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
versionId: {
serializedName: "x-ms-version-id",
xmlName: "x-ms-version-id",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
isServerEncrypted: {
serializedName: "x-ms-request-server-encrypted",
xmlName: "x-ms-request-server-encrypted",
type: {
name: "Boolean",
},
},
encryptionKeySha256: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobCommitBlockListExceptionHeaders = {
serializedName: "BlockBlob_commitBlockListExceptionHeaders",
type: {
name: "Composite",
className: "BlockBlobCommitBlockListExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobGetBlockListHeaders = {
serializedName: "BlockBlob_getBlockListHeaders",
type: {
name: "Composite",
className: "BlockBlobGetBlockListHeaders",
modelProperties: {
lastModified: {
serializedName: "last-modified",
xmlName: "last-modified",
type: {
name: "DateTimeRfc1123",
},
},
etag: {
serializedName: "etag",
xmlName: "etag",
type: {
name: "String",
},
},
contentType: {
serializedName: "content-type",
xmlName: "content-type",
type: {
name: "String",
},
},
blobContentLength: {
serializedName: "x-ms-blob-content-length",
xmlName: "x-ms-blob-content-length",
type: {
name: "Number",
},
},
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String",
},
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String",
},
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123",
},
},
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
const BlockBlobGetBlockListExceptionHeaders = {
serializedName: "BlockBlob_getBlockListExceptionHeaders",
type: {
name: "Composite",
className: "BlockBlobGetBlockListExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String",
},
},
},
},
};
var Mappers = /*#__PURE__*/Object.freeze({
__proto__: null,
AccessPolicy: AccessPolicy,
AppendBlobAppendBlockExceptionHeaders: AppendBlobAppendBlockExceptionHeaders,
AppendBlobAppendBlockFromUrlExceptionHeaders: AppendBlobAppendBlockFromUrlExceptionHeaders,
AppendBlobAppendBlockFromUrlHeaders: AppendBlobAppendBlockFromUrlHeaders,
AppendBlobAppendBlockHeaders: AppendBlobAppendBlockHeaders,
AppendBlobCreateExceptionHeaders: AppendBlobCreateExceptionHeaders,
AppendBlobCreateHeaders: AppendBlobCreateHeaders,
AppendBlobSealExceptionHeaders: AppendBlobSealExceptionHeaders,
AppendBlobSealHeaders: AppendBlobSealHeaders,
ArrowConfiguration: ArrowConfiguration,
ArrowField: ArrowField,
BlobAbortCopyFromURLExceptionHeaders: BlobAbortCopyFromURLExceptionHeaders,
BlobAbortCopyFromURLHeaders: BlobAbortCopyFromURLHeaders,
BlobAcquireLeaseExceptionHeaders: BlobAcquireLeaseExceptionHeaders,
BlobAcquireLeaseHeaders: BlobAcquireLeaseHeaders,
BlobBreakLeaseExceptionHeaders: BlobBreakLeaseExceptionHeaders,
BlobBreakLeaseHeaders: BlobBreakLeaseHeaders,
BlobChangeLeaseExceptionHeaders: BlobChangeLeaseExceptionHeaders,
BlobChangeLeaseHeaders: BlobChangeLeaseHeaders,
BlobCopyFromURLExceptionHeaders: BlobCopyFromURLExceptionHeaders,
BlobCopyFromURLHeaders: BlobCopyFromURLHeaders,
BlobCreateSnapshotExceptionHeaders: BlobCreateSnapshotExceptionHeaders,
BlobCreateSnapshotHeaders: BlobCreateSnapshotHeaders,
BlobDeleteExceptionHeaders: BlobDeleteExceptionHeaders,
BlobDeleteHeaders: BlobDeleteHeaders,
BlobDeleteImmutabilityPolicyExceptionHeaders: BlobDeleteImmutabilityPolicyExceptionHeaders,
BlobDeleteImmutabilityPolicyHeaders: BlobDeleteImmutabilityPolicyHeaders,
BlobDownloadExceptionHeaders: BlobDownloadExceptionHeaders,
BlobDownloadHeaders: BlobDownloadHeaders,
BlobFlatListSegment: BlobFlatListSegment,
BlobGetAccountInfoExceptionHeaders: BlobGetAccountInfoExceptionHeaders,
BlobGetAccountInfoHeaders: BlobGetAccountInfoHeaders,
BlobGetPropertiesExceptionHeaders: BlobGetPropertiesExceptionHeaders,
BlobGetPropertiesHeaders: BlobGetPropertiesHeaders,
BlobGetTagsExceptionHeaders: BlobGetTagsExceptionHeaders,
BlobGetTagsHeaders: BlobGetTagsHeaders,
BlobHierarchyListSegment: BlobHierarchyListSegment,
BlobItemInternal: BlobItemInternal,
BlobName: BlobName,
BlobPrefix: BlobPrefix,
BlobPropertiesInternal: BlobPropertiesInternal,
BlobQueryExceptionHeaders: BlobQueryExceptionHeaders,
BlobQueryHeaders: BlobQueryHeaders,
BlobReleaseLeaseExceptionHeaders: BlobReleaseLeaseExceptionHeaders,
BlobReleaseLeaseHeaders: BlobReleaseLeaseHeaders,
BlobRenewLeaseExceptionHeaders: BlobRenewLeaseExceptionHeaders,
BlobRenewLeaseHeaders: BlobRenewLeaseHeaders,
BlobServiceProperties: BlobServiceProperties,
BlobServiceStatistics: BlobServiceStatistics,
BlobSetExpiryExceptionHeaders: BlobSetExpiryExceptionHeaders,
BlobSetExpiryHeaders: BlobSetExpiryHeaders,
BlobSetHttpHeadersExceptionHeaders: BlobSetHttpHeadersExceptionHeaders,
BlobSetHttpHeadersHeaders: BlobSetHttpHeadersHeaders,
BlobSetImmutabilityPolicyExceptionHeaders: BlobSetImmutabilityPolicyExceptionHeaders,
BlobSetImmutabilityPolicyHeaders: BlobSetImmutabilityPolicyHeaders,
BlobSetLegalHoldExceptionHeaders: BlobSetLegalHoldExceptionHeaders,
BlobSetLegalHoldHeaders: BlobSetLegalHoldHeaders,
BlobSetMetadataExceptionHeaders: BlobSetMetadataExceptionHeaders,
BlobSetMetadataHeaders: BlobSetMetadataHeaders,
BlobSetTagsExceptionHeaders: BlobSetTagsExceptionHeaders,
BlobSetTagsHeaders: BlobSetTagsHeaders,
BlobSetTierExceptionHeaders: BlobSetTierExceptionHeaders,
BlobSetTierHeaders: BlobSetTierHeaders,
BlobStartCopyFromURLExceptionHeaders: BlobStartCopyFromURLExceptionHeaders,
BlobStartCopyFromURLHeaders: BlobStartCopyFromURLHeaders,
BlobTag: BlobTag,
BlobTags: BlobTags,
BlobUndeleteExceptionHeaders: BlobUndeleteExceptionHeaders,
BlobUndeleteHeaders: BlobUndeleteHeaders,
Block: Block,
BlockBlobCommitBlockListExceptionHeaders: BlockBlobCommitBlockListExceptionHeaders,
BlockBlobCommitBlockListHeaders: BlockBlobCommitBlockListHeaders,
BlockBlobGetBlockListExceptionHeaders: BlockBlobGetBlockListExceptionHeaders,
BlockBlobGetBlockListHeaders: BlockBlobGetBlockListHeaders,
BlockBlobPutBlobFromUrlExceptionHeaders: BlockBlobPutBlobFromUrlExceptionHeaders,
BlockBlobPutBlobFromUrlHeaders: BlockBlobPutBlobFromUrlHeaders,
BlockBlobStageBlockExceptionHeaders: BlockBlobStageBlockExceptionHeaders,
BlockBlobStageBlockFromURLExceptionHeaders: BlockBlobStageBlockFromURLExceptionHeaders,
BlockBlobStageBlockFromURLHeaders: BlockBlobStageBlockFromURLHeaders,
BlockBlobStageBlockHeaders: BlockBlobStageBlockHeaders,
BlockBlobUploadExceptionHeaders: BlockBlobUploadExceptionHeaders,
BlockBlobUploadHeaders: BlockBlobUploadHeaders,
BlockList: BlockList,
BlockLookupList: BlockLookupList,
ClearRange: ClearRange,
ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
ContainerBreakLeaseExceptionHeaders: ContainerBreakLeaseExceptionHeaders,
ContainerBreakLeaseHeaders: ContainerBreakLeaseHeaders,
ContainerChangeLeaseExceptionHeaders: ContainerChangeLeaseExceptionHeaders,
ContainerChangeLeaseHeaders: ContainerChangeLeaseHeaders,
ContainerCreateExceptionHeaders: ContainerCreateExceptionHeaders,
ContainerCreateHeaders: ContainerCreateHeaders,
ContainerDeleteExceptionHeaders: ContainerDeleteExceptionHeaders,
ContainerDeleteHeaders: ContainerDeleteHeaders,
ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,
ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,
ContainerGetAccessPolicyExceptionHeaders: ContainerGetAccessPolicyExceptionHeaders,
ContainerGetAccessPolicyHeaders: ContainerGetAccessPolicyHeaders,
ContainerGetAccountInfoExceptionHeaders: ContainerGetAccountInfoExceptionHeaders,
ContainerGetAccountInfoHeaders: ContainerGetAccountInfoHeaders,
ContainerGetPropertiesExceptionHeaders: ContainerGetPropertiesExceptionHeaders,
ContainerGetPropertiesHeaders: ContainerGetPropertiesHeaders,
ContainerItem: ContainerItem,
ContainerListBlobFlatSegmentExceptionHeaders: ContainerListBlobFlatSegmentExceptionHeaders,
ContainerListBlobFlatSegmentHeaders: ContainerListBlobFlatSegmentHeaders,
ContainerListBlobHierarchySegmentExceptionHeaders: ContainerListBlobHierarchySegmentExceptionHeaders,
ContainerListBlobHierarchySegmentHeaders: ContainerListBlobHierarchySegmentHeaders,
ContainerProperties: ContainerProperties,
ContainerReleaseLeaseExceptionHeaders: ContainerReleaseLeaseExceptionHeaders,
ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
ContainerRenameHeaders: ContainerRenameHeaders,
ContainerRenewLeaseExceptionHeaders: ContainerRenewLeaseExceptionHeaders,
ContainerRenewLeaseHeaders: ContainerRenewLeaseHeaders,
ContainerRestoreExceptionHeaders: ContainerRestoreExceptionHeaders,
ContainerRestoreHeaders: ContainerRestoreHeaders,
ContainerSetAccessPolicyExceptionHeaders: ContainerSetAccessPolicyExceptionHeaders,
ContainerSetAccessPolicyHeaders: ContainerSetAccessPolicyHeaders,
ContainerSetMetadataExceptionHeaders: ContainerSetMetadataExceptionHeaders,
ContainerSetMetadataHeaders: ContainerSetMetadataHeaders,
ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
CorsRule: CorsRule,
DelimitedTextConfiguration: DelimitedTextConfiguration,
FilterBlobItem: FilterBlobItem,
FilterBlobSegment: FilterBlobSegment,
GeoReplication: GeoReplication,
JsonTextConfiguration: JsonTextConfiguration,
KeyInfo: KeyInfo,
ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
ListContainersSegmentResponse: ListContainersSegmentResponse,
Logging: Logging,
Metrics: Metrics,
PageBlobClearPagesExceptionHeaders: PageBlobClearPagesExceptionHeaders,
PageBlobClearPagesHeaders: PageBlobClearPagesHeaders,
PageBlobCopyIncrementalExceptionHeaders: PageBlobCopyIncrementalExceptionHeaders,
PageBlobCopyIncrementalHeaders: PageBlobCopyIncrementalHeaders,
PageBlobCreateExceptionHeaders: PageBlobCreateExceptionHeaders,
PageBlobCreateHeaders: PageBlobCreateHeaders,
PageBlobGetPageRangesDiffExceptionHeaders: PageBlobGetPageRangesDiffExceptionHeaders,
PageBlobGetPageRangesDiffHeaders: PageBlobGetPageRangesDiffHeaders,
PageBlobGetPageRangesExceptionHeaders: PageBlobGetPageRangesExceptionHeaders,
PageBlobGetPageRangesHeaders: PageBlobGetPageRangesHeaders,
PageBlobResizeExceptionHeaders: PageBlobResizeExceptionHeaders,
PageBlobResizeHeaders: PageBlobResizeHeaders,
PageBlobUpdateSequenceNumberExceptionHeaders: PageBlobUpdateSequenceNumberExceptionHeaders,
PageBlobUpdateSequenceNumberHeaders: PageBlobUpdateSequenceNumberHeaders,
PageBlobUploadPagesExceptionHeaders: PageBlobUploadPagesExceptionHeaders,
PageBlobUploadPagesFromURLExceptionHeaders: PageBlobUploadPagesFromURLExceptionHeaders,
PageBlobUploadPagesFromURLHeaders: PageBlobUploadPagesFromURLHeaders,
PageBlobUploadPagesHeaders: PageBlobUploadPagesHeaders,
PageList: PageList,
PageRange: PageRange,
QueryFormat: QueryFormat,
QueryRequest: QueryRequest,
QuerySerialization: QuerySerialization,
RetentionPolicy: RetentionPolicy,
ServiceFilterBlobsExceptionHeaders: ServiceFilterBlobsExceptionHeaders,
ServiceFilterBlobsHeaders: ServiceFilterBlobsHeaders,
ServiceGetAccountInfoExceptionHeaders: ServiceGetAccountInfoExceptionHeaders,
ServiceGetAccountInfoHeaders: ServiceGetAccountInfoHeaders,
ServiceGetPropertiesExceptionHeaders: ServiceGetPropertiesExceptionHeaders,
ServiceGetPropertiesHeaders: ServiceGetPropertiesHeaders,
ServiceGetStatisticsExceptionHeaders: ServiceGetStatisticsExceptionHeaders,
ServiceGetStatisticsHeaders: ServiceGetStatisticsHeaders,
ServiceGetUserDelegationKeyExceptionHeaders: ServiceGetUserDelegationKeyExceptionHeaders,
ServiceGetUserDelegationKeyHeaders: ServiceGetUserDelegationKeyHeaders,
ServiceListContainersSegmentExceptionHeaders: ServiceListContainersSegmentExceptionHeaders,
ServiceListContainersSegmentHeaders: ServiceListContainersSegmentHeaders,
ServiceSetPropertiesExceptionHeaders: ServiceSetPropertiesExceptionHeaders,
ServiceSetPropertiesHeaders: ServiceSetPropertiesHeaders,
ServiceSubmitBatchExceptionHeaders: ServiceSubmitBatchExceptionHeaders,
ServiceSubmitBatchHeaders: ServiceSubmitBatchHeaders,
SignedIdentifier: SignedIdentifier,
StaticWebsite: StaticWebsite,
StorageError: StorageError,
UserDelegationKey: UserDelegationKey
});
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
const contentType = {
parameterPath: ["options", "contentType"],
mapper: {
defaultValue: "application/xml",
isConstant: true,
serializedName: "Content-Type",
type: {
name: "String",
},
},
};
const blobServiceProperties = {
parameterPath: "blobServiceProperties",
mapper: BlobServiceProperties,
};
const accept = {
parameterPath: "accept",
mapper: {
defaultValue: "application/xml",
isConstant: true,
serializedName: "Accept",
type: {
name: "String",
},
},
};
const url = {
parameterPath: "url",
mapper: {
serializedName: "url",
required: true,
xmlName: "url",
type: {
name: "String",
},
},
skipEncoding: true,
};
const restype = {
parameterPath: "restype",
mapper: {
defaultValue: "service",
isConstant: true,
serializedName: "restype",
type: {
name: "String",
},
},
};
const comp = {
parameterPath: "comp",
mapper: {
defaultValue: "properties",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const timeoutInSeconds = {
parameterPath: ["options", "timeoutInSeconds"],
mapper: {
constraints: {
InclusiveMinimum: 0,
},
serializedName: "timeout",
xmlName: "timeout",
type: {
name: "Number",
},
},
};
const version = {
parameterPath: "version",
mapper: {
defaultValue: "2025-05-05",
isConstant: true,
serializedName: "x-ms-version",
type: {
name: "String",
},
},
};
const requestId = {
parameterPath: ["options", "requestId"],
mapper: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String",
},
},
};
const accept1 = {
parameterPath: "accept",
mapper: {
defaultValue: "application/xml",
isConstant: true,
serializedName: "Accept",
type: {
name: "String",
},
},
};
const comp1 = {
parameterPath: "comp",
mapper: {
defaultValue: "stats",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const comp2 = {
parameterPath: "comp",
mapper: {
defaultValue: "list",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const prefix = {
parameterPath: ["options", "prefix"],
mapper: {
serializedName: "prefix",
xmlName: "prefix",
type: {
name: "String",
},
},
};
const marker = {
parameterPath: ["options", "marker"],
mapper: {
serializedName: "marker",
xmlName: "marker",
type: {
name: "String",
},
},
};
const maxPageSize = {
parameterPath: ["options", "maxPageSize"],
mapper: {
constraints: {
InclusiveMinimum: 1,
},
serializedName: "maxresults",
xmlName: "maxresults",
type: {
name: "Number",
},
},
};
const include = {
parameterPath: ["options", "include"],
mapper: {
serializedName: "include",
xmlName: "include",
xmlElementName: "ListContainersIncludeType",
type: {
name: "Sequence",
element: {
type: {
name: "Enum",
allowedValues: ["metadata", "deleted", "system"],
},
},
},
},
collectionFormat: "CSV",
};
const keyInfo = {
parameterPath: "keyInfo",
mapper: KeyInfo,
};
const comp3 = {
parameterPath: "comp",
mapper: {
defaultValue: "userdelegationkey",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const restype1 = {
parameterPath: "restype",
mapper: {
defaultValue: "account",
isConstant: true,
serializedName: "restype",
type: {
name: "String",
},
},
};
const body = {
parameterPath: "body",
mapper: {
serializedName: "body",
required: true,
xmlName: "body",
type: {
name: "Stream",
},
},
};
const comp4 = {
parameterPath: "comp",
mapper: {
defaultValue: "batch",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const contentLength = {
parameterPath: "contentLength",
mapper: {
serializedName: "Content-Length",
required: true,
xmlName: "Content-Length",
type: {
name: "Number",
},
},
};
const multipartContentType = {
parameterPath: "multipartContentType",
mapper: {
serializedName: "Content-Type",
required: true,
xmlName: "Content-Type",
type: {
name: "String",
},
},
};
const comp5 = {
parameterPath: "comp",
mapper: {
defaultValue: "blobs",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const where = {
parameterPath: ["options", "where"],
mapper: {
serializedName: "where",
xmlName: "where",
type: {
name: "String",
},
},
};
const restype2 = {
parameterPath: "restype",
mapper: {
defaultValue: "container",
isConstant: true,
serializedName: "restype",
type: {
name: "String",
},
},
};
const metadata = {
parameterPath: ["options", "metadata"],
mapper: {
serializedName: "x-ms-meta",
xmlName: "x-ms-meta",
headerCollectionPrefix: "x-ms-meta-",
type: {
name: "Dictionary",
value: { type: { name: "String" } },
},
},
};
const access = {
parameterPath: ["options", "access"],
mapper: {
serializedName: "x-ms-blob-public-access",
xmlName: "x-ms-blob-public-access",
type: {
name: "Enum",
allowedValues: ["container", "blob"],
},
},
};
const defaultEncryptionScope = {
parameterPath: [
"options",
"containerEncryptionScope",
"defaultEncryptionScope",
],
mapper: {
serializedName: "x-ms-default-encryption-scope",
xmlName: "x-ms-default-encryption-scope",
type: {
name: "String",
},
},
};
const preventEncryptionScopeOverride = {
parameterPath: [
"options",
"containerEncryptionScope",
"preventEncryptionScopeOverride",
],
mapper: {
serializedName: "x-ms-deny-encryption-scope-override",
xmlName: "x-ms-deny-encryption-scope-override",
type: {
name: "Boolean",
},
},
};
const leaseId = {
parameterPath: ["options", "leaseAccessConditions", "leaseId"],
mapper: {
serializedName: "x-ms-lease-id",
xmlName: "x-ms-lease-id",
type: {
name: "String",
},
},
};
const ifModifiedSince = {
parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"],
mapper: {
serializedName: "If-Modified-Since",
xmlName: "If-Modified-Since",
type: {
name: "DateTimeRfc1123",
},
},
};
const ifUnmodifiedSince = {
parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"],
mapper: {
serializedName: "If-Unmodified-Since",
xmlName: "If-Unmodified-Since",
type: {
name: "DateTimeRfc1123",
},
},
};
const comp6 = {
parameterPath: "comp",
mapper: {
defaultValue: "metadata",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const comp7 = {
parameterPath: "comp",
mapper: {
defaultValue: "acl",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const containerAcl = {
parameterPath: ["options", "containerAcl"],
mapper: {
serializedName: "containerAcl",
xmlName: "SignedIdentifiers",
xmlIsWrapped: true,
xmlElementName: "SignedIdentifier",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "SignedIdentifier",
},
},
},
},
};
const comp8 = {
parameterPath: "comp",
mapper: {
defaultValue: "undelete",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const deletedContainerName = {
parameterPath: ["options", "deletedContainerName"],
mapper: {
serializedName: "x-ms-deleted-container-name",
xmlName: "x-ms-deleted-container-name",
type: {
name: "String",
},
},
};
const deletedContainerVersion = {
parameterPath: ["options", "deletedContainerVersion"],
mapper: {
serializedName: "x-ms-deleted-container-version",
xmlName: "x-ms-deleted-container-version",
type: {
name: "String",
},
},
};
const comp9 = {
parameterPath: "comp",
mapper: {
defaultValue: "rename",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const sourceContainerName = {
parameterPath: "sourceContainerName",
mapper: {
serializedName: "x-ms-source-container-name",
required: true,
xmlName: "x-ms-source-container-name",
type: {
name: "String",
},
},
};
const sourceLeaseId = {
parameterPath: ["options", "sourceLeaseId"],
mapper: {
serializedName: "x-ms-source-lease-id",
xmlName: "x-ms-source-lease-id",
type: {
name: "String",
},
},
};
const comp10 = {
parameterPath: "comp",
mapper: {
defaultValue: "lease",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const action = {
parameterPath: "action",
mapper: {
defaultValue: "acquire",
isConstant: true,
serializedName: "x-ms-lease-action",
type: {
name: "String",
},
},
};
const duration = {
parameterPath: ["options", "duration"],
mapper: {
serializedName: "x-ms-lease-duration",
xmlName: "x-ms-lease-duration",
type: {
name: "Number",
},
},
};
const proposedLeaseId = {
parameterPath: ["options", "proposedLeaseId"],
mapper: {
serializedName: "x-ms-proposed-lease-id",
xmlName: "x-ms-proposed-lease-id",
type: {
name: "String",
},
},
};
const action1 = {
parameterPath: "action",
mapper: {
defaultValue: "release",
isConstant: true,
serializedName: "x-ms-lease-action",
type: {
name: "String",
},
},
};
const leaseId1 = {
parameterPath: "leaseId",
mapper: {
serializedName: "x-ms-lease-id",
required: true,
xmlName: "x-ms-lease-id",
type: {
name: "String",
},
},
};
const action2 = {
parameterPath: "action",
mapper: {
defaultValue: "renew",
isConstant: true,
serializedName: "x-ms-lease-action",
type: {
name: "String",
},
},
};
const action3 = {
parameterPath: "action",
mapper: {
defaultValue: "break",
isConstant: true,
serializedName: "x-ms-lease-action",
type: {
name: "String",
},
},
};
const breakPeriod = {
parameterPath: ["options", "breakPeriod"],
mapper: {
serializedName: "x-ms-lease-break-period",
xmlName: "x-ms-lease-break-period",
type: {
name: "Number",
},
},
};
const action4 = {
parameterPath: "action",
mapper: {
defaultValue: "change",
isConstant: true,
serializedName: "x-ms-lease-action",
type: {
name: "String",
},
},
};
const proposedLeaseId1 = {
parameterPath: "proposedLeaseId",
mapper: {
serializedName: "x-ms-proposed-lease-id",
required: true,
xmlName: "x-ms-proposed-lease-id",
type: {
name: "String",
},
},
};
const include1 = {
parameterPath: ["options", "include"],
mapper: {
serializedName: "include",
xmlName: "include",
xmlElementName: "ListBlobsIncludeItem",
type: {
name: "Sequence",
element: {
type: {
name: "Enum",
allowedValues: [
"copy",
"deleted",
"metadata",
"snapshots",
"uncommittedblobs",
"versions",
"tags",
"immutabilitypolicy",
"legalhold",
"deletedwithversions",
],
},
},
},
},
collectionFormat: "CSV",
};
const delimiter = {
parameterPath: "delimiter",
mapper: {
serializedName: "delimiter",
required: true,
xmlName: "delimiter",
type: {
name: "String",
},
},
};
const snapshot = {
parameterPath: ["options", "snapshot"],
mapper: {
serializedName: "snapshot",
xmlName: "snapshot",
type: {
name: "String",
},
},
};
const versionId = {
parameterPath: ["options", "versionId"],
mapper: {
serializedName: "versionid",
xmlName: "versionid",
type: {
name: "String",
},
},
};
const range = {
parameterPath: ["options", "range"],
mapper: {
serializedName: "x-ms-range",
xmlName: "x-ms-range",
type: {
name: "String",
},
},
};
const rangeGetContentMD5 = {
parameterPath: ["options", "rangeGetContentMD5"],
mapper: {
serializedName: "x-ms-range-get-content-md5",
xmlName: "x-ms-range-get-content-md5",
type: {
name: "Boolean",
},
},
};
const rangeGetContentCRC64 = {
parameterPath: ["options", "rangeGetContentCRC64"],
mapper: {
serializedName: "x-ms-range-get-content-crc64",
xmlName: "x-ms-range-get-content-crc64",
type: {
name: "Boolean",
},
},
};
const encryptionKey = {
parameterPath: ["options", "cpkInfo", "encryptionKey"],
mapper: {
serializedName: "x-ms-encryption-key",
xmlName: "x-ms-encryption-key",
type: {
name: "String",
},
},
};
const encryptionKeySha256 = {
parameterPath: ["options", "cpkInfo", "encryptionKeySha256"],
mapper: {
serializedName: "x-ms-encryption-key-sha256",
xmlName: "x-ms-encryption-key-sha256",
type: {
name: "String",
},
},
};
const encryptionAlgorithm = {
parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"],
mapper: {
serializedName: "x-ms-encryption-algorithm",
xmlName: "x-ms-encryption-algorithm",
type: {
name: "String",
},
},
};
const ifMatch = {
parameterPath: ["options", "modifiedAccessConditions", "ifMatch"],
mapper: {
serializedName: "If-Match",
xmlName: "If-Match",
type: {
name: "String",
},
},
};
const ifNoneMatch = {
parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"],
mapper: {
serializedName: "If-None-Match",
xmlName: "If-None-Match",
type: {
name: "String",
},
},
};
const ifTags = {
parameterPath: ["options", "modifiedAccessConditions", "ifTags"],
mapper: {
serializedName: "x-ms-if-tags",
xmlName: "x-ms-if-tags",
type: {
name: "String",
},
},
};
const deleteSnapshots = {
parameterPath: ["options", "deleteSnapshots"],
mapper: {
serializedName: "x-ms-delete-snapshots",
xmlName: "x-ms-delete-snapshots",
type: {
name: "Enum",
allowedValues: ["include", "only"],
},
},
};
const blobDeleteType = {
parameterPath: ["options", "blobDeleteType"],
mapper: {
serializedName: "deletetype",
xmlName: "deletetype",
type: {
name: "String",
},
},
};
const comp11 = {
parameterPath: "comp",
mapper: {
defaultValue: "expiry",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const expiryOptions = {
parameterPath: "expiryOptions",
mapper: {
serializedName: "x-ms-expiry-option",
required: true,
xmlName: "x-ms-expiry-option",
type: {
name: "String",
},
},
};
const expiresOn = {
parameterPath: ["options", "expiresOn"],
mapper: {
serializedName: "x-ms-expiry-time",
xmlName: "x-ms-expiry-time",
type: {
name: "String",
},
},
};
const blobCacheControl = {
parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"],
mapper: {
serializedName: "x-ms-blob-cache-control",
xmlName: "x-ms-blob-cache-control",
type: {
name: "String",
},
},
};
const blobContentType = {
parameterPath: ["options", "blobHttpHeaders", "blobContentType"],
mapper: {
serializedName: "x-ms-blob-content-type",
xmlName: "x-ms-blob-content-type",
type: {
name: "String",
},
},
};
const blobContentMD5 = {
parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"],
mapper: {
serializedName: "x-ms-blob-content-md5",
xmlName: "x-ms-blob-content-md5",
type: {
name: "ByteArray",
},
},
};
const blobContentEncoding = {
parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"],
mapper: {
serializedName: "x-ms-blob-content-encoding",
xmlName: "x-ms-blob-content-encoding",
type: {
name: "String",
},
},
};
const blobContentLanguage = {
parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"],
mapper: {
serializedName: "x-ms-blob-content-language",
xmlName: "x-ms-blob-content-language",
type: {
name: "String",
},
},
};
const blobContentDisposition = {
parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"],
mapper: {
serializedName: "x-ms-blob-content-disposition",
xmlName: "x-ms-blob-content-disposition",
type: {
name: "String",
},
},
};
const comp12 = {
parameterPath: "comp",
mapper: {
defaultValue: "immutabilityPolicies",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const immutabilityPolicyExpiry = {
parameterPath: ["options", "immutabilityPolicyExpiry"],
mapper: {
serializedName: "x-ms-immutability-policy-until-date",
xmlName: "x-ms-immutability-policy-until-date",
type: {
name: "DateTimeRfc1123",
},
},
};
const immutabilityPolicyMode = {
parameterPath: ["options", "immutabilityPolicyMode"],
mapper: {
serializedName: "x-ms-immutability-policy-mode",
xmlName: "x-ms-immutability-policy-mode",
type: {
name: "Enum",
allowedValues: ["Mutable", "Unlocked", "Locked"],
},
},
};
const comp13 = {
parameterPath: "comp",
mapper: {
defaultValue: "legalhold",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const legalHold = {
parameterPath: "legalHold",
mapper: {
serializedName: "x-ms-legal-hold",
required: true,
xmlName: "x-ms-legal-hold",
type: {
name: "Boolean",
},
},
};
const encryptionScope = {
parameterPath: ["options", "encryptionScope"],
mapper: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String",
},
},
};
const comp14 = {
parameterPath: "comp",
mapper: {
defaultValue: "snapshot",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const tier = {
parameterPath: ["options", "tier"],
mapper: {
serializedName: "x-ms-access-tier",
xmlName: "x-ms-access-tier",
type: {
name: "Enum",
allowedValues: [
"P4",
"P6",
"P10",
"P15",
"P20",
"P30",
"P40",
"P50",
"P60",
"P70",
"P80",
"Hot",
"Cool",
"Archive",
"Cold",
],
},
},
};
const rehydratePriority = {
parameterPath: ["options", "rehydratePriority"],
mapper: {
serializedName: "x-ms-rehydrate-priority",
xmlName: "x-ms-rehydrate-priority",
type: {
name: "Enum",
allowedValues: ["High", "Standard"],
},
},
};
const sourceIfModifiedSince = {
parameterPath: [
"options",
"sourceModifiedAccessConditions",
"sourceIfModifiedSince",
],
mapper: {
serializedName: "x-ms-source-if-modified-since",
xmlName: "x-ms-source-if-modified-since",
type: {
name: "DateTimeRfc1123",
},
},
};
const sourceIfUnmodifiedSince = {
parameterPath: [
"options",
"sourceModifiedAccessConditions",
"sourceIfUnmodifiedSince",
],
mapper: {
serializedName: "x-ms-source-if-unmodified-since",
xmlName: "x-ms-source-if-unmodified-since",
type: {
name: "DateTimeRfc1123",
},
},
};
const sourceIfMatch = {
parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"],
mapper: {
serializedName: "x-ms-source-if-match",
xmlName: "x-ms-source-if-match",
type: {
name: "String",
},
},
};
const sourceIfNoneMatch = {
parameterPath: [
"options",
"sourceModifiedAccessConditions",
"sourceIfNoneMatch",
],
mapper: {
serializedName: "x-ms-source-if-none-match",
xmlName: "x-ms-source-if-none-match",
type: {
name: "String",
},
},
};
const sourceIfTags = {
parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"],
mapper: {
serializedName: "x-ms-source-if-tags",
xmlName: "x-ms-source-if-tags",
type: {
name: "String",
},
},
};
const copySource = {
parameterPath: "copySource",
mapper: {
serializedName: "x-ms-copy-source",
required: true,
xmlName: "x-ms-copy-source",
type: {
name: "String",
},
},
};
const blobTagsString = {
parameterPath: ["options", "blobTagsString"],
mapper: {
serializedName: "x-ms-tags",
xmlName: "x-ms-tags",
type: {
name: "String",
},
},
};
const sealBlob = {
parameterPath: ["options", "sealBlob"],
mapper: {
serializedName: "x-ms-seal-blob",
xmlName: "x-ms-seal-blob",
type: {
name: "Boolean",
},
},
};
const legalHold1 = {
parameterPath: ["options", "legalHold"],
mapper: {
serializedName: "x-ms-legal-hold",
xmlName: "x-ms-legal-hold",
type: {
name: "Boolean",
},
},
};
const xMsRequiresSync = {
parameterPath: "xMsRequiresSync",
mapper: {
defaultValue: "true",
isConstant: true,
serializedName: "x-ms-requires-sync",
type: {
name: "String",
},
},
};
const sourceContentMD5 = {
parameterPath: ["options", "sourceContentMD5"],
mapper: {
serializedName: "x-ms-source-content-md5",
xmlName: "x-ms-source-content-md5",
type: {
name: "ByteArray",
},
},
};
const copySourceAuthorization = {
parameterPath: ["options", "copySourceAuthorization"],
mapper: {
serializedName: "x-ms-copy-source-authorization",
xmlName: "x-ms-copy-source-authorization",
type: {
name: "String",
},
},
};
const copySourceTags = {
parameterPath: ["options", "copySourceTags"],
mapper: {
serializedName: "x-ms-copy-source-tag-option",
xmlName: "x-ms-copy-source-tag-option",
type: {
name: "Enum",
allowedValues: ["REPLACE", "COPY"],
},
},
};
const comp15 = {
parameterPath: "comp",
mapper: {
defaultValue: "copy",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const copyActionAbortConstant = {
parameterPath: "copyActionAbortConstant",
mapper: {
defaultValue: "abort",
isConstant: true,
serializedName: "x-ms-copy-action",
type: {
name: "String",
},
},
};
const copyId = {
parameterPath: "copyId",
mapper: {
serializedName: "copyid",
required: true,
xmlName: "copyid",
type: {
name: "String",
},
},
};
const comp16 = {
parameterPath: "comp",
mapper: {
defaultValue: "tier",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const tier1 = {
parameterPath: "tier",
mapper: {
serializedName: "x-ms-access-tier",
required: true,
xmlName: "x-ms-access-tier",
type: {
name: "Enum",
allowedValues: [
"P4",
"P6",
"P10",
"P15",
"P20",
"P30",
"P40",
"P50",
"P60",
"P70",
"P80",
"Hot",
"Cool",
"Archive",
"Cold",
],
},
},
};
const queryRequest = {
parameterPath: ["options", "queryRequest"],
mapper: QueryRequest,
};
const comp17 = {
parameterPath: "comp",
mapper: {
defaultValue: "query",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const comp18 = {
parameterPath: "comp",
mapper: {
defaultValue: "tags",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const tags = {
parameterPath: ["options", "tags"],
mapper: BlobTags,
};
const transactionalContentMD5 = {
parameterPath: ["options", "transactionalContentMD5"],
mapper: {
serializedName: "Content-MD5",
xmlName: "Content-MD5",
type: {
name: "ByteArray",
},
},
};
const transactionalContentCrc64 = {
parameterPath: ["options", "transactionalContentCrc64"],
mapper: {
serializedName: "x-ms-content-crc64",
xmlName: "x-ms-content-crc64",
type: {
name: "ByteArray",
},
},
};
const blobType = {
parameterPath: "blobType",
mapper: {
defaultValue: "PageBlob",
isConstant: true,
serializedName: "x-ms-blob-type",
type: {
name: "String",
},
},
};
const blobContentLength = {
parameterPath: "blobContentLength",
mapper: {
serializedName: "x-ms-blob-content-length",
required: true,
xmlName: "x-ms-blob-content-length",
type: {
name: "Number",
},
},
};
const blobSequenceNumber = {
parameterPath: ["options", "blobSequenceNumber"],
mapper: {
defaultValue: 0,
serializedName: "x-ms-blob-sequence-number",
xmlName: "x-ms-blob-sequence-number",
type: {
name: "Number",
},
},
};
const contentType1 = {
parameterPath: ["options", "contentType"],
mapper: {
defaultValue: "application/octet-stream",
isConstant: true,
serializedName: "Content-Type",
type: {
name: "String",
},
},
};
const body1 = {
parameterPath: "body",
mapper: {
serializedName: "body",
required: true,
xmlName: "body",
type: {
name: "Stream",
},
},
};
const accept2 = {
parameterPath: "accept",
mapper: {
defaultValue: "application/xml",
isConstant: true,
serializedName: "Accept",
type: {
name: "String",
},
},
};
const comp19 = {
parameterPath: "comp",
mapper: {
defaultValue: "page",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const pageWrite = {
parameterPath: "pageWrite",
mapper: {
defaultValue: "update",
isConstant: true,
serializedName: "x-ms-page-write",
type: {
name: "String",
},
},
};
const ifSequenceNumberLessThanOrEqualTo = {
parameterPath: [
"options",
"sequenceNumberAccessConditions",
"ifSequenceNumberLessThanOrEqualTo",
],
mapper: {
serializedName: "x-ms-if-sequence-number-le",
xmlName: "x-ms-if-sequence-number-le",
type: {
name: "Number",
},
},
};
const ifSequenceNumberLessThan = {
parameterPath: [
"options",
"sequenceNumberAccessConditions",
"ifSequenceNumberLessThan",
],
mapper: {
serializedName: "x-ms-if-sequence-number-lt",
xmlName: "x-ms-if-sequence-number-lt",
type: {
name: "Number",
},
},
};
const ifSequenceNumberEqualTo = {
parameterPath: [
"options",
"sequenceNumberAccessConditions",
"ifSequenceNumberEqualTo",
],
mapper: {
serializedName: "x-ms-if-sequence-number-eq",
xmlName: "x-ms-if-sequence-number-eq",
type: {
name: "Number",
},
},
};
const pageWrite1 = {
parameterPath: "pageWrite",
mapper: {
defaultValue: "clear",
isConstant: true,
serializedName: "x-ms-page-write",
type: {
name: "String",
},
},
};
const sourceUrl = {
parameterPath: "sourceUrl",
mapper: {
serializedName: "x-ms-copy-source",
required: true,
xmlName: "x-ms-copy-source",
type: {
name: "String",
},
},
};
const sourceRange = {
parameterPath: "sourceRange",
mapper: {
serializedName: "x-ms-source-range",
required: true,
xmlName: "x-ms-source-range",
type: {
name: "String",
},
},
};
const sourceContentCrc64 = {
parameterPath: ["options", "sourceContentCrc64"],
mapper: {
serializedName: "x-ms-source-content-crc64",
xmlName: "x-ms-source-content-crc64",
type: {
name: "ByteArray",
},
},
};
const range1 = {
parameterPath: "range",
mapper: {
serializedName: "x-ms-range",
required: true,
xmlName: "x-ms-range",
type: {
name: "String",
},
},
};
const comp20 = {
parameterPath: "comp",
mapper: {
defaultValue: "pagelist",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const prevsnapshot = {
parameterPath: ["options", "prevsnapshot"],
mapper: {
serializedName: "prevsnapshot",
xmlName: "prevsnapshot",
type: {
name: "String",
},
},
};
const prevSnapshotUrl = {
parameterPath: ["options", "prevSnapshotUrl"],
mapper: {
serializedName: "x-ms-previous-snapshot-url",
xmlName: "x-ms-previous-snapshot-url",
type: {
name: "String",
},
},
};
const sequenceNumberAction = {
parameterPath: "sequenceNumberAction",
mapper: {
serializedName: "x-ms-sequence-number-action",
required: true,
xmlName: "x-ms-sequence-number-action",
type: {
name: "Enum",
allowedValues: ["max", "update", "increment"],
},
},
};
const comp21 = {
parameterPath: "comp",
mapper: {
defaultValue: "incrementalcopy",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const blobType1 = {
parameterPath: "blobType",
mapper: {
defaultValue: "AppendBlob",
isConstant: true,
serializedName: "x-ms-blob-type",
type: {
name: "String",
},
},
};
const comp22 = {
parameterPath: "comp",
mapper: {
defaultValue: "appendblock",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const maxSize = {
parameterPath: ["options", "appendPositionAccessConditions", "maxSize"],
mapper: {
serializedName: "x-ms-blob-condition-maxsize",
xmlName: "x-ms-blob-condition-maxsize",
type: {
name: "Number",
},
},
};
const appendPosition = {
parameterPath: [
"options",
"appendPositionAccessConditions",
"appendPosition",
],
mapper: {
serializedName: "x-ms-blob-condition-appendpos",
xmlName: "x-ms-blob-condition-appendpos",
type: {
name: "Number",
},
},
};
const sourceRange1 = {
parameterPath: ["options", "sourceRange"],
mapper: {
serializedName: "x-ms-source-range",
xmlName: "x-ms-source-range",
type: {
name: "String",
},
},
};
const comp23 = {
parameterPath: "comp",
mapper: {
defaultValue: "seal",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const blobType2 = {
parameterPath: "blobType",
mapper: {
defaultValue: "BlockBlob",
isConstant: true,
serializedName: "x-ms-blob-type",
type: {
name: "String",
},
},
};
const copySourceBlobProperties = {
parameterPath: ["options", "copySourceBlobProperties"],
mapper: {
serializedName: "x-ms-copy-source-blob-properties",
xmlName: "x-ms-copy-source-blob-properties",
type: {
name: "Boolean",
},
},
};
const comp24 = {
parameterPath: "comp",
mapper: {
defaultValue: "block",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const blockId = {
parameterPath: "blockId",
mapper: {
serializedName: "blockid",
required: true,
xmlName: "blockid",
type: {
name: "String",
},
},
};
const blocks = {
parameterPath: "blocks",
mapper: BlockLookupList,
};
const comp25 = {
parameterPath: "comp",
mapper: {
defaultValue: "blocklist",
isConstant: true,
serializedName: "comp",
type: {
name: "String",
},
},
};
const listType = {
parameterPath: "listType",
mapper: {
defaultValue: "committed",
serializedName: "blocklisttype",
required: true,
xmlName: "blocklisttype",
type: {
name: "Enum",
allowedValues: ["committed", "uncommitted", "all"],
},
},
};
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
/** Class containing Service operations. */
class ServiceImpl {
/**
* Initialize a new instance of the class Service class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Sets properties for a storage account's Blob service endpoint, including properties for Storage
* Analytics and CORS (Cross-Origin Resource Sharing) rules
* @param blobServiceProperties The StorageService properties.
* @param options The options parameters.
*/
setProperties(blobServiceProperties, options) {
return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec);
}
/**
* gets the properties of a storage account's Blob service, including properties for Storage Analytics
* and CORS (Cross-Origin Resource Sharing) rules.
* @param options The options parameters.
*/
getProperties(options) {
return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2);
}
/**
* Retrieves statistics related to replication for the Blob service. It is only available on the
* secondary location endpoint when read-access geo-redundant replication is enabled for the storage
* account.
* @param options The options parameters.
*/
getStatistics(options) {
return this.client.sendOperationRequest({ options }, getStatisticsOperationSpec);
}
/**
* The List Containers Segment operation returns a list of the containers under the specified account
* @param options The options parameters.
*/
listContainersSegment(options) {
return this.client.sendOperationRequest({ options }, listContainersSegmentOperationSpec);
}
/**
* Retrieves a user delegation key for the Blob service. This is only a valid operation when using
* bearer token authentication.
* @param keyInfo Key information
* @param options The options parameters.
*/
getUserDelegationKey(keyInfo, options) {
return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec);
}
/**
* Returns the sku name and account kind
* @param options The options parameters.
*/
getAccountInfo(options) {
return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2);
}
/**
* The Batch operation allows multiple API calls to be embedded into a single HTTP request.
* @param contentLength The length of the request.
* @param multipartContentType Required. The value of this header must be multipart/mixed with a batch
* boundary. Example header value: multipart/mixed; boundary=batch_
* @param body Initial data
* @param options The options parameters.
*/
submitBatch(contentLength, multipartContentType, body, options) {
return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec$1);
}
/**
* The Filter Blobs operation enables callers to list blobs across all containers whose tags match a
* given search expression. Filter blobs searches across all containers within a storage account but
* can be scoped within the expression to a single container.
* @param options The options parameters.
*/
filterBlobs(options) {
return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1);
}
}
// Operation Specifications
const xmlSerializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
const setPropertiesOperationSpec = {
path: "/",
httpMethod: "PUT",
responses: {
202: {
headersMapper: ServiceSetPropertiesHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ServiceSetPropertiesExceptionHeaders,
},
},
requestBody: blobServiceProperties,
queryParameters: [
restype,
comp,
timeoutInSeconds,
],
urlParameters: [url],
headerParameters: [
contentType,
accept,
version,
requestId,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "xml",
serializer: xmlSerializer$5,
};
const getPropertiesOperationSpec$2 = {
path: "/",
httpMethod: "GET",
responses: {
200: {
bodyMapper: BlobServiceProperties,
headersMapper: ServiceGetPropertiesHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ServiceGetPropertiesExceptionHeaders,
},
},
queryParameters: [
restype,
comp,
timeoutInSeconds,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$5,
};
const getStatisticsOperationSpec = {
path: "/",
httpMethod: "GET",
responses: {
200: {
bodyMapper: BlobServiceStatistics,
headersMapper: ServiceGetStatisticsHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ServiceGetStatisticsExceptionHeaders,
},
},
queryParameters: [
restype,
timeoutInSeconds,
comp1,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$5,
};
const listContainersSegmentOperationSpec = {
path: "/",
httpMethod: "GET",
responses: {
200: {
bodyMapper: ListContainersSegmentResponse,
headersMapper: ServiceListContainersSegmentHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ServiceListContainersSegmentExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
comp2,
prefix,
marker,
maxPageSize,
include,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$5,
};
const getUserDelegationKeyOperationSpec = {
path: "/",
httpMethod: "POST",
responses: {
200: {
bodyMapper: UserDelegationKey,
headersMapper: ServiceGetUserDelegationKeyHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ServiceGetUserDelegationKeyExceptionHeaders,
},
},
requestBody: keyInfo,
queryParameters: [
restype,
timeoutInSeconds,
comp3,
],
urlParameters: [url],
headerParameters: [
contentType,
accept,
version,
requestId,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "xml",
serializer: xmlSerializer$5,
};
const getAccountInfoOperationSpec$2 = {
path: "/",
httpMethod: "GET",
responses: {
200: {
headersMapper: ServiceGetAccountInfoHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ServiceGetAccountInfoExceptionHeaders,
},
},
queryParameters: [
comp,
timeoutInSeconds,
restype1,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$5,
};
const submitBatchOperationSpec$1 = {
path: "/",
httpMethod: "POST",
responses: {
202: {
bodyMapper: {
type: { name: "Stream" },
serializedName: "parsedResponse",
},
headersMapper: ServiceSubmitBatchHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ServiceSubmitBatchExceptionHeaders,
},
},
requestBody: body,
queryParameters: [timeoutInSeconds, comp4],
urlParameters: [url],
headerParameters: [
accept,
version,
requestId,
contentLength,
multipartContentType,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "xml",
serializer: xmlSerializer$5,
};
const filterBlobsOperationSpec$1 = {
path: "/",
httpMethod: "GET",
responses: {
200: {
bodyMapper: FilterBlobSegment,
headersMapper: ServiceFilterBlobsHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ServiceFilterBlobsExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
marker,
maxPageSize,
comp5,
where,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$5,
};
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
/** Class containing Container operations. */
class ContainerImpl {
/**
* Initialize a new instance of the class Container class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* creates a new container under the specified account. If the container with the same name already
* exists, the operation fails
* @param options The options parameters.
*/
create(options) {
return this.client.sendOperationRequest({ options }, createOperationSpec$2);
}
/**
* returns all user-defined metadata and system properties for the specified container. The data
* returned does not include the container's list of blobs
* @param options The options parameters.
*/
getProperties(options) {
return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1);
}
/**
* operation marks the specified container for deletion. The container and any blobs contained within
* it are later deleted during garbage collection
* @param options The options parameters.
*/
delete(options) {
return this.client.sendOperationRequest({ options }, deleteOperationSpec$1);
}
/**
* operation sets one or more user-defined name-value pairs for the specified container.
* @param options The options parameters.
*/
setMetadata(options) {
return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1);
}
/**
* gets the permissions for the specified container. The permissions indicate whether container data
* may be accessed publicly.
* @param options The options parameters.
*/
getAccessPolicy(options) {
return this.client.sendOperationRequest({ options }, getAccessPolicyOperationSpec);
}
/**
* sets the permissions for the specified container. The permissions indicate whether blobs in a
* container may be accessed publicly.
* @param options The options parameters.
*/
setAccessPolicy(options) {
return this.client.sendOperationRequest({ options }, setAccessPolicyOperationSpec);
}
/**
* Restores a previously-deleted container.
* @param options The options parameters.
*/
restore(options) {
return this.client.sendOperationRequest({ options }, restoreOperationSpec);
}
/**
* Renames an existing container.
* @param sourceContainerName Required. Specifies the name of the container to rename.
* @param options The options parameters.
*/
rename(sourceContainerName, options) {
return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec);
}
/**
* The Batch operation allows multiple API calls to be embedded into a single HTTP request.
* @param contentLength The length of the request.
* @param multipartContentType Required. The value of this header must be multipart/mixed with a batch
* boundary. Example header value: multipart/mixed; boundary=batch_
* @param body Initial data
* @param options The options parameters.
*/
submitBatch(contentLength, multipartContentType, body, options) {
return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec);
}
/**
* The Filter Blobs operation enables callers to list blobs in a container whose tags match a given
* search expression. Filter blobs searches within the given container.
* @param options The options parameters.
*/
filterBlobs(options) {
return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec);
}
/**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
* be 15 to 60 seconds, or can be infinite
* @param options The options parameters.
*/
acquireLease(options) {
return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1);
}
/**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
* be 15 to 60 seconds, or can be infinite
* @param leaseId Specifies the current lease ID on the resource.
* @param options The options parameters.
*/
releaseLease(leaseId, options) {
return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec$1);
}
/**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
* be 15 to 60 seconds, or can be infinite
* @param leaseId Specifies the current lease ID on the resource.
* @param options The options parameters.
*/
renewLease(leaseId, options) {
return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec$1);
}
/**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
* be 15 to 60 seconds, or can be infinite
* @param options The options parameters.
*/
breakLease(options) {
return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1);
}
/**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can
* be 15 to 60 seconds, or can be infinite
* @param leaseId Specifies the current lease ID on the resource.
* @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400
* (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor
* (String) for a list of valid GUID string formats.
* @param options The options parameters.
*/
changeLease(leaseId, proposedLeaseId, options) {
return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec$1);
}
/**
* [Update] The List Blobs operation returns a list of the blobs under the specified container
* @param options The options parameters.
*/
listBlobFlatSegment(options) {
return this.client.sendOperationRequest({ options }, listBlobFlatSegmentOperationSpec);
}
/**
* [Update] The List Blobs operation returns a list of the blobs under the specified container
* @param delimiter When the request includes this parameter, the operation returns a BlobPrefix
* element in the response body that acts as a placeholder for all blobs whose names begin with the
* same substring up to the appearance of the delimiter character. The delimiter may be a single
* character or a string.
* @param options The options parameters.
*/
listBlobHierarchySegment(delimiter, options) {
return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec);
}
/**
* Returns the sku name and account kind
* @param options The options parameters.
*/
getAccountInfo(options) {
return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1);
}
}
// Operation Specifications
const xmlSerializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
const createOperationSpec$2 = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: ContainerCreateHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerCreateExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, restype2],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
metadata,
access,
defaultEncryptionScope,
preventEncryptionScopeOverride,
],
isXML: true,
serializer: xmlSerializer$4,
};
const getPropertiesOperationSpec$1 = {
path: "/{containerName}",
httpMethod: "GET",
responses: {
200: {
headersMapper: ContainerGetPropertiesHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerGetPropertiesExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, restype2],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
],
isXML: true,
serializer: xmlSerializer$4,
};
const deleteOperationSpec$1 = {
path: "/{containerName}",
httpMethod: "DELETE",
responses: {
202: {
headersMapper: ContainerDeleteHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerDeleteExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, restype2],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
],
isXML: true,
serializer: xmlSerializer$4,
};
const setMetadataOperationSpec$1 = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: ContainerSetMetadataHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerSetMetadataExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
restype2,
comp6,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
metadata,
leaseId,
ifModifiedSince,
],
isXML: true,
serializer: xmlSerializer$4,
};
const getAccessPolicyOperationSpec = {
path: "/{containerName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: { name: "Composite", className: "SignedIdentifier" },
},
},
serializedName: "SignedIdentifiers",
xmlName: "SignedIdentifiers",
xmlIsWrapped: true,
xmlElementName: "SignedIdentifier",
},
headersMapper: ContainerGetAccessPolicyHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerGetAccessPolicyExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
restype2,
comp7,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
],
isXML: true,
serializer: xmlSerializer$4,
};
const setAccessPolicyOperationSpec = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: ContainerSetAccessPolicyHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerSetAccessPolicyExceptionHeaders,
},
},
requestBody: containerAcl,
queryParameters: [
timeoutInSeconds,
restype2,
comp7,
],
urlParameters: [url],
headerParameters: [
contentType,
accept,
version,
requestId,
access,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "xml",
serializer: xmlSerializer$4,
};
const restoreOperationSpec = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: ContainerRestoreHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerRestoreExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
restype2,
comp8,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
deletedContainerName,
deletedContainerVersion,
],
isXML: true,
serializer: xmlSerializer$4,
};
const renameOperationSpec = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: ContainerRenameHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerRenameExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
restype2,
comp9,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
sourceContainerName,
sourceLeaseId,
],
isXML: true,
serializer: xmlSerializer$4,
};
const submitBatchOperationSpec = {
path: "/{containerName}",
httpMethod: "POST",
responses: {
202: {
bodyMapper: {
type: { name: "Stream" },
serializedName: "parsedResponse",
},
headersMapper: ContainerSubmitBatchHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerSubmitBatchExceptionHeaders,
},
},
requestBody: body,
queryParameters: [
timeoutInSeconds,
comp4,
restype2,
],
urlParameters: [url],
headerParameters: [
accept,
version,
requestId,
contentLength,
multipartContentType,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "xml",
serializer: xmlSerializer$4,
};
const filterBlobsOperationSpec = {
path: "/{containerName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: FilterBlobSegment,
headersMapper: ContainerFilterBlobsHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerFilterBlobsExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
marker,
maxPageSize,
comp5,
where,
restype2,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$4,
};
const acquireLeaseOperationSpec$1 = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: ContainerAcquireLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerAcquireLeaseExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
restype2,
comp10,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
action,
duration,
proposedLeaseId,
],
isXML: true,
serializer: xmlSerializer$4,
};
const releaseLeaseOperationSpec$1 = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: ContainerReleaseLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerReleaseLeaseExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
restype2,
comp10,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
action1,
leaseId1,
],
isXML: true,
serializer: xmlSerializer$4,
};
const renewLeaseOperationSpec$1 = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: ContainerRenewLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerRenewLeaseExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
restype2,
comp10,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
leaseId1,
action2,
],
isXML: true,
serializer: xmlSerializer$4,
};
const breakLeaseOperationSpec$1 = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
202: {
headersMapper: ContainerBreakLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerBreakLeaseExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
restype2,
comp10,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
action3,
breakPeriod,
],
isXML: true,
serializer: xmlSerializer$4,
};
const changeLeaseOperationSpec$1 = {
path: "/{containerName}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: ContainerChangeLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerChangeLeaseExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
restype2,
comp10,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
leaseId1,
action4,
proposedLeaseId1,
],
isXML: true,
serializer: xmlSerializer$4,
};
const listBlobFlatSegmentOperationSpec = {
path: "/{containerName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: ListBlobsFlatSegmentResponse,
headersMapper: ContainerListBlobFlatSegmentHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerListBlobFlatSegmentExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
comp2,
prefix,
marker,
maxPageSize,
restype2,
include1,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$4,
};
const listBlobHierarchySegmentOperationSpec = {
path: "/{containerName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: ListBlobsHierarchySegmentResponse,
headersMapper: ContainerListBlobHierarchySegmentHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
comp2,
prefix,
marker,
maxPageSize,
restype2,
include1,
delimiter,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$4,
};
const getAccountInfoOperationSpec$1 = {
path: "/{containerName}",
httpMethod: "GET",
responses: {
200: {
headersMapper: ContainerGetAccountInfoHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerGetAccountInfoExceptionHeaders,
},
},
queryParameters: [
comp,
timeoutInSeconds,
restype1,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$4,
};
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
/** Class containing Blob operations. */
class BlobImpl {
/**
* Initialize a new instance of the class Blob class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* The Download operation reads or downloads a blob from the system, including its metadata and
* properties. You can also call Download to read a snapshot.
* @param options The options parameters.
*/
download(options) {
return this.client.sendOperationRequest({ options }, downloadOperationSpec);
}
/**
* The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system
* properties for the blob. It does not return the content of the blob.
* @param options The options parameters.
*/
getProperties(options) {
return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec);
}
/**
* If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
* permanently removed from the storage account. If the storage account's soft delete feature is
* enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible
* immediately. However, the blob service retains the blob or snapshot for the number of days specified
* by the DeleteRetentionPolicy section of [Storage service properties]
* (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is
* permanently removed from the storage account. Note that you continue to be charged for the
* soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the
* "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You
* can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a
* soft-deleted blob or snapshot causes the service to return an HTTP status code of 404
* (ResourceNotFound).
* @param options The options parameters.
*/
delete(options) {
return this.client.sendOperationRequest({ options }, deleteOperationSpec);
}
/**
* Undelete a blob that was previously soft deleted
* @param options The options parameters.
*/
undelete(options) {
return this.client.sendOperationRequest({ options }, undeleteOperationSpec);
}
/**
* Sets the time a blob will expire and be deleted.
* @param expiryOptions Required. Indicates mode of the expiry time
* @param options The options parameters.
*/
setExpiry(expiryOptions, options) {
return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec);
}
/**
* The Set HTTP Headers operation sets system properties on the blob
* @param options The options parameters.
*/
setHttpHeaders(options) {
return this.client.sendOperationRequest({ options }, setHttpHeadersOperationSpec);
}
/**
* The Set Immutability Policy operation sets the immutability policy on the blob
* @param options The options parameters.
*/
setImmutabilityPolicy(options) {
return this.client.sendOperationRequest({ options }, setImmutabilityPolicyOperationSpec);
}
/**
* The Delete Immutability Policy operation deletes the immutability policy on the blob
* @param options The options parameters.
*/
deleteImmutabilityPolicy(options) {
return this.client.sendOperationRequest({ options }, deleteImmutabilityPolicyOperationSpec);
}
/**
* The Set Legal Hold operation sets a legal hold on the blob.
* @param legalHold Specified if a legal hold should be set on the blob.
* @param options The options parameters.
*/
setLegalHold(legalHold, options) {
return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec);
}
/**
* The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more
* name-value pairs
* @param options The options parameters.
*/
setMetadata(options) {
return this.client.sendOperationRequest({ options }, setMetadataOperationSpec);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
* operations
* @param options The options parameters.
*/
acquireLease(options) {
return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
* operations
* @param leaseId Specifies the current lease ID on the resource.
* @param options The options parameters.
*/
releaseLease(leaseId, options) {
return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
* operations
* @param leaseId Specifies the current lease ID on the resource.
* @param options The options parameters.
*/
renewLease(leaseId, options) {
return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
* operations
* @param leaseId Specifies the current lease ID on the resource.
* @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400
* (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor
* (String) for a list of valid GUID string formats.
* @param options The options parameters.
*/
changeLease(leaseId, proposedLeaseId, options) {
return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
* operations
* @param options The options parameters.
*/
breakLease(options) {
return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec);
}
/**
* The Create Snapshot operation creates a read-only snapshot of a blob
* @param options The options parameters.
*/
createSnapshot(options) {
return this.client.sendOperationRequest({ options }, createSnapshotOperationSpec);
}
/**
* The Start Copy From URL operation copies a blob or an internet resource to a new blob.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to
* 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would
* appear in a request URI. The source blob must either be public or must be authenticated via a shared
* access signature.
* @param options The options parameters.
*/
startCopyFromURL(copySource, options) {
return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec);
}
/**
* The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return
* a response until the copy is complete.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to
* 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would
* appear in a request URI. The source blob must either be public or must be authenticated via a shared
* access signature.
* @param options The options parameters.
*/
copyFromURL(copySource, options) {
return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec);
}
/**
* The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination
* blob with zero length and full metadata.
* @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob
* operation.
* @param options The options parameters.
*/
abortCopyFromURL(copyId, options) {
return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec);
}
/**
* The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium
* storage account and on a block blob in a blob storage account (locally redundant storage only). A
* premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block
* blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's
* ETag.
* @param tier Indicates the tier to be set on the blob.
* @param options The options parameters.
*/
setTier(tier, options) {
return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec);
}
/**
* Returns the sku name and account kind
* @param options The options parameters.
*/
getAccountInfo(options) {
return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec);
}
/**
* The Query operation enables users to select/project on blob data by providing simple query
* expressions.
* @param options The options parameters.
*/
query(options) {
return this.client.sendOperationRequest({ options }, queryOperationSpec);
}
/**
* The Get Tags operation enables users to get the tags associated with a blob.
* @param options The options parameters.
*/
getTags(options) {
return this.client.sendOperationRequest({ options }, getTagsOperationSpec);
}
/**
* The Set Tags operation enables users to set tags on a blob.
* @param options The options parameters.
*/
setTags(options) {
return this.client.sendOperationRequest({ options }, setTagsOperationSpec);
}
}
// Operation Specifications
const xmlSerializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
const downloadOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: { name: "Stream" },
serializedName: "parsedResponse",
},
headersMapper: BlobDownloadHeaders,
},
206: {
bodyMapper: {
type: { name: "Stream" },
serializedName: "parsedResponse",
},
headersMapper: BlobDownloadHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobDownloadExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
snapshot,
versionId,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
range,
rangeGetContentMD5,
rangeGetContentCRC64,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
],
isXML: true,
serializer: xmlSerializer$3,
};
const getPropertiesOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "HEAD",
responses: {
200: {
headersMapper: BlobGetPropertiesHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobGetPropertiesExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
snapshot,
versionId,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
],
isXML: true,
serializer: xmlSerializer$3,
};
const deleteOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "DELETE",
responses: {
202: {
headersMapper: BlobDeleteHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobDeleteExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
snapshot,
versionId,
blobDeleteType,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
ifMatch,
ifNoneMatch,
ifTags,
deleteSnapshots,
],
isXML: true,
serializer: xmlSerializer$3,
};
const undeleteOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobUndeleteHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobUndeleteExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp8],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$3,
};
const setExpiryOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobSetExpiryHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobSetExpiryExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp11],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
expiryOptions,
expiresOn,
],
isXML: true,
serializer: xmlSerializer$3,
};
const setHttpHeadersOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobSetHttpHeadersHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobSetHttpHeadersExceptionHeaders,
},
},
queryParameters: [comp, timeoutInSeconds],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
ifMatch,
ifNoneMatch,
ifTags,
blobCacheControl,
blobContentType,
blobContentMD5,
blobContentEncoding,
blobContentLanguage,
blobContentDisposition,
],
isXML: true,
serializer: xmlSerializer$3,
};
const setImmutabilityPolicyOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobSetImmutabilityPolicyHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobSetImmutabilityPolicyExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
snapshot,
versionId,
comp12,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifUnmodifiedSince,
immutabilityPolicyExpiry,
immutabilityPolicyMode,
],
isXML: true,
serializer: xmlSerializer$3,
};
const deleteImmutabilityPolicyOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "DELETE",
responses: {
200: {
headersMapper: BlobDeleteImmutabilityPolicyHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
snapshot,
versionId,
comp12,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$3,
};
const setLegalHoldOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobSetLegalHoldHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobSetLegalHoldExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
snapshot,
versionId,
comp13,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
legalHold,
],
isXML: true,
serializer: xmlSerializer$3,
};
const setMetadataOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobSetMetadataHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobSetMetadataExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp6],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
metadata,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
encryptionScope,
],
isXML: true,
serializer: xmlSerializer$3,
};
const acquireLeaseOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: BlobAcquireLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobAcquireLeaseExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp10],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
action,
duration,
proposedLeaseId,
ifMatch,
ifNoneMatch,
ifTags,
],
isXML: true,
serializer: xmlSerializer$3,
};
const releaseLeaseOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobReleaseLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobReleaseLeaseExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp10],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
action1,
leaseId1,
ifMatch,
ifNoneMatch,
ifTags,
],
isXML: true,
serializer: xmlSerializer$3,
};
const renewLeaseOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobRenewLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobRenewLeaseExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp10],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
leaseId1,
action2,
ifMatch,
ifNoneMatch,
ifTags,
],
isXML: true,
serializer: xmlSerializer$3,
};
const changeLeaseOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobChangeLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobChangeLeaseExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp10],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
leaseId1,
action4,
proposedLeaseId1,
ifMatch,
ifNoneMatch,
ifTags,
],
isXML: true,
serializer: xmlSerializer$3,
};
const breakLeaseOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
202: {
headersMapper: BlobBreakLeaseHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobBreakLeaseExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp10],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
action3,
breakPeriod,
ifMatch,
ifNoneMatch,
ifTags,
],
isXML: true,
serializer: xmlSerializer$3,
};
const createSnapshotOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: BlobCreateSnapshotHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobCreateSnapshotExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp14],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
metadata,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
encryptionScope,
],
isXML: true,
serializer: xmlSerializer$3,
};
const startCopyFromURLOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
202: {
headersMapper: BlobStartCopyFromURLHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobStartCopyFromURLExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
metadata,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
ifMatch,
ifNoneMatch,
ifTags,
immutabilityPolicyExpiry,
immutabilityPolicyMode,
tier,
rehydratePriority,
sourceIfModifiedSince,
sourceIfUnmodifiedSince,
sourceIfMatch,
sourceIfNoneMatch,
sourceIfTags,
copySource,
blobTagsString,
sealBlob,
legalHold1,
],
isXML: true,
serializer: xmlSerializer$3,
};
const copyFromURLOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
202: {
headersMapper: BlobCopyFromURLHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobCopyFromURLExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
metadata,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
ifMatch,
ifNoneMatch,
ifTags,
immutabilityPolicyExpiry,
immutabilityPolicyMode,
encryptionScope,
tier,
sourceIfModifiedSince,
sourceIfUnmodifiedSince,
sourceIfMatch,
sourceIfNoneMatch,
copySource,
blobTagsString,
legalHold1,
xMsRequiresSync,
sourceContentMD5,
copySourceAuthorization,
copySourceTags,
],
isXML: true,
serializer: xmlSerializer$3,
};
const abortCopyFromURLOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
204: {
headersMapper: BlobAbortCopyFromURLHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobAbortCopyFromURLExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
comp15,
copyId,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
copyActionAbortConstant,
],
isXML: true,
serializer: xmlSerializer$3,
};
const setTierOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: BlobSetTierHeaders,
},
202: {
headersMapper: BlobSetTierHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobSetTierExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
snapshot,
versionId,
comp16,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifTags,
rehydratePriority,
tier1,
],
isXML: true,
serializer: xmlSerializer$3,
};
const getAccountInfoOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "GET",
responses: {
200: {
headersMapper: BlobGetAccountInfoHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobGetAccountInfoExceptionHeaders,
},
},
queryParameters: [
comp,
timeoutInSeconds,
restype1,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
],
isXML: true,
serializer: xmlSerializer$3,
};
const queryOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "POST",
responses: {
200: {
bodyMapper: {
type: { name: "Stream" },
serializedName: "parsedResponse",
},
headersMapper: BlobQueryHeaders,
},
206: {
bodyMapper: {
type: { name: "Stream" },
serializedName: "parsedResponse",
},
headersMapper: BlobQueryHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobQueryExceptionHeaders,
},
},
requestBody: queryRequest,
queryParameters: [
timeoutInSeconds,
snapshot,
comp17,
],
urlParameters: [url],
headerParameters: [
contentType,
accept,
version,
requestId,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "xml",
serializer: xmlSerializer$3,
};
const getTagsOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: BlobTags,
headersMapper: BlobGetTagsHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobGetTagsExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
snapshot,
versionId,
comp18,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifTags,
],
isXML: true,
serializer: xmlSerializer$3,
};
const setTagsOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
204: {
headersMapper: BlobSetTagsHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlobSetTagsExceptionHeaders,
},
},
requestBody: tags,
queryParameters: [
timeoutInSeconds,
versionId,
comp18,
],
urlParameters: [url],
headerParameters: [
contentType,
accept,
version,
requestId,
leaseId,
ifTags,
transactionalContentMD5,
transactionalContentCrc64,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "xml",
serializer: xmlSerializer$3,
};
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
/** Class containing PageBlob operations. */
class PageBlobImpl {
/**
* Initialize a new instance of the class PageBlob class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* The Create operation creates a new page blob.
* @param contentLength The length of the request.
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The
* page blob size must be aligned to a 512-byte boundary.
* @param options The options parameters.
*/
create(contentLength, blobContentLength, options) {
return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec$1);
}
/**
* The Upload Pages operation writes a range of pages to a page blob
* @param contentLength The length of the request.
* @param body Initial data
* @param options The options parameters.
*/
uploadPages(contentLength, body, options) {
return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec);
}
/**
* The Clear Pages operation clears a set of pages from a page blob
* @param contentLength The length of the request.
* @param options The options parameters.
*/
clearPages(contentLength, options) {
return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec);
}
/**
* The Upload Pages operation writes a range of pages to a page blob where the contents are read from a
* URL
* @param sourceUrl Specify a URL to the copy source.
* @param sourceRange Bytes of source data in the specified range. The length of this range should
* match the ContentLength header and x-ms-range/Range destination range header.
* @param contentLength The length of the request.
* @param range The range of bytes to which the source range would be written. The range should be 512
* aligned and range-end is required.
* @param options The options parameters.
*/
uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) {
return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec);
}
/**
* The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a
* page blob
* @param options The options parameters.
*/
getPageRanges(options) {
return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec);
}
/**
* The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were
* changed between target blob and previous snapshot.
* @param options The options parameters.
*/
getPageRangesDiff(options) {
return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec);
}
/**
* Resize the Blob
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The
* page blob size must be aligned to a 512-byte boundary.
* @param options The options parameters.
*/
resize(blobContentLength, options) {
return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec);
}
/**
* Update the sequence number of the blob
* @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request.
* This property applies to page blobs only. This property indicates how the service should modify the
* blob's sequence number
* @param options The options parameters.
*/
updateSequenceNumber(sequenceNumberAction, options) {
return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec);
}
/**
* The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob.
* The snapshot is copied such that only the differential changes between the previously copied
* snapshot are transferred to the destination. The copied snapshots are complete copies of the
* original snapshot and can be read or copied from as usual. This API is supported since REST version
* 2016-05-31.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to
* 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would
* appear in a request URI. The source blob must either be public or must be authenticated via a shared
* access signature.
* @param options The options parameters.
*/
copyIncremental(copySource, options) {
return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec);
}
}
// Operation Specifications
const xmlSerializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
const createOperationSpec$1 = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: PageBlobCreateHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: PageBlobCreateExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
contentLength,
metadata,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
blobCacheControl,
blobContentType,
blobContentMD5,
blobContentEncoding,
blobContentLanguage,
blobContentDisposition,
immutabilityPolicyExpiry,
immutabilityPolicyMode,
encryptionScope,
tier,
blobTagsString,
legalHold1,
blobType,
blobContentLength,
blobSequenceNumber,
],
isXML: true,
serializer: xmlSerializer$2,
};
const uploadPagesOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: PageBlobUploadPagesHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: PageBlobUploadPagesExceptionHeaders,
},
},
requestBody: body1,
queryParameters: [timeoutInSeconds, comp19],
urlParameters: [url],
headerParameters: [
version,
requestId,
contentLength,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
range,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
encryptionScope,
transactionalContentMD5,
transactionalContentCrc64,
contentType1,
accept2,
pageWrite,
ifSequenceNumberLessThanOrEqualTo,
ifSequenceNumberLessThan,
ifSequenceNumberEqualTo,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "binary",
serializer: xmlSerializer$2,
};
const clearPagesOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: PageBlobClearPagesHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: PageBlobClearPagesExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp19],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
contentLength,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
range,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
encryptionScope,
ifSequenceNumberLessThanOrEqualTo,
ifSequenceNumberLessThan,
ifSequenceNumberEqualTo,
pageWrite1,
],
isXML: true,
serializer: xmlSerializer$2,
};
const uploadPagesFromURLOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: PageBlobUploadPagesFromURLHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: PageBlobUploadPagesFromURLExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp19],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
contentLength,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
encryptionScope,
sourceIfModifiedSince,
sourceIfUnmodifiedSince,
sourceIfMatch,
sourceIfNoneMatch,
sourceContentMD5,
copySourceAuthorization,
pageWrite,
ifSequenceNumberLessThanOrEqualTo,
ifSequenceNumberLessThan,
ifSequenceNumberEqualTo,
sourceUrl,
sourceRange,
sourceContentCrc64,
range1,
],
isXML: true,
serializer: xmlSerializer$2,
};
const getPageRangesOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: PageList,
headersMapper: PageBlobGetPageRangesHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: PageBlobGetPageRangesExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
marker,
maxPageSize,
snapshot,
comp20,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
range,
ifMatch,
ifNoneMatch,
ifTags,
],
isXML: true,
serializer: xmlSerializer$2,
};
const getPageRangesDiffOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: PageList,
headersMapper: PageBlobGetPageRangesDiffHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: PageBlobGetPageRangesDiffExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
marker,
maxPageSize,
snapshot,
comp20,
prevsnapshot,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
range,
ifMatch,
ifNoneMatch,
ifTags,
prevSnapshotUrl,
],
isXML: true,
serializer: xmlSerializer$2,
};
const resizeOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: PageBlobResizeHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: PageBlobResizeExceptionHeaders,
},
},
queryParameters: [comp, timeoutInSeconds],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
encryptionScope,
blobContentLength,
],
isXML: true,
serializer: xmlSerializer$2,
};
const updateSequenceNumberOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: PageBlobUpdateSequenceNumberHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders,
},
},
queryParameters: [comp, timeoutInSeconds],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
ifMatch,
ifNoneMatch,
ifTags,
blobSequenceNumber,
sequenceNumberAction,
],
isXML: true,
serializer: xmlSerializer$2,
};
const copyIncrementalOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
202: {
headersMapper: PageBlobCopyIncrementalHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: PageBlobCopyIncrementalExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp21],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
ifModifiedSince,
ifUnmodifiedSince,
ifMatch,
ifNoneMatch,
ifTags,
copySource,
],
isXML: true,
serializer: xmlSerializer$2,
};
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
/** Class containing AppendBlob operations. */
class AppendBlobImpl {
/**
* Initialize a new instance of the class AppendBlob class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* The Create Append Blob operation creates a new append blob.
* @param contentLength The length of the request.
* @param options The options parameters.
*/
create(contentLength, options) {
return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The
* Append Block operation is permitted only if the blob was created with x-ms-blob-type set to
* AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
* @param contentLength The length of the request.
* @param body Initial data
* @param options The options parameters.
*/
appendBlock(contentLength, body, options) {
return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob where
* the contents are read from a source url. The Append Block operation is permitted only if the blob
* was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version
* 2015-02-21 version or later.
* @param sourceUrl Specify a URL to the copy source.
* @param contentLength The length of the request.
* @param options The options parameters.
*/
appendBlockFromUrl(sourceUrl, contentLength, options) {
return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec);
}
/**
* The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version
* 2019-12-12 version or later.
* @param options The options parameters.
*/
seal(options) {
return this.client.sendOperationRequest({ options }, sealOperationSpec);
}
}
// Operation Specifications
const xmlSerializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
const createOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: AppendBlobCreateHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: AppendBlobCreateExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
contentLength,
metadata,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
blobCacheControl,
blobContentType,
blobContentMD5,
blobContentEncoding,
blobContentLanguage,
blobContentDisposition,
immutabilityPolicyExpiry,
immutabilityPolicyMode,
encryptionScope,
blobTagsString,
legalHold1,
blobType1,
],
isXML: true,
serializer: xmlSerializer$1,
};
const appendBlockOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: AppendBlobAppendBlockHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: AppendBlobAppendBlockExceptionHeaders,
},
},
requestBody: body1,
queryParameters: [timeoutInSeconds, comp22],
urlParameters: [url],
headerParameters: [
version,
requestId,
contentLength,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
encryptionScope,
transactionalContentMD5,
transactionalContentCrc64,
contentType1,
accept2,
maxSize,
appendPosition,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "binary",
serializer: xmlSerializer$1,
};
const appendBlockFromUrlOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: AppendBlobAppendBlockFromUrlHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp22],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
contentLength,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
encryptionScope,
sourceIfModifiedSince,
sourceIfUnmodifiedSince,
sourceIfMatch,
sourceIfNoneMatch,
sourceContentMD5,
copySourceAuthorization,
transactionalContentMD5,
sourceUrl,
sourceContentCrc64,
maxSize,
appendPosition,
sourceRange1,
],
isXML: true,
serializer: xmlSerializer$1,
};
const sealOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
200: {
headersMapper: AppendBlobSealHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: AppendBlobSealExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds, comp23],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
ifMatch,
ifNoneMatch,
appendPosition,
],
isXML: true,
serializer: xmlSerializer$1,
};
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
/** Class containing BlockBlob operations. */
class BlockBlobImpl {
/**
* Initialize a new instance of the class BlockBlob class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* The Upload Block Blob operation updates the content of an existing block blob. Updating an existing
* block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put
* Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a
* partial update of the content of a block blob, use the Put Block List operation.
* @param contentLength The length of the request.
* @param body Initial data
* @param options The options parameters.
*/
upload(contentLength, body, options) {
return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec);
}
/**
* The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read
* from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are
* not supported with Put Blob from URL; the content of an existing blob is overwritten with the
* content of the new blob. To perform partial updates to a block blob’s contents using a source URL,
* use the Put Block from URL API in conjunction with Put Block List.
* @param contentLength The length of the request.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to
* 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would
* appear in a request URI. The source blob must either be public or must be authenticated via a shared
* access signature.
* @param options The options parameters.
*/
putBlobFromUrl(contentLength, copySource, options) {
return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec);
}
/**
* The Stage Block operation creates a new block to be committed as part of a blob
* @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string
* must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified
* for the blockid parameter must be the same size for each block.
* @param contentLength The length of the request.
* @param body Initial data
* @param options The options parameters.
*/
stageBlock(blockId, contentLength, body, options) {
return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec);
}
/**
* The Stage Block operation creates a new block to be committed as part of a blob where the contents
* are read from a URL.
* @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string
* must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified
* for the blockid parameter must be the same size for each block.
* @param contentLength The length of the request.
* @param sourceUrl Specify a URL to the copy source.
* @param options The options parameters.
*/
stageBlockFromURL(blockId, contentLength, sourceUrl, options) {
return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec);
}
/**
* The Commit Block List operation writes a blob by specifying the list of block IDs that make up the
* blob. In order to be written as part of a blob, a block must have been successfully written to the
* server in a prior Put Block operation. You can call Put Block List to update a blob by uploading
* only those blocks that have changed, then committing the new and existing blocks together. You can
* do this by specifying whether to commit a block from the committed block list or from the
* uncommitted block list, or to commit the most recently uploaded version of the block, whichever list
* it may belong to.
* @param blocks Blob Blocks.
* @param options The options parameters.
*/
commitBlockList(blocks, options) {
return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec);
}
/**
* The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block
* blob
* @param listType Specifies whether to return the list of committed blocks, the list of uncommitted
* blocks, or both lists together.
* @param options The options parameters.
*/
getBlockList(listType, options) {
return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec);
}
}
// Operation Specifications
const xmlSerializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ true);
const uploadOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: BlockBlobUploadHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlockBlobUploadExceptionHeaders,
},
},
requestBody: body1,
queryParameters: [timeoutInSeconds],
urlParameters: [url],
headerParameters: [
version,
requestId,
contentLength,
metadata,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
blobCacheControl,
blobContentType,
blobContentMD5,
blobContentEncoding,
blobContentLanguage,
blobContentDisposition,
immutabilityPolicyExpiry,
immutabilityPolicyMode,
encryptionScope,
tier,
blobTagsString,
legalHold1,
transactionalContentMD5,
transactionalContentCrc64,
contentType1,
accept2,
blobType2,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "binary",
serializer: xmlSerializer,
};
const putBlobFromUrlOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: BlockBlobPutBlobFromUrlHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders,
},
},
queryParameters: [timeoutInSeconds],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
contentLength,
metadata,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
blobCacheControl,
blobContentType,
blobContentMD5,
blobContentEncoding,
blobContentLanguage,
blobContentDisposition,
encryptionScope,
tier,
sourceIfModifiedSince,
sourceIfUnmodifiedSince,
sourceIfMatch,
sourceIfNoneMatch,
sourceIfTags,
copySource,
blobTagsString,
sourceContentMD5,
copySourceAuthorization,
copySourceTags,
transactionalContentMD5,
blobType2,
copySourceBlobProperties,
],
isXML: true,
serializer: xmlSerializer,
};
const stageBlockOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: BlockBlobStageBlockHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlockBlobStageBlockExceptionHeaders,
},
},
requestBody: body1,
queryParameters: [
timeoutInSeconds,
comp24,
blockId,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
contentLength,
leaseId,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
encryptionScope,
transactionalContentMD5,
transactionalContentCrc64,
contentType1,
accept2,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "binary",
serializer: xmlSerializer,
};
const stageBlockFromURLOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: BlockBlobStageBlockFromURLHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlockBlobStageBlockFromURLExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
comp24,
blockId,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
contentLength,
leaseId,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
encryptionScope,
sourceIfModifiedSince,
sourceIfUnmodifiedSince,
sourceIfMatch,
sourceIfNoneMatch,
sourceContentMD5,
copySourceAuthorization,
sourceUrl,
sourceContentCrc64,
sourceRange1,
],
isXML: true,
serializer: xmlSerializer,
};
const commitBlockListOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "PUT",
responses: {
201: {
headersMapper: BlockBlobCommitBlockListHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlockBlobCommitBlockListExceptionHeaders,
},
},
requestBody: blocks,
queryParameters: [timeoutInSeconds, comp25],
urlParameters: [url],
headerParameters: [
contentType,
accept,
version,
requestId,
metadata,
leaseId,
ifModifiedSince,
ifUnmodifiedSince,
encryptionKey,
encryptionKeySha256,
encryptionAlgorithm,
ifMatch,
ifNoneMatch,
ifTags,
blobCacheControl,
blobContentType,
blobContentMD5,
blobContentEncoding,
blobContentLanguage,
blobContentDisposition,
immutabilityPolicyExpiry,
immutabilityPolicyMode,
encryptionScope,
tier,
blobTagsString,
legalHold1,
transactionalContentMD5,
transactionalContentCrc64,
],
isXML: true,
contentType: "application/xml; charset=utf-8",
mediaType: "xml",
serializer: xmlSerializer,
};
const getBlockListOperationSpec = {
path: "/{containerName}/{blob}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: BlockList,
headersMapper: BlockBlobGetBlockListHeaders,
},
default: {
bodyMapper: StorageError,
headersMapper: BlockBlobGetBlockListExceptionHeaders,
},
},
queryParameters: [
timeoutInSeconds,
snapshot,
comp25,
listType,
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1,
leaseId,
ifTags,
],
isXML: true,
serializer: xmlSerializer,
};
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient {
/**
* Initializes a new instance of the StorageClient class.
* @param url The URL of the service account, container, or blob that is the target of the desired
* operation.
* @param options The parameter options
*/
constructor(url, options) {
var _a, _b;
if (url === undefined) {
throw new Error("'url' cannot be null");
}
// Initializing default values for options
if (!options) {
options = {};
}
const defaults = {
requestContentType: "application/json; charset=utf-8",
};
const packageDetails = `azsdk-js-azure-storage-blob/12.27.0`;
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
userAgentPrefix,
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" });
super(optionsWithDefaults);
// Parameter assignments
this.url = url;
// Assigning values to Constant parameters
this.version = options.version || "2025-05-05";
this.service = new ServiceImpl(this);
this.container = new ContainerImpl(this);
this.blob = new BlobImpl(this);
this.pageBlob = new PageBlobImpl(this);
this.appendBlob = new AppendBlobImpl(this);
this.blockBlob = new BlockBlobImpl(this);
}
};
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* @internal
*/
class StorageContextClient extends StorageClient$1 {
async sendOperationRequest(operationArguments, operationSpec) {
const operationSpecToSend = Object.assign({}, operationSpec);
if (operationSpecToSend.path === "/{containerName}" ||
operationSpecToSend.path === "/{containerName}/{blob}") {
operationSpecToSend.path = "";
}
return super.sendOperationRequest(operationArguments, operationSpecToSend);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}
* and etc.
*/
class StorageClient {
/**
* Creates an instance of StorageClient.
* @param url - url to resource
* @param pipeline - request policy pipeline.
*/
constructor(url, pipeline) {
// URL should be encoded and only once, protocol layer shouldn't encode URL again
this.url = escapeURLPath(url);
this.accountName = getAccountNameFromUrl(url);
this.pipeline = pipeline;
this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));
this.isHttps = iEqual(getURLScheme(this.url) || "", "https");
this.credential = getCredentialFromPipeline(pipeline);
// Override protocol layer's default content-type
const storageClientContext = this.storageClientContext;
storageClientContext.requestContentType = undefined;
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Creates a span using the global tracer.
* @internal
*/
const tracingClient = coreTracing.createTracingClient({
packageName: "@azure/storage-blob",
packageVersion: SDK_VERSION,
namespace: "Microsoft.Storage",
});
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting
* a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all
* the values are set, this should be serialized with toString and set as the permissions field on a
* {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but
* the order of the permissions is particular and this class guarantees correctness.
*/
class BlobSASPermissions {
constructor() {
/**
* Specifies Read access granted.
*/
this.read = false;
/**
* Specifies Add access granted.
*/
this.add = false;
/**
* Specifies Create access granted.
*/
this.create = false;
/**
* Specifies Write access granted.
*/
this.write = false;
/**
* Specifies Delete access granted.
*/
this.delete = false;
/**
* Specifies Delete version access granted.
*/
this.deleteVersion = false;
/**
* Specfies Tag access granted.
*/
this.tag = false;
/**
* Specifies Move access granted.
*/
this.move = false;
/**
* Specifies Execute access granted.
*/
this.execute = false;
/**
* Specifies SetImmutabilityPolicy access granted.
*/
this.setImmutabilityPolicy = false;
/**
* Specifies that Permanent Delete is permitted.
*/
this.permanentDelete = false;
}
/**
* Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an
* Error if it encounters a character that does not correspond to a valid permission.
*
* @param permissions -
*/
static parse(permissions) {
const blobSASPermissions = new BlobSASPermissions();
for (const char of permissions) {
switch (char) {
case "r":
blobSASPermissions.read = true;
break;
case "a":
blobSASPermissions.add = true;
break;
case "c":
blobSASPermissions.create = true;
break;
case "w":
blobSASPermissions.write = true;
break;
case "d":
blobSASPermissions.delete = true;
break;
case "x":
blobSASPermissions.deleteVersion = true;
break;
case "t":
blobSASPermissions.tag = true;
break;
case "m":
blobSASPermissions.move = true;
break;
case "e":
blobSASPermissions.execute = true;
break;
case "i":
blobSASPermissions.setImmutabilityPolicy = true;
break;
case "y":
blobSASPermissions.permanentDelete = true;
break;
default:
throw new RangeError(`Invalid permission: ${char}`);
}
}
return blobSASPermissions;
}
/**
* Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it
* and boolean values for them.
*
* @param permissionLike -
*/
static from(permissionLike) {
const blobSASPermissions = new BlobSASPermissions();
if (permissionLike.read) {
blobSASPermissions.read = true;
}
if (permissionLike.add) {
blobSASPermissions.add = true;
}
if (permissionLike.create) {
blobSASPermissions.create = true;
}
if (permissionLike.write) {
blobSASPermissions.write = true;
}
if (permissionLike.delete) {
blobSASPermissions.delete = true;
}
if (permissionLike.deleteVersion) {
blobSASPermissions.deleteVersion = true;
}
if (permissionLike.tag) {
blobSASPermissions.tag = true;
}
if (permissionLike.move) {
blobSASPermissions.move = true;
}
if (permissionLike.execute) {
blobSASPermissions.execute = true;
}
if (permissionLike.setImmutabilityPolicy) {
blobSASPermissions.setImmutabilityPolicy = true;
}
if (permissionLike.permanentDelete) {
blobSASPermissions.permanentDelete = true;
}
return blobSASPermissions;
}
/**
* Converts the given permissions to a string. Using this method will guarantee the permissions are in an
* order accepted by the service.
*
* @returns A string which represents the BlobSASPermissions
*/
toString() {
const permissions = [];
if (this.read) {
permissions.push("r");
}
if (this.add) {
permissions.push("a");
}
if (this.create) {
permissions.push("c");
}
if (this.write) {
permissions.push("w");
}
if (this.delete) {
permissions.push("d");
}
if (this.deleteVersion) {
permissions.push("x");
}
if (this.tag) {
permissions.push("t");
}
if (this.move) {
permissions.push("m");
}
if (this.execute) {
permissions.push("e");
}
if (this.setImmutabilityPolicy) {
permissions.push("i");
}
if (this.permanentDelete) {
permissions.push("y");
}
return permissions.join("");
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.
* Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.
* Once all the values are set, this should be serialized with toString and set as the permissions field on a
* {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but
* the order of the permissions is particular and this class guarantees correctness.
*/
class ContainerSASPermissions {
constructor() {
/**
* Specifies Read access granted.
*/
this.read = false;
/**
* Specifies Add access granted.
*/
this.add = false;
/**
* Specifies Create access granted.
*/
this.create = false;
/**
* Specifies Write access granted.
*/
this.write = false;
/**
* Specifies Delete access granted.
*/
this.delete = false;
/**
* Specifies Delete version access granted.
*/
this.deleteVersion = false;
/**
* Specifies List access granted.
*/
this.list = false;
/**
* Specfies Tag access granted.
*/
this.tag = false;
/**
* Specifies Move access granted.
*/
this.move = false;
/**
* Specifies Execute access granted.
*/
this.execute = false;
/**
* Specifies SetImmutabilityPolicy access granted.
*/
this.setImmutabilityPolicy = false;
/**
* Specifies that Permanent Delete is permitted.
*/
this.permanentDelete = false;
/**
* Specifies that Filter Blobs by Tags is permitted.
*/
this.filterByTags = false;
}
/**
* Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
* Error if it encounters a character that does not correspond to a valid permission.
*
* @param permissions -
*/
static parse(permissions) {
const containerSASPermissions = new ContainerSASPermissions();
for (const char of permissions) {
switch (char) {
case "r":
containerSASPermissions.read = true;
break;
case "a":
containerSASPermissions.add = true;
break;
case "c":
containerSASPermissions.create = true;
break;
case "w":
containerSASPermissions.write = true;
break;
case "d":
containerSASPermissions.delete = true;
break;
case "l":
containerSASPermissions.list = true;
break;
case "t":
containerSASPermissions.tag = true;
break;
case "x":
containerSASPermissions.deleteVersion = true;
break;
case "m":
containerSASPermissions.move = true;
break;
case "e":
containerSASPermissions.execute = true;
break;
case "i":
containerSASPermissions.setImmutabilityPolicy = true;
break;
case "y":
containerSASPermissions.permanentDelete = true;
break;
case "f":
containerSASPermissions.filterByTags = true;
break;
default:
throw new RangeError(`Invalid permission ${char}`);
}
}
return containerSASPermissions;
}
/**
* Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it
* and boolean values for them.
*
* @param permissionLike -
*/
static from(permissionLike) {
const containerSASPermissions = new ContainerSASPermissions();
if (permissionLike.read) {
containerSASPermissions.read = true;
}
if (permissionLike.add) {
containerSASPermissions.add = true;
}
if (permissionLike.create) {
containerSASPermissions.create = true;
}
if (permissionLike.write) {
containerSASPermissions.write = true;
}
if (permissionLike.delete) {
containerSASPermissions.delete = true;
}
if (permissionLike.list) {
containerSASPermissions.list = true;
}
if (permissionLike.deleteVersion) {
containerSASPermissions.deleteVersion = true;
}
if (permissionLike.tag) {
containerSASPermissions.tag = true;
}
if (permissionLike.move) {
containerSASPermissions.move = true;
}
if (permissionLike.execute) {
containerSASPermissions.execute = true;
}
if (permissionLike.setImmutabilityPolicy) {
containerSASPermissions.setImmutabilityPolicy = true;
}
if (permissionLike.permanentDelete) {
containerSASPermissions.permanentDelete = true;
}
if (permissionLike.filterByTags) {
containerSASPermissions.filterByTags = true;
}
return containerSASPermissions;
}
/**
* Converts the given permissions to a string. Using this method will guarantee the permissions are in an
* order accepted by the service.
*
* The order of the characters should be as specified here to ensure correctness.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
*
*/
toString() {
const permissions = [];
if (this.read) {
permissions.push("r");
}
if (this.add) {
permissions.push("a");
}
if (this.create) {
permissions.push("c");
}
if (this.write) {
permissions.push("w");
}
if (this.delete) {
permissions.push("d");
}
if (this.deleteVersion) {
permissions.push("x");
}
if (this.list) {
permissions.push("l");
}
if (this.tag) {
permissions.push("t");
}
if (this.move) {
permissions.push("m");
}
if (this.execute) {
permissions.push("e");
}
if (this.setImmutabilityPolicy) {
permissions.push("i");
}
if (this.permanentDelete) {
permissions.push("y");
}
if (this.filterByTags) {
permissions.push("f");
}
return permissions.join("");
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* UserDelegationKeyCredential is only used for generation of user delegation SAS.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas
*/
class UserDelegationKeyCredential {
/**
* Creates an instance of UserDelegationKeyCredential.
* @param accountName -
* @param userDelegationKey -
*/
constructor(accountName, userDelegationKey) {
this.accountName = accountName;
this.userDelegationKey = userDelegationKey;
this.key = Buffer.from(userDelegationKey.value, "base64");
}
/**
* Generates a hash signature for an HTTP request or for a SAS.
*
* @param stringToSign -
*/
computeHMACSHA256(stringToSign) {
// console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Generate SasIPRange format string. For example:
*
* "8.8.8.8" or "1.1.1.1-255.255.255.255"
*
* @param ipRange -
*/
function ipRangeToString(ipRange) {
return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Protocols for generated SAS.
*/
exports.SASProtocol = void 0;
(function (SASProtocol) {
/**
* Protocol that allows HTTPS only
*/
SASProtocol["Https"] = "https";
/**
* Protocol that allows both HTTPS and HTTP
*/
SASProtocol["HttpsAndHttp"] = "https,http";
})(exports.SASProtocol || (exports.SASProtocol = {}));
/**
* Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly
* by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}
* types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should
* be taken here in case there are existing query parameters, which might affect the appropriate means of appending
* these query parameters).
*
* NOTE: Instances of this class are immutable.
*/
class SASQueryParameters {
/**
* Optional. IP range allowed for this SAS.
*
* @readonly
*/
get ipRange() {
if (this.ipRangeInner) {
return {
end: this.ipRangeInner.end,
start: this.ipRangeInner.start,
};
}
return undefined;
}
constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {
this.version = version;
this.signature = signature;
if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") {
// SASQueryParametersOptions
this.permissions = permissionsOrOptions.permissions;
this.services = permissionsOrOptions.services;
this.resourceTypes = permissionsOrOptions.resourceTypes;
this.protocol = permissionsOrOptions.protocol;
this.startsOn = permissionsOrOptions.startsOn;
this.expiresOn = permissionsOrOptions.expiresOn;
this.ipRangeInner = permissionsOrOptions.ipRange;
this.identifier = permissionsOrOptions.identifier;
this.encryptionScope = permissionsOrOptions.encryptionScope;
this.resource = permissionsOrOptions.resource;
this.cacheControl = permissionsOrOptions.cacheControl;
this.contentDisposition = permissionsOrOptions.contentDisposition;
this.contentEncoding = permissionsOrOptions.contentEncoding;
this.contentLanguage = permissionsOrOptions.contentLanguage;
this.contentType = permissionsOrOptions.contentType;
if (permissionsOrOptions.userDelegationKey) {
this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId;
this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId;
this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn;
this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn;
this.signedService = permissionsOrOptions.userDelegationKey.signedService;
this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion;
this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId;
this.correlationId = permissionsOrOptions.correlationId;
}
}
else {
this.services = services;
this.resourceTypes = resourceTypes;
this.expiresOn = expiresOn;
this.permissions = permissionsOrOptions;
this.protocol = protocol;
this.startsOn = startsOn;
this.ipRangeInner = ipRange;
this.encryptionScope = encryptionScope;
this.identifier = identifier;
this.resource = resource;
this.cacheControl = cacheControl;
this.contentDisposition = contentDisposition;
this.contentEncoding = contentEncoding;
this.contentLanguage = contentLanguage;
this.contentType = contentType;
if (userDelegationKey) {
this.signedOid = userDelegationKey.signedObjectId;
this.signedTenantId = userDelegationKey.signedTenantId;
this.signedStartsOn = userDelegationKey.signedStartsOn;
this.signedExpiresOn = userDelegationKey.signedExpiresOn;
this.signedService = userDelegationKey.signedService;
this.signedVersion = userDelegationKey.signedVersion;
this.preauthorizedAgentObjectId = preauthorizedAgentObjectId;
this.correlationId = correlationId;
}
}
}
/**
* Encodes all SAS query parameters into a string that can be appended to a URL.
*
*/
toString() {
const params = [
"sv",
"ss",
"srt",
"spr",
"st",
"se",
"sip",
"si",
"ses",
"skoid", // Signed object ID
"sktid", // Signed tenant ID
"skt", // Signed key start time
"ske", // Signed key expiry time
"sks", // Signed key service
"skv", // Signed key version
"sr",
"sp",
"sig",
"rscc",
"rscd",
"rsce",
"rscl",
"rsct",
"saoid",
"scid",
];
const queries = [];
for (const param of params) {
switch (param) {
case "sv":
this.tryAppendQueryParameter(queries, param, this.version);
break;
case "ss":
this.tryAppendQueryParameter(queries, param, this.services);
break;
case "srt":
this.tryAppendQueryParameter(queries, param, this.resourceTypes);
break;
case "spr":
this.tryAppendQueryParameter(queries, param, this.protocol);
break;
case "st":
this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined);
break;
case "se":
this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined);
break;
case "sip":
this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : undefined);
break;
case "si":
this.tryAppendQueryParameter(queries, param, this.identifier);
break;
case "ses":
this.tryAppendQueryParameter(queries, param, this.encryptionScope);
break;
case "skoid": // Signed object ID
this.tryAppendQueryParameter(queries, param, this.signedOid);
break;
case "sktid": // Signed tenant ID
this.tryAppendQueryParameter(queries, param, this.signedTenantId);
break;
case "skt": // Signed key start time
this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined);
break;
case "ske": // Signed key expiry time
this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined);
break;
case "sks": // Signed key service
this.tryAppendQueryParameter(queries, param, this.signedService);
break;
case "skv": // Signed key version
this.tryAppendQueryParameter(queries, param, this.signedVersion);
break;
case "sr":
this.tryAppendQueryParameter(queries, param, this.resource);
break;
case "sp":
this.tryAppendQueryParameter(queries, param, this.permissions);
break;
case "sig":
this.tryAppendQueryParameter(queries, param, this.signature);
break;
case "rscc":
this.tryAppendQueryParameter(queries, param, this.cacheControl);
break;
case "rscd":
this.tryAppendQueryParameter(queries, param, this.contentDisposition);
break;
case "rsce":
this.tryAppendQueryParameter(queries, param, this.contentEncoding);
break;
case "rscl":
this.tryAppendQueryParameter(queries, param, this.contentLanguage);
break;
case "rsct":
this.tryAppendQueryParameter(queries, param, this.contentType);
break;
case "saoid":
this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId);
break;
case "scid":
this.tryAppendQueryParameter(queries, param, this.correlationId);
break;
}
}
return queries.join("&");
}
/**
* A private helper method used to filter and append query key/value pairs into an array.
*
* @param queries -
* @param key -
* @param value -
*/
tryAppendQueryParameter(queries, key, value) {
if (!value) {
return;
}
key = encodeURIComponent(key);
value = encodeURIComponent(value);
if (key.length > 0 && value.length > 0) {
queries.push(`${key}=${value}`);
}
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) {
return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters;
}
function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) {
const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;
const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential
? sharedKeyCredentialOrUserDelegationKey
: undefined;
let userDelegationKeyCredential;
if (sharedKeyCredential === undefined && accountName !== undefined) {
userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey);
}
if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {
throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");
}
// Version 2020-12-06 adds support for encryptionscope in SAS.
if (version >= "2020-12-06") {
if (sharedKeyCredential !== undefined) {
return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);
}
else {
return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential);
}
}
// Version 2019-12-12 adds support for the blob tags permission.
// Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.
// https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string
if (version >= "2018-11-09") {
if (sharedKeyCredential !== undefined) {
return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential);
}
else {
// Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId.
if (version >= "2020-02-10") {
return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential);
}
else {
return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential);
}
}
}
if (version >= "2015-04-05") {
if (sharedKeyCredential !== undefined) {
return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential);
}
else {
throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.");
}
}
throw new RangeError("'version' must be >= '2015-04-05'.");
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn and identifier.
*
* WARNING: When identifier is not provided, permissions and expiresOn are required.
* You MUST assign value to identifier or expiresOn & permissions manually if you initial with
* this constructor.
*
* @param blobSASSignatureValues -
* @param sharedKeyCredential -
*/
function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
if (!blobSASSignatureValues.identifier &&
!(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
}
let resource = "c";
if (blobSASSignatureValues.blobName) {
resource = "b";
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
blobSASSignatureValues.identifier,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
].join("\n");
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return {
sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType),
stringToSign: stringToSign,
};
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn and identifier.
*
* WARNING: When identifier is not provided, permissions and expiresOn are required.
* You MUST assign value to identifier or expiresOn & permissions manually if you initial with
* this constructor.
*
* @param blobSASSignatureValues -
* @param sharedKeyCredential -
*/
function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
if (!blobSASSignatureValues.identifier &&
!(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
}
let resource = "c";
let timestamp = blobSASSignatureValues.snapshotTime;
if (blobSASSignatureValues.blobName) {
resource = "b";
if (blobSASSignatureValues.snapshotTime) {
resource = "bs";
}
else if (blobSASSignatureValues.versionId) {
resource = "bv";
timestamp = blobSASSignatureValues.versionId;
}
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
blobSASSignatureValues.identifier,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
resource,
timestamp,
blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
].join("\n");
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return {
sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType),
stringToSign: stringToSign,
};
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn and identifier.
*
* WARNING: When identifier is not provided, permissions and expiresOn are required.
* You MUST assign value to identifier or expiresOn & permissions manually if you initial with
* this constructor.
*
* @param blobSASSignatureValues -
* @param sharedKeyCredential -
*/
function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
if (!blobSASSignatureValues.identifier &&
!(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
}
let resource = "c";
let timestamp = blobSASSignatureValues.snapshotTime;
if (blobSASSignatureValues.blobName) {
resource = "b";
if (blobSASSignatureValues.snapshotTime) {
resource = "bs";
}
else if (blobSASSignatureValues.versionId) {
resource = "bv";
timestamp = blobSASSignatureValues.versionId;
}
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
blobSASSignatureValues.identifier,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
resource,
timestamp,
blobSASSignatureValues.encryptionScope,
blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
].join("\n");
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return {
sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope),
stringToSign: stringToSign,
};
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn.
*
* WARNING: identifier will be ignored, permissions and expiresOn are required.
*
* @param blobSASSignatureValues -
* @param userDelegationKeyCredential -
*/
function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
// Stored access policies are not supported for a user delegation SAS.
if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
}
let resource = "c";
let timestamp = blobSASSignatureValues.snapshotTime;
if (blobSASSignatureValues.blobName) {
resource = "b";
if (blobSASSignatureValues.snapshotTime) {
resource = "bs";
}
else if (blobSASSignatureValues.versionId) {
resource = "bv";
timestamp = blobSASSignatureValues.versionId;
}
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
userDelegationKeyCredential.userDelegationKey.signedObjectId,
userDelegationKeyCredential.userDelegationKey.signedTenantId,
userDelegationKeyCredential.userDelegationKey.signedStartsOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedExpiresOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedService,
userDelegationKeyCredential.userDelegationKey.signedVersion,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
resource,
timestamp,
blobSASSignatureValues.cacheControl,
blobSASSignatureValues.contentDisposition,
blobSASSignatureValues.contentEncoding,
blobSASSignatureValues.contentLanguage,
blobSASSignatureValues.contentType,
].join("\n");
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
return {
sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey),
stringToSign: stringToSign,
};
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2020-02-10.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn.
*
* WARNING: identifier will be ignored, permissions and expiresOn are required.
*
* @param blobSASSignatureValues -
* @param userDelegationKeyCredential -
*/
function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
// Stored access policies are not supported for a user delegation SAS.
if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
}
let resource = "c";
let timestamp = blobSASSignatureValues.snapshotTime;
if (blobSASSignatureValues.blobName) {
resource = "b";
if (blobSASSignatureValues.snapshotTime) {
resource = "bs";
}
else if (blobSASSignatureValues.versionId) {
resource = "bv";
timestamp = blobSASSignatureValues.versionId;
}
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
userDelegationKeyCredential.userDelegationKey.signedObjectId,
userDelegationKeyCredential.userDelegationKey.signedTenantId,
userDelegationKeyCredential.userDelegationKey.signedStartsOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedExpiresOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedService,
userDelegationKeyCredential.userDelegationKey.signedVersion,
blobSASSignatureValues.preauthorizedAgentObjectId,
undefined, // agentObjectId
blobSASSignatureValues.correlationId,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
resource,
timestamp,
blobSASSignatureValues.cacheControl,
blobSASSignatureValues.contentDisposition,
blobSASSignatureValues.contentEncoding,
blobSASSignatureValues.contentLanguage,
blobSASSignatureValues.contentType,
].join("\n");
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
return {
sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId),
stringToSign: stringToSign,
};
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn.
*
* WARNING: identifier will be ignored, permissions and expiresOn are required.
*
* @param blobSASSignatureValues -
* @param userDelegationKeyCredential -
*/
function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
// Stored access policies are not supported for a user delegation SAS.
if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
}
let resource = "c";
let timestamp = blobSASSignatureValues.snapshotTime;
if (blobSASSignatureValues.blobName) {
resource = "b";
if (blobSASSignatureValues.snapshotTime) {
resource = "bs";
}
else if (blobSASSignatureValues.versionId) {
resource = "bv";
timestamp = blobSASSignatureValues.versionId;
}
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
userDelegationKeyCredential.userDelegationKey.signedObjectId,
userDelegationKeyCredential.userDelegationKey.signedTenantId,
userDelegationKeyCredential.userDelegationKey.signedStartsOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedExpiresOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedService,
userDelegationKeyCredential.userDelegationKey.signedVersion,
blobSASSignatureValues.preauthorizedAgentObjectId,
undefined, // agentObjectId
blobSASSignatureValues.correlationId,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
resource,
timestamp,
blobSASSignatureValues.encryptionScope,
blobSASSignatureValues.cacheControl,
blobSASSignatureValues.contentDisposition,
blobSASSignatureValues.contentEncoding,
blobSASSignatureValues.contentLanguage,
blobSASSignatureValues.contentType,
].join("\n");
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
return {
sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope),
stringToSign: stringToSign,
};
}
function getCanonicalName(accountName, containerName, blobName) {
// Container: "/blob/account/containerName"
// Blob: "/blob/account/containerName/blobName"
const elements = [`/blob/${accountName}/${containerName}`];
if (blobName) {
elements.push(`/${blobName}`);
}
return elements.join("");
}
function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;
if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") {
throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");
}
if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) {
throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");
}
if (blobSASSignatureValues.versionId && version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");
}
if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) {
throw RangeError("Must provide 'blobName' when providing 'versionId'.");
}
if (blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.setImmutabilityPolicy &&
version < "2020-08-04") {
throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");
}
if (blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.deleteVersion &&
version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");
}
if (blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.permanentDelete &&
version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");
}
if (blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.tag &&
version < "2019-12-12") {
throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");
}
if (version < "2020-02-10" &&
blobSASSignatureValues.permissions &&
(blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {
throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");
}
if (version < "2021-04-10" &&
blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.filterByTags) {
throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");
}
if (version < "2020-02-10" &&
(blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {
throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");
}
if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") {
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
}
blobSASSignatureValues.version = version;
return blobSASSignatureValues;
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.
*/
class BlobLeaseClient {
/**
* Gets the lease Id.
*
* @readonly
*/
get leaseId() {
return this._leaseId;
}
/**
* Gets the url.
*
* @readonly
*/
get url() {
return this._url;
}
/**
* Creates an instance of BlobLeaseClient.
* @param client - The client to make the lease operation requests.
* @param leaseId - Initial proposed lease id.
*/
constructor(client, leaseId) {
const clientContext = client.storageClientContext;
this._url = client.url;
if (client.name === undefined) {
this._isContainer = true;
this._containerOrBlobOperation = clientContext.container;
}
else {
this._isContainer = false;
this._containerOrBlobOperation = clientContext.blob;
}
if (!leaseId) {
leaseId = coreUtil.randomUUID();
}
this._leaseId = leaseId;
}
/**
* Establishes and manages a lock on a container for delete operations, or on a blob
* for write and delete operations.
* The lock duration can be 15 to 60 seconds, or can be infinite.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container
* and
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob
*
* @param duration - Must be between 15 to 60 seconds, or infinite (-1)
* @param options - option to configure lease management operations.
* @returns Response data for acquire lease operation.
*/
async acquireLease(duration, options = {}) {
var _a, _b, _c, _d, _e;
if (this._isContainer &&
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
}
return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => {
var _a;
return assertResponse(await this._containerOrBlobOperation.acquireLease({
abortSignal: options.abortSignal,
duration,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
proposedLeaseId: this._leaseId,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* To change the ID of the lease.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container
* and
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob
*
* @param proposedLeaseId - the proposed new lease Id.
* @param options - option to configure lease management operations.
* @returns Response data for change lease operation.
*/
async changeLease(proposedLeaseId, options = {}) {
var _a, _b, _c, _d, _e;
if (this._isContainer &&
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
}
return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => {
var _a;
const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, {
abortSignal: options.abortSignal,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
}));
this._leaseId = proposedLeaseId;
return response;
});
}
/**
* To free the lease if it is no longer needed so that another client may
* immediately acquire a lease against the container or the blob.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container
* and
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob
*
* @param options - option to configure lease management operations.
* @returns Response data for release lease operation.
*/
async releaseLease(options = {}) {
var _a, _b, _c, _d, _e;
if (this._isContainer &&
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
}
return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => {
var _a;
return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, {
abortSignal: options.abortSignal,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* To renew the lease.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container
* and
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob
*
* @param options - Optional option to configure lease management operations.
* @returns Response data for renew lease operation.
*/
async renewLease(options = {}) {
var _a, _b, _c, _d, _e;
if (this._isContainer &&
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
}
return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => {
var _a;
return this._containerOrBlobOperation.renewLease(this._leaseId, {
abortSignal: options.abortSignal,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
});
});
}
/**
* To end the lease but ensure that another client cannot acquire a new lease
* until the current lease period has expired.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container
* and
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob
*
* @param breakPeriod - Break period
* @param options - Optional options to configure lease management operations.
* @returns Response data for break lease operation.
*/
async breakLease(breakPeriod, options = {}) {
var _a, _b, _c, _d, _e;
if (this._isContainer &&
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
}
return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => {
var _a;
const operationOptions = {
abortSignal: options.abortSignal,
breakPeriod,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
};
return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions));
});
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends.
*/
class RetriableReadableStream extends stream.Readable {
/**
* Creates an instance of RetriableReadableStream.
*
* @param source - The current ReadableStream returned from getter
* @param getter - A method calling downloading request returning
* a new ReadableStream from specified offset
* @param offset - Offset position in original data source to read
* @param count - How much data in original data source to read
* @param options -
*/
constructor(source, getter, offset, count, options = {}) {
super({ highWaterMark: options.highWaterMark });
this.retries = 0;
this.sourceDataHandler = (data) => {
if (this.options.doInjectErrorOnce) {
this.options.doInjectErrorOnce = undefined;
this.source.pause();
this.sourceErrorOrEndHandler();
this.source.destroy();
return;
}
// console.log(
// `Offset: ${this.offset}, Received ${data.length} from internal stream`
// );
this.offset += data.length;
if (this.onProgress) {
this.onProgress({ loadedBytes: this.offset - this.start });
}
if (!this.push(data)) {
this.source.pause();
}
};
this.sourceAbortedHandler = () => {
const abortError = new abortController.AbortError("The operation was aborted.");
this.destroy(abortError);
};
this.sourceErrorOrEndHandler = (err) => {
if (err && err.name === "AbortError") {
this.destroy(err);
return;
}
// console.log(
// `Source stream emits end or error, offset: ${
// this.offset
// }, dest end : ${this.end}`
// );
this.removeSourceEventHandlers();
if (this.offset - 1 === this.end) {
this.push(null);
}
else if (this.offset <= this.end) {
// console.log(
// `retries: ${this.retries}, max retries: ${this.maxRetries}`
// );
if (this.retries < this.maxRetryRequests) {
this.retries += 1;
this.getter(this.offset)
.then((newSource) => {
this.source = newSource;
this.setSourceEventHandlers();
return;
})
.catch((error) => {
this.destroy(error);
});
}
else {
this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
}
}
else {
this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`));
}
};
this.getter = getter;
this.source = source;
this.start = offset;
this.offset = offset;
this.end = offset + count - 1;
this.maxRetryRequests =
options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;
this.onProgress = options.onProgress;
this.options = options;
this.setSourceEventHandlers();
}
_read() {
this.source.resume();
}
setSourceEventHandlers() {
this.source.on("data", this.sourceDataHandler);
this.source.on("end", this.sourceErrorOrEndHandler);
this.source.on("error", this.sourceErrorOrEndHandler);
// needed for Node14
this.source.on("aborted", this.sourceAbortedHandler);
}
removeSourceEventHandlers() {
this.source.removeListener("data", this.sourceDataHandler);
this.source.removeListener("end", this.sourceErrorOrEndHandler);
this.source.removeListener("error", this.sourceErrorOrEndHandler);
this.source.removeListener("aborted", this.sourceAbortedHandler);
}
_destroy(error, callback) {
// remove listener from source and release source
this.removeSourceEventHandlers();
this.source.destroy();
callback(error === null ? undefined : error);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will
* automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot
* trigger retries defined in pipeline retry policy.)
*
* The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js
* Readable stream.
*/
class BlobDownloadResponse {
/**
* Indicates that the service supports
* requests for partial file content.
*
* @readonly
*/
get acceptRanges() {
return this.originalResponse.acceptRanges;
}
/**
* Returns if it was previously specified
* for the file.
*
* @readonly
*/
get cacheControl() {
return this.originalResponse.cacheControl;
}
/**
* Returns the value that was specified
* for the 'x-ms-content-disposition' header and specifies how to process the
* response.
*
* @readonly
*/
get contentDisposition() {
return this.originalResponse.contentDisposition;
}
/**
* Returns the value that was specified
* for the Content-Encoding request header.
*
* @readonly
*/
get contentEncoding() {
return this.originalResponse.contentEncoding;
}
/**
* Returns the value that was specified
* for the Content-Language request header.
*
* @readonly
*/
get contentLanguage() {
return this.originalResponse.contentLanguage;
}
/**
* The current sequence number for a
* page blob. This header is not returned for block blobs or append blobs.
*
* @readonly
*/
get blobSequenceNumber() {
return this.originalResponse.blobSequenceNumber;
}
/**
* The blob's type. Possible values include:
* 'BlockBlob', 'PageBlob', 'AppendBlob'.
*
* @readonly
*/
get blobType() {
return this.originalResponse.blobType;
}
/**
* The number of bytes present in the
* response body.
*
* @readonly
*/
get contentLength() {
return this.originalResponse.contentLength;
}
/**
* If the file has an MD5 hash and the
* request is to read the full file, this response header is returned so that
* the client can check for message content integrity. If the request is to
* read a specified range and the 'x-ms-range-get-content-md5' is set to
* true, then the request returns an MD5 hash for the range, as long as the
* range size is less than or equal to 4 MB. If neither of these sets of
* conditions is true, then no value is returned for the 'Content-MD5'
* header.
*
* @readonly
*/
get contentMD5() {
return this.originalResponse.contentMD5;
}
/**
* Indicates the range of bytes returned if
* the client requested a subset of the file by setting the Range request
* header.
*
* @readonly
*/
get contentRange() {
return this.originalResponse.contentRange;
}
/**
* The content type specified for the file.
* The default content type is 'application/octet-stream'
*
* @readonly
*/
get contentType() {
return this.originalResponse.contentType;
}
/**
* Conclusion time of the last attempted
* Copy File operation where this file was the destination file. This value
* can specify the time of a completed, aborted, or failed copy attempt.
*
* @readonly
*/
get copyCompletedOn() {
return this.originalResponse.copyCompletedOn;
}
/**
* String identifier for the last attempted Copy
* File operation where this file was the destination file.
*
* @readonly
*/
get copyId() {
return this.originalResponse.copyId;
}
/**
* Contains the number of bytes copied and
* the total bytes in the source in the last attempted Copy File operation
* where this file was the destination file. Can show between 0 and
* Content-Length bytes copied.
*
* @readonly
*/
get copyProgress() {
return this.originalResponse.copyProgress;
}
/**
* URL up to 2KB in length that specifies the
* source file used in the last attempted Copy File operation where this file
* was the destination file.
*
* @readonly
*/
get copySource() {
return this.originalResponse.copySource;
}
/**
* State of the copy operation
* identified by 'x-ms-copy-id'. Possible values include: 'pending',
* 'success', 'aborted', 'failed'
*
* @readonly
*/
get copyStatus() {
return this.originalResponse.copyStatus;
}
/**
* Only appears when
* x-ms-copy-status is failed or pending. Describes cause of fatal or
* non-fatal copy operation failure.
*
* @readonly
*/
get copyStatusDescription() {
return this.originalResponse.copyStatusDescription;
}
/**
* When a blob is leased,
* specifies whether the lease is of infinite or fixed duration. Possible
* values include: 'infinite', 'fixed'.
*
* @readonly
*/
get leaseDuration() {
return this.originalResponse.leaseDuration;
}
/**
* Lease state of the blob. Possible
* values include: 'available', 'leased', 'expired', 'breaking', 'broken'.
*
* @readonly
*/
get leaseState() {
return this.originalResponse.leaseState;
}
/**
* The current lease status of the
* blob. Possible values include: 'locked', 'unlocked'.
*
* @readonly
*/
get leaseStatus() {
return this.originalResponse.leaseStatus;
}
/**
* A UTC date/time value generated by the service that
* indicates the time at which the response was initiated.
*
* @readonly
*/
get date() {
return this.originalResponse.date;
}
/**
* The number of committed blocks
* present in the blob. This header is returned only for append blobs.
*
* @readonly
*/
get blobCommittedBlockCount() {
return this.originalResponse.blobCommittedBlockCount;
}
/**
* The ETag contains a value that you can use to
* perform operations conditionally, in quotes.
*
* @readonly
*/
get etag() {
return this.originalResponse.etag;
}
/**
* The number of tags associated with the blob
*
* @readonly
*/
get tagCount() {
return this.originalResponse.tagCount;
}
/**
* The error code.
*
* @readonly
*/
get errorCode() {
return this.originalResponse.errorCode;
}
/**
* The value of this header is set to
* true if the file data and application metadata are completely encrypted
* using the specified algorithm. Otherwise, the value is set to false (when
* the file is unencrypted, or if only parts of the file/application metadata
* are encrypted).
*
* @readonly
*/
get isServerEncrypted() {
return this.originalResponse.isServerEncrypted;
}
/**
* If the blob has a MD5 hash, and if
* request contains range header (Range or x-ms-range), this response header
* is returned with the value of the whole blob's MD5 value. This value may
* or may not be equal to the value returned in Content-MD5 header, with the
* latter calculated from the requested range.
*
* @readonly
*/
get blobContentMD5() {
return this.originalResponse.blobContentMD5;
}
/**
* Returns the date and time the file was last
* modified. Any operation that modifies the file or its properties updates
* the last modified time.
*
* @readonly
*/
get lastModified() {
return this.originalResponse.lastModified;
}
/**
* Returns the UTC date and time generated by the service that indicates the time at which the blob was
* last read or written to.
*
* @readonly
*/
get lastAccessed() {
return this.originalResponse.lastAccessed;
}
/**
* Returns the date and time the blob was created.
*
* @readonly
*/
get createdOn() {
return this.originalResponse.createdOn;
}
/**
* A name-value pair
* to associate with a file storage object.
*
* @readonly
*/
get metadata() {
return this.originalResponse.metadata;
}
/**
* This header uniquely identifies the request
* that was made and can be used for troubleshooting the request.
*
* @readonly
*/
get requestId() {
return this.originalResponse.requestId;
}
/**
* If a client request id header is sent in the request, this header will be present in the
* response with the same value.
*
* @readonly
*/
get clientRequestId() {
return this.originalResponse.clientRequestId;
}
/**
* Indicates the version of the Blob service used
* to execute the request.
*
* @readonly
*/
get version() {
return this.originalResponse.version;
}
/**
* Indicates the versionId of the downloaded blob version.
*
* @readonly
*/
get versionId() {
return this.originalResponse.versionId;
}
/**
* Indicates whether version of this blob is a current version.
*
* @readonly
*/
get isCurrentVersion() {
return this.originalResponse.isCurrentVersion;
}
/**
* The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned
* when the blob was encrypted with a customer-provided key.
*
* @readonly
*/
get encryptionKeySha256() {
return this.originalResponse.encryptionKeySha256;
}
/**
* If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to
* true, then the request returns a crc64 for the range, as long as the range size is less than
* or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is
* specified in the same request, it will fail with 400(Bad Request)
*/
get contentCrc64() {
return this.originalResponse.contentCrc64;
}
/**
* Object Replication Policy Id of the destination blob.
*
* @readonly
*/
get objectReplicationDestinationPolicyId() {
return this.originalResponse.objectReplicationDestinationPolicyId;
}
/**
* Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.
*
* @readonly
*/
get objectReplicationSourceProperties() {
return this.originalResponse.objectReplicationSourceProperties;
}
/**
* If this blob has been sealed.
*
* @readonly
*/
get isSealed() {
return this.originalResponse.isSealed;
}
/**
* UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire.
*
* @readonly
*/
get immutabilityPolicyExpiresOn() {
return this.originalResponse.immutabilityPolicyExpiresOn;
}
/**
* Indicates immutability policy mode.
*
* @readonly
*/
get immutabilityPolicyMode() {
return this.originalResponse.immutabilityPolicyMode;
}
/**
* Indicates if a legal hold is present on the blob.
*
* @readonly
*/
get legalHold() {
return this.originalResponse.legalHold;
}
/**
* The response body as a browser Blob.
* Always undefined in node.js.
*
* @readonly
*/
get contentAsBlob() {
return this.originalResponse.blobBody;
}
/**
* The response body as a node.js Readable stream.
* Always undefined in the browser.
*
* It will automatically retry when internal read stream unexpected ends.
*
* @readonly
*/
get readableStreamBody() {
return coreUtil.isNode ? this.blobDownloadStream : undefined;
}
/**
* The HTTP response.
*/
get _response() {
return this.originalResponse._response;
}
/**
* Creates an instance of BlobDownloadResponse.
*
* @param originalResponse -
* @param getter -
* @param offset -
* @param count -
* @param options -
*/
constructor(originalResponse, getter, offset, count, options = {}) {
this.originalResponse = originalResponse;
this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const AVRO_SYNC_MARKER_SIZE = 16;
const AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]);
const AVRO_CODEC_KEY = "avro.codec";
const AVRO_SCHEMA_KEY = "avro.schema";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
class AvroParser {
/**
* Reads a fixed number of bytes from the stream.
*
* @param stream -
* @param length -
* @param options -
*/
static async readFixedBytes(stream, length, options = {}) {
const bytes = await stream.read(length, { abortSignal: options.abortSignal });
if (bytes.length !== length) {
throw new Error("Hit stream end.");
}
return bytes;
}
/**
* Reads a single byte from the stream.
*
* @param stream -
* @param options -
*/
static async readByte(stream, options = {}) {
const buf = await AvroParser.readFixedBytes(stream, 1, options);
return buf[0];
}
// int and long are stored in variable-length zig-zag coding.
// variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt
// zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types
static async readZigZagLong(stream, options = {}) {
let zigZagEncoded = 0;
let significanceInBit = 0;
let byte, haveMoreByte, significanceInFloat;
do {
byte = await AvroParser.readByte(stream, options);
haveMoreByte = byte & 0x80;
zigZagEncoded |= (byte & 0x7f) << significanceInBit;
significanceInBit += 7;
} while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers
if (haveMoreByte) {
// Switch to float arithmetic
// eslint-disable-next-line no-self-assign
zigZagEncoded = zigZagEncoded;
significanceInFloat = 268435456; // 2 ** 28.
do {
byte = await AvroParser.readByte(stream, options);
zigZagEncoded += (byte & 0x7f) * significanceInFloat;
significanceInFloat *= 128; // 2 ** 7
} while (byte & 0x80);
const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2;
if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) {
throw new Error("Integer overflow.");
}
return res;
}
return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1);
}
static async readLong(stream, options = {}) {
return AvroParser.readZigZagLong(stream, options);
}
static async readInt(stream, options = {}) {
return AvroParser.readZigZagLong(stream, options);
}
static async readNull() {
return null;
}
static async readBoolean(stream, options = {}) {
const b = await AvroParser.readByte(stream, options);
if (b === 1) {
return true;
}
else if (b === 0) {
return false;
}
else {
throw new Error("Byte was not a boolean.");
}
}
static async readFloat(stream, options = {}) {
const u8arr = await AvroParser.readFixedBytes(stream, 4, options);
const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);
return view.getFloat32(0, true); // littleEndian = true
}
static async readDouble(stream, options = {}) {
const u8arr = await AvroParser.readFixedBytes(stream, 8, options);
const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);
return view.getFloat64(0, true); // littleEndian = true
}
static async readBytes(stream, options = {}) {
const size = await AvroParser.readLong(stream, options);
if (size < 0) {
throw new Error("Bytes size was negative.");
}
return stream.read(size, { abortSignal: options.abortSignal });
}
static async readString(stream, options = {}) {
const u8arr = await AvroParser.readBytes(stream, options);
const utf8decoder = new TextDecoder();
return utf8decoder.decode(u8arr);
}
static async readMapPair(stream, readItemMethod, options = {}) {
const key = await AvroParser.readString(stream, options);
// FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter.
const value = await readItemMethod(stream, options);
return { key, value };
}
static async readMap(stream, readItemMethod, options = {}) {
const readPairMethod = (s, opts = {}) => {
return AvroParser.readMapPair(s, readItemMethod, opts);
};
const pairs = await AvroParser.readArray(stream, readPairMethod, options);
const dict = {};
for (const pair of pairs) {
dict[pair.key] = pair.value;
}
return dict;
}
static async readArray(stream, readItemMethod, options = {}) {
const items = [];
for (let count = await AvroParser.readLong(stream, options); count !== 0; count = await AvroParser.readLong(stream, options)) {
if (count < 0) {
// Ignore block sizes
await AvroParser.readLong(stream, options);
count = -count;
}
while (count--) {
const item = await readItemMethod(stream, options);
items.push(item);
}
}
return items;
}
}
var AvroComplex;
(function (AvroComplex) {
AvroComplex["RECORD"] = "record";
AvroComplex["ENUM"] = "enum";
AvroComplex["ARRAY"] = "array";
AvroComplex["MAP"] = "map";
AvroComplex["UNION"] = "union";
AvroComplex["FIXED"] = "fixed";
})(AvroComplex || (AvroComplex = {}));
var AvroPrimitive;
(function (AvroPrimitive) {
AvroPrimitive["NULL"] = "null";
AvroPrimitive["BOOLEAN"] = "boolean";
AvroPrimitive["INT"] = "int";
AvroPrimitive["LONG"] = "long";
AvroPrimitive["FLOAT"] = "float";
AvroPrimitive["DOUBLE"] = "double";
AvroPrimitive["BYTES"] = "bytes";
AvroPrimitive["STRING"] = "string";
})(AvroPrimitive || (AvroPrimitive = {}));
class AvroType {
/**
* Determines the AvroType from the Avro Schema.
*/
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
static fromSchema(schema) {
if (typeof schema === "string") {
return AvroType.fromStringSchema(schema);
}
else if (Array.isArray(schema)) {
return AvroType.fromArraySchema(schema);
}
else {
return AvroType.fromObjectSchema(schema);
}
}
static fromStringSchema(schema) {
switch (schema) {
case AvroPrimitive.NULL:
case AvroPrimitive.BOOLEAN:
case AvroPrimitive.INT:
case AvroPrimitive.LONG:
case AvroPrimitive.FLOAT:
case AvroPrimitive.DOUBLE:
case AvroPrimitive.BYTES:
case AvroPrimitive.STRING:
return new AvroPrimitiveType(schema);
default:
throw new Error(`Unexpected Avro type ${schema}`);
}
}
static fromArraySchema(schema) {
return new AvroUnionType(schema.map(AvroType.fromSchema));
}
static fromObjectSchema(schema) {
const type = schema.type;
// Primitives can be defined as strings or objects
try {
return AvroType.fromStringSchema(type);
}
catch (_a) {
// no-op
}
switch (type) {
case AvroComplex.RECORD:
if (schema.aliases) {
throw new Error(`aliases currently is not supported, schema: ${schema}`);
}
if (!schema.name) {
throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`);
}
// eslint-disable-next-line no-case-declarations
const fields = {};
if (!schema.fields) {
throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`);
}
for (const field of schema.fields) {
fields[field.name] = AvroType.fromSchema(field.type);
}
return new AvroRecordType(fields, schema.name);
case AvroComplex.ENUM:
if (schema.aliases) {
throw new Error(`aliases currently is not supported, schema: ${schema}`);
}
if (!schema.symbols) {
throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`);
}
return new AvroEnumType(schema.symbols);
case AvroComplex.MAP:
if (!schema.values) {
throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`);
}
return new AvroMapType(AvroType.fromSchema(schema.values));
case AvroComplex.ARRAY: // Unused today
case AvroComplex.FIXED: // Unused today
default:
throw new Error(`Unexpected Avro type ${type} in ${schema}`);
}
}
}
class AvroPrimitiveType extends AvroType {
constructor(primitive) {
super();
this._primitive = primitive;
}
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
read(stream, options = {}) {
switch (this._primitive) {
case AvroPrimitive.NULL:
return AvroParser.readNull();
case AvroPrimitive.BOOLEAN:
return AvroParser.readBoolean(stream, options);
case AvroPrimitive.INT:
return AvroParser.readInt(stream, options);
case AvroPrimitive.LONG:
return AvroParser.readLong(stream, options);
case AvroPrimitive.FLOAT:
return AvroParser.readFloat(stream, options);
case AvroPrimitive.DOUBLE:
return AvroParser.readDouble(stream, options);
case AvroPrimitive.BYTES:
return AvroParser.readBytes(stream, options);
case AvroPrimitive.STRING:
return AvroParser.readString(stream, options);
default:
throw new Error("Unknown Avro Primitive");
}
}
}
class AvroEnumType extends AvroType {
constructor(symbols) {
super();
this._symbols = symbols;
}
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
async read(stream, options = {}) {
const value = await AvroParser.readInt(stream, options);
return this._symbols[value];
}
}
class AvroUnionType extends AvroType {
constructor(types) {
super();
this._types = types;
}
async read(stream, options = {}) {
const typeIndex = await AvroParser.readInt(stream, options);
return this._types[typeIndex].read(stream, options);
}
}
class AvroMapType extends AvroType {
constructor(itemType) {
super();
this._itemType = itemType;
}
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
read(stream, options = {}) {
const readItemMethod = (s, opts) => {
return this._itemType.read(s, opts);
};
return AvroParser.readMap(stream, readItemMethod, options);
}
}
class AvroRecordType extends AvroType {
constructor(fields, name) {
super();
this._fields = fields;
this._name = name;
}
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
async read(stream, options = {}) {
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
const record = {};
record["$schema"] = this._name;
for (const key in this._fields) {
if (Object.prototype.hasOwnProperty.call(this._fields, key)) {
record[key] = await this._fields[key].read(stream, options);
}
}
return record;
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
function arraysEqual(a, b) {
if (a === b)
return true;
if (a == null || b == null)
return false;
if (a.length !== b.length)
return false;
for (let i = 0; i < a.length; ++i) {
if (a[i] !== b[i])
return false;
}
return true;
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
class AvroReader {
get blockOffset() {
return this._blockOffset;
}
get objectIndex() {
return this._objectIndex;
}
constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) {
this._dataStream = dataStream;
this._headerStream = headerStream || dataStream;
this._initialized = false;
this._blockOffset = currentBlockOffset || 0;
this._objectIndex = indexWithinCurrentBlock || 0;
this._initialBlockOffset = currentBlockOffset || 0;
}
async initialize(options = {}) {
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
abortSignal: options.abortSignal,
});
if (!arraysEqual(header, AVRO_INIT_BYTES)) {
throw new Error("Stream is not an Avro file.");
}
// File metadata is written as if defined by the following map schema:
// { "type": "map", "values": "bytes"}
this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
abortSignal: options.abortSignal,
});
// Validate codec
const codec = this._metadata[AVRO_CODEC_KEY];
if (!(codec === undefined || codec === null || codec === "null")) {
throw new Error("Codecs are not supported");
}
// The 16-byte, randomly-generated sync marker for this file.
this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
abortSignal: options.abortSignal,
});
// Parse the schema
const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
this._itemType = AvroType.fromSchema(schema);
if (this._blockOffset === 0) {
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
}
this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
abortSignal: options.abortSignal,
});
// skip block length
await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
this._initialized = true;
if (this._objectIndex && this._objectIndex > 0) {
for (let i = 0; i < this._objectIndex; i++) {
await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal });
this._itemsRemainingInBlock--;
}
}
}
hasNext() {
return !this._initialized || this._itemsRemainingInBlock > 0;
}
parseObjects() {
return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) {
if (!this._initialized) {
yield tslib.__await(this.initialize(options));
}
while (this.hasNext()) {
const result = yield tslib.__await(this._itemType.read(this._dataStream, {
abortSignal: options.abortSignal,
}));
this._itemsRemainingInBlock--;
this._objectIndex++;
if (this._itemsRemainingInBlock === 0) {
const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
abortSignal: options.abortSignal,
}));
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
this._objectIndex = 0;
if (!arraysEqual(this._syncMarker, marker)) {
throw new Error("Stream is not a valid Avro file.");
}
try {
this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
abortSignal: options.abortSignal,
}));
}
catch (_a) {
// We hit the end of the stream.
this._itemsRemainingInBlock = 0;
}
if (this._itemsRemainingInBlock > 0) {
// Ignore block size
yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }));
}
}
yield yield tslib.__await(result);
}
});
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
class AvroReadable {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted.");
class AvroReadableFromStream extends AvroReadable {
toUint8Array(data) {
if (typeof data === "string") {
return Buffer.from(data);
}
return data;
}
constructor(readable) {
super();
this._readable = readable;
this._position = 0;
}
get position() {
return this._position;
}
async read(size, options = {}) {
var _a;
if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {
throw ABORT_ERROR;
}
if (size < 0) {
throw new Error(`size parameter should be positive: ${size}`);
}
if (size === 0) {
return new Uint8Array();
}
if (!this._readable.readable) {
throw new Error("Stream no longer readable.");
}
// See if there is already enough data.
const chunk = this._readable.read(size);
if (chunk) {
this._position += chunk.length;
// chunk.length maybe less than desired size if the stream ends.
return this.toUint8Array(chunk);
}
else {
// register callback to wait for enough data to read
return new Promise((resolve, reject) => {
/* eslint-disable @typescript-eslint/no-use-before-define */
const cleanUp = () => {
this._readable.removeListener("readable", readableCallback);
this._readable.removeListener("error", rejectCallback);
this._readable.removeListener("end", rejectCallback);
this._readable.removeListener("close", rejectCallback);
if (options.abortSignal) {
options.abortSignal.removeEventListener("abort", abortHandler);
}
};
const readableCallback = () => {
const callbackChunk = this._readable.read(size);
if (callbackChunk) {
this._position += callbackChunk.length;
cleanUp();
// callbackChunk.length maybe less than desired size if the stream ends.
resolve(this.toUint8Array(callbackChunk));
}
};
const rejectCallback = () => {
cleanUp();
reject();
};
const abortHandler = () => {
cleanUp();
reject(ABORT_ERROR);
};
this._readable.on("readable", readableCallback);
this._readable.once("error", rejectCallback);
this._readable.once("end", rejectCallback);
this._readable.once("close", rejectCallback);
if (options.abortSignal) {
options.abortSignal.addEventListener("abort", abortHandler);
}
/* eslint-enable @typescript-eslint/no-use-before-define */
});
}
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query.
*/
class BlobQuickQueryStream extends stream.Readable {
/**
* Creates an instance of BlobQuickQueryStream.
*
* @param source - The current ReadableStream returned from getter
* @param options -
*/
constructor(source, options = {}) {
super();
this.avroPaused = true;
this.source = source;
this.onProgress = options.onProgress;
this.onError = options.onError;
this.avroReader = new AvroReader(new AvroReadableFromStream(this.source));
this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal });
}
_read() {
if (this.avroPaused) {
this.readInternal().catch((err) => {
this.emit("error", err);
});
}
}
async readInternal() {
this.avroPaused = false;
let avroNext;
do {
avroNext = await this.avroIter.next();
if (avroNext.done) {
break;
}
const obj = avroNext.value;
const schema = obj.$schema;
if (typeof schema !== "string") {
throw Error("Missing schema in avro record.");
}
switch (schema) {
case "com.microsoft.azure.storage.queryBlobContents.resultData":
{
const data = obj.data;
if (data instanceof Uint8Array === false) {
throw Error("Invalid data in avro result record.");
}
if (!this.push(Buffer.from(data))) {
this.avroPaused = true;
}
}
break;
case "com.microsoft.azure.storage.queryBlobContents.progress":
{
const bytesScanned = obj.bytesScanned;
if (typeof bytesScanned !== "number") {
throw Error("Invalid bytesScanned in avro progress record.");
}
if (this.onProgress) {
this.onProgress({ loadedBytes: bytesScanned });
}
}
break;
case "com.microsoft.azure.storage.queryBlobContents.end":
if (this.onProgress) {
const totalBytes = obj.totalBytes;
if (typeof totalBytes !== "number") {
throw Error("Invalid totalBytes in avro end record.");
}
this.onProgress({ loadedBytes: totalBytes });
}
this.push(null);
break;
case "com.microsoft.azure.storage.queryBlobContents.error":
if (this.onError) {
const fatal = obj.fatal;
if (typeof fatal !== "boolean") {
throw Error("Invalid fatal in avro error record.");
}
const name = obj.name;
if (typeof name !== "string") {
throw Error("Invalid name in avro error record.");
}
const description = obj.description;
if (typeof description !== "string") {
throw Error("Invalid description in avro error record.");
}
const position = obj.position;
if (typeof position !== "number") {
throw Error("Invalid position in avro error record.");
}
this.onError({
position,
name,
isFatal: fatal,
description,
});
}
break;
default:
throw Error(`Unknown schema ${schema} in avro progress record.`);
}
} while (!avroNext.done && !this.avroPaused);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will
* parse avor data returned by blob query.
*/
class BlobQueryResponse {
/**
* Indicates that the service supports
* requests for partial file content.
*
* @readonly
*/
get acceptRanges() {
return this.originalResponse.acceptRanges;
}
/**
* Returns if it was previously specified
* for the file.
*
* @readonly
*/
get cacheControl() {
return this.originalResponse.cacheControl;
}
/**
* Returns the value that was specified
* for the 'x-ms-content-disposition' header and specifies how to process the
* response.
*
* @readonly
*/
get contentDisposition() {
return this.originalResponse.contentDisposition;
}
/**
* Returns the value that was specified
* for the Content-Encoding request header.
*
* @readonly
*/
get contentEncoding() {
return this.originalResponse.contentEncoding;
}
/**
* Returns the value that was specified
* for the Content-Language request header.
*
* @readonly
*/
get contentLanguage() {
return this.originalResponse.contentLanguage;
}
/**
* The current sequence number for a
* page blob. This header is not returned for block blobs or append blobs.
*
* @readonly
*/
get blobSequenceNumber() {
return this.originalResponse.blobSequenceNumber;
}
/**
* The blob's type. Possible values include:
* 'BlockBlob', 'PageBlob', 'AppendBlob'.
*
* @readonly
*/
get blobType() {
return this.originalResponse.blobType;
}
/**
* The number of bytes present in the
* response body.
*
* @readonly
*/
get contentLength() {
return this.originalResponse.contentLength;
}
/**
* If the file has an MD5 hash and the
* request is to read the full file, this response header is returned so that
* the client can check for message content integrity. If the request is to
* read a specified range and the 'x-ms-range-get-content-md5' is set to
* true, then the request returns an MD5 hash for the range, as long as the
* range size is less than or equal to 4 MB. If neither of these sets of
* conditions is true, then no value is returned for the 'Content-MD5'
* header.
*
* @readonly
*/
get contentMD5() {
return this.originalResponse.contentMD5;
}
/**
* Indicates the range of bytes returned if
* the client requested a subset of the file by setting the Range request
* header.
*
* @readonly
*/
get contentRange() {
return this.originalResponse.contentRange;
}
/**
* The content type specified for the file.
* The default content type is 'application/octet-stream'
*
* @readonly
*/
get contentType() {
return this.originalResponse.contentType;
}
/**
* Conclusion time of the last attempted
* Copy File operation where this file was the destination file. This value
* can specify the time of a completed, aborted, or failed copy attempt.
*
* @readonly
*/
get copyCompletedOn() {
return undefined;
}
/**
* String identifier for the last attempted Copy
* File operation where this file was the destination file.
*
* @readonly
*/
get copyId() {
return this.originalResponse.copyId;
}
/**
* Contains the number of bytes copied and
* the total bytes in the source in the last attempted Copy File operation
* where this file was the destination file. Can show between 0 and
* Content-Length bytes copied.
*
* @readonly
*/
get copyProgress() {
return this.originalResponse.copyProgress;
}
/**
* URL up to 2KB in length that specifies the
* source file used in the last attempted Copy File operation where this file
* was the destination file.
*
* @readonly
*/
get copySource() {
return this.originalResponse.copySource;
}
/**
* State of the copy operation
* identified by 'x-ms-copy-id'. Possible values include: 'pending',
* 'success', 'aborted', 'failed'
*
* @readonly
*/
get copyStatus() {
return this.originalResponse.copyStatus;
}
/**
* Only appears when
* x-ms-copy-status is failed or pending. Describes cause of fatal or
* non-fatal copy operation failure.
*
* @readonly
*/
get copyStatusDescription() {
return this.originalResponse.copyStatusDescription;
}
/**
* When a blob is leased,
* specifies whether the lease is of infinite or fixed duration. Possible
* values include: 'infinite', 'fixed'.
*
* @readonly
*/
get leaseDuration() {
return this.originalResponse.leaseDuration;
}
/**
* Lease state of the blob. Possible
* values include: 'available', 'leased', 'expired', 'breaking', 'broken'.
*
* @readonly
*/
get leaseState() {
return this.originalResponse.leaseState;
}
/**
* The current lease status of the
* blob. Possible values include: 'locked', 'unlocked'.
*
* @readonly
*/
get leaseStatus() {
return this.originalResponse.leaseStatus;
}
/**
* A UTC date/time value generated by the service that
* indicates the time at which the response was initiated.
*
* @readonly
*/
get date() {
return this.originalResponse.date;
}
/**
* The number of committed blocks
* present in the blob. This header is returned only for append blobs.
*
* @readonly
*/
get blobCommittedBlockCount() {
return this.originalResponse.blobCommittedBlockCount;
}
/**
* The ETag contains a value that you can use to
* perform operations conditionally, in quotes.
*
* @readonly
*/
get etag() {
return this.originalResponse.etag;
}
/**
* The error code.
*
* @readonly
*/
get errorCode() {
return this.originalResponse.errorCode;
}
/**
* The value of this header is set to
* true if the file data and application metadata are completely encrypted
* using the specified algorithm. Otherwise, the value is set to false (when
* the file is unencrypted, or if only parts of the file/application metadata
* are encrypted).
*
* @readonly
*/
get isServerEncrypted() {
return this.originalResponse.isServerEncrypted;
}
/**
* If the blob has a MD5 hash, and if
* request contains range header (Range or x-ms-range), this response header
* is returned with the value of the whole blob's MD5 value. This value may
* or may not be equal to the value returned in Content-MD5 header, with the
* latter calculated from the requested range.
*
* @readonly
*/
get blobContentMD5() {
return this.originalResponse.blobContentMD5;
}
/**
* Returns the date and time the file was last
* modified. Any operation that modifies the file or its properties updates
* the last modified time.
*
* @readonly
*/
get lastModified() {
return this.originalResponse.lastModified;
}
/**
* A name-value pair
* to associate with a file storage object.
*
* @readonly
*/
get metadata() {
return this.originalResponse.metadata;
}
/**
* This header uniquely identifies the request
* that was made and can be used for troubleshooting the request.
*
* @readonly
*/
get requestId() {
return this.originalResponse.requestId;
}
/**
* If a client request id header is sent in the request, this header will be present in the
* response with the same value.
*
* @readonly
*/
get clientRequestId() {
return this.originalResponse.clientRequestId;
}
/**
* Indicates the version of the File service used
* to execute the request.
*
* @readonly
*/
get version() {
return this.originalResponse.version;
}
/**
* The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned
* when the blob was encrypted with a customer-provided key.
*
* @readonly
*/
get encryptionKeySha256() {
return this.originalResponse.encryptionKeySha256;
}
/**
* If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to
* true, then the request returns a crc64 for the range, as long as the range size is less than
* or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is
* specified in the same request, it will fail with 400(Bad Request)
*/
get contentCrc64() {
return this.originalResponse.contentCrc64;
}
/**
* The response body as a browser Blob.
* Always undefined in node.js.
*
* @readonly
*/
get blobBody() {
return undefined;
}
/**
* The response body as a node.js Readable stream.
* Always undefined in the browser.
*
* It will parse avor data returned by blob query.
*
* @readonly
*/
get readableStreamBody() {
return coreUtil.isNode ? this.blobDownloadStream : undefined;
}
/**
* The HTTP response.
*/
get _response() {
return this.originalResponse._response;
}
/**
* Creates an instance of BlobQueryResponse.
*
* @param originalResponse -
* @param options -
*/
constructor(originalResponse, options = {}) {
this.originalResponse = originalResponse;
this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Represents the access tier on a blob.
* For detailed information about block blob level tiering see {@link https://learn.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}
*/
exports.BlockBlobTier = void 0;
(function (BlockBlobTier) {
/**
* Optimized for storing data that is accessed frequently.
*/
BlockBlobTier["Hot"] = "Hot";
/**
* Optimized for storing data that is infrequently accessed and stored for at least 30 days.
*/
BlockBlobTier["Cool"] = "Cool";
/**
* Optimized for storing data that is rarely accessed.
*/
BlockBlobTier["Cold"] = "Cold";
/**
* Optimized for storing data that is rarely accessed and stored for at least 180 days
* with flexible latency requirements (on the order of hours).
*/
BlockBlobTier["Archive"] = "Archive";
})(exports.BlockBlobTier || (exports.BlockBlobTier = {}));
/**
* Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.
* Please see {@link https://learn.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}
* for detailed information on the corresponding IOPS and throughput per PageBlobTier.
*/
exports.PremiumPageBlobTier = void 0;
(function (PremiumPageBlobTier) {
/**
* P4 Tier.
*/
PremiumPageBlobTier["P4"] = "P4";
/**
* P6 Tier.
*/
PremiumPageBlobTier["P6"] = "P6";
/**
* P10 Tier.
*/
PremiumPageBlobTier["P10"] = "P10";
/**
* P15 Tier.
*/
PremiumPageBlobTier["P15"] = "P15";
/**
* P20 Tier.
*/
PremiumPageBlobTier["P20"] = "P20";
/**
* P30 Tier.
*/
PremiumPageBlobTier["P30"] = "P30";
/**
* P40 Tier.
*/
PremiumPageBlobTier["P40"] = "P40";
/**
* P50 Tier.
*/
PremiumPageBlobTier["P50"] = "P50";
/**
* P60 Tier.
*/
PremiumPageBlobTier["P60"] = "P60";
/**
* P70 Tier.
*/
PremiumPageBlobTier["P70"] = "P70";
/**
* P80 Tier.
*/
PremiumPageBlobTier["P80"] = "P80";
})(exports.PremiumPageBlobTier || (exports.PremiumPageBlobTier = {}));
function toAccessTier(tier) {
if (tier === undefined) {
return undefined;
}
return tier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service).
}
function ensureCpkIfSpecified(cpk, isHttps) {
if (cpk && !isHttps) {
throw new RangeError("Customer-provided encryption key must be used over HTTPS.");
}
if (cpk && !cpk.encryptionAlgorithm) {
cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
}
}
/**
* Defines the known cloud audiences for Storage.
*/
exports.StorageBlobAudience = void 0;
(function (StorageBlobAudience) {
/**
* The OAuth scope to use to retrieve an AAD token for Azure Storage.
*/
StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default";
/**
* The OAuth scope to use to retrieve an AAD token for Azure Disk.
*/
StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default";
})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {}));
/**
*
* To get OAuth audience for a storage account for blob service.
*/
function getBlobServiceAccountAudience(storageAccountName) {
return `https://${storageAccountName}.blob.core.windows.net/.default`;
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Function that converts PageRange and ClearRange to a common Range object.
* PageRange and ClearRange have start and end while Range offset and count
* this function normalizes to Range.
* @param response - Model PageBlob Range response
*/
function rangeResponseFromModel(response) {
const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({
offset: x.start,
count: x.end - x.start,
}));
const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({
offset: x.start,
count: x.end - x.start,
}));
return Object.assign(Object.assign({}, response), { pageRange,
clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {
pageRange,
clearRange,
} }) });
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This is the poller returned by {@link BlobClient.beginCopyFromURL}.
* This can not be instantiated directly outside of this package.
*
* @hidden
*/
class BlobBeginCopyFromUrlPoller extends coreLro.Poller {
constructor(options) {
const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options;
let state;
if (resumeFrom) {
state = JSON.parse(resumeFrom).state;
}
const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { blobClient,
copySource,
startCopyFromURLOptions }));
super(operation);
if (typeof onProgress === "function") {
this.onProgress(onProgress);
}
this.intervalInMs = intervalInMs;
}
delay() {
return coreUtil.delay(this.intervalInMs);
}
}
/**
* Note: Intentionally using function expression over arrow function expression
* so that the function can be invoked with a different context.
* This affects what `this` refers to.
* @hidden
*/
const cancel = async function cancel(options = {}) {
const state = this.state;
const { copyId } = state;
if (state.isCompleted) {
return makeBlobBeginCopyFromURLPollOperation(state);
}
if (!copyId) {
state.isCancelled = true;
return makeBlobBeginCopyFromURLPollOperation(state);
}
// if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call
await state.blobClient.abortCopyFromURL(copyId, {
abortSignal: options.abortSignal,
});
state.isCancelled = true;
return makeBlobBeginCopyFromURLPollOperation(state);
};
/**
* Note: Intentionally using function expression over arrow function expression
* so that the function can be invoked with a different context.
* This affects what `this` refers to.
* @hidden
*/
const update = async function update(options = {}) {
const state = this.state;
const { blobClient, copySource, startCopyFromURLOptions } = state;
if (!state.isStarted) {
state.isStarted = true;
const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions);
// copyId is needed to abort
state.copyId = result.copyId;
if (result.copyStatus === "success") {
state.result = result;
state.isCompleted = true;
}
}
else if (!state.isCompleted) {
try {
const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal });
const { copyStatus, copyProgress } = result;
const prevCopyProgress = state.copyProgress;
if (copyProgress) {
state.copyProgress = copyProgress;
}
if (copyStatus === "pending" &&
copyProgress !== prevCopyProgress &&
typeof options.fireProgress === "function") {
// trigger in setTimeout, or swallow error?
options.fireProgress(state);
}
else if (copyStatus === "success") {
state.result = result;
state.isCompleted = true;
}
else if (copyStatus === "failed") {
state.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`);
state.isCompleted = true;
}
}
catch (err) {
state.error = err;
state.isCompleted = true;
}
}
return makeBlobBeginCopyFromURLPollOperation(state);
};
/**
* Note: Intentionally using function expression over arrow function expression
* so that the function can be invoked with a different context.
* This affects what `this` refers to.
* @hidden
*/
const toString = function toString() {
return JSON.stringify({ state: this.state }, (key, value) => {
// remove blobClient from serialized state since a client can't be hydrated from this info.
if (key === "blobClient") {
return undefined;
}
return value;
});
};
/**
* Creates a poll operation given the provided state.
* @hidden
*/
function makeBlobBeginCopyFromURLPollOperation(state) {
return {
state: Object.assign({}, state),
cancel,
toString,
update,
};
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Generate a range string. For example:
*
* "bytes=255-" or "bytes=0-511"
*
* @param iRange -
*/
function rangeToString(iRange) {
if (iRange.offset < 0) {
throw new RangeError(`Range.offset cannot be smaller than 0.`);
}
if (iRange.count && iRange.count <= 0) {
throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`);
}
return iRange.count
? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}`
: `bytes=${iRange.offset}-`;
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// In browser, during webpack or browserify bundling, this module will be replaced by 'events'
// https://github.com/Gozala/events
/**
* States for Batch.
*/
var BatchStates;
(function (BatchStates) {
BatchStates[BatchStates["Good"] = 0] = "Good";
BatchStates[BatchStates["Error"] = 1] = "Error";
})(BatchStates || (BatchStates = {}));
/**
* Batch provides basic parallel execution with concurrency limits.
* Will stop execute left operations when one of the executed operation throws an error.
* But Batch cannot cancel ongoing operations, you need to cancel them by yourself.
*/
class Batch {
/**
* Creates an instance of Batch.
* @param concurrency -
*/
constructor(concurrency = 5) {
/**
* Number of active operations under execution.
*/
this.actives = 0;
/**
* Number of completed operations under execution.
*/
this.completed = 0;
/**
* Offset of next operation to be executed.
*/
this.offset = 0;
/**
* Operation array to be executed.
*/
this.operations = [];
/**
* States of Batch. When an error happens, state will turn into error.
* Batch will stop execute left operations.
*/
this.state = BatchStates.Good;
if (concurrency < 1) {
throw new RangeError("concurrency must be larger than 0");
}
this.concurrency = concurrency;
this.emitter = new events.EventEmitter();
}
/**
* Add a operation into queue.
*
* @param operation -
*/
addOperation(operation) {
this.operations.push(async () => {
try {
this.actives++;
await operation();
this.actives--;
this.completed++;
this.parallelExecute();
}
catch (error) {
this.emitter.emit("error", error);
}
});
}
/**
* Start execute operations in the queue.
*
*/
async do() {
if (this.operations.length === 0) {
return Promise.resolve();
}
this.parallelExecute();
return new Promise((resolve, reject) => {
this.emitter.on("finish", resolve);
this.emitter.on("error", (error) => {
this.state = BatchStates.Error;
reject(error);
});
});
}
/**
* Get next operation to be executed. Return null when reaching ends.
*
*/
nextOperation() {
if (this.offset < this.operations.length) {
return this.operations[this.offset++];
}
return null;
}
/**
* Start execute operations. One one the most important difference between
* this method with do() is that do() wraps as an sync method.
*
*/
parallelExecute() {
if (this.state === BatchStates.Error) {
return;
}
if (this.completed >= this.operations.length) {
this.emitter.emit("finish");
return;
}
while (this.actives < this.concurrency) {
const operation = this.nextOperation();
if (operation) {
operation();
}
else {
return;
}
}
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This class generates a readable stream from the data in an array of buffers.
*/
class BuffersStream extends stream.Readable {
/**
* Creates an instance of BuffersStream that will emit the data
* contained in the array of buffers.
*
* @param buffers - Array of buffers containing the data
* @param byteLength - The total length of data contained in the buffers
*/
constructor(buffers, byteLength, options) {
super(options);
this.buffers = buffers;
this.byteLength = byteLength;
this.byteOffsetInCurrentBuffer = 0;
this.bufferIndex = 0;
this.pushedBytesLength = 0;
// check byteLength is no larger than buffers[] total length
let buffersLength = 0;
for (const buf of this.buffers) {
buffersLength += buf.byteLength;
}
if (buffersLength < this.byteLength) {
throw new Error("Data size shouldn't be larger than the total length of buffers.");
}
}
/**
* Internal _read() that will be called when the stream wants to pull more data in.
*
* @param size - Optional. The size of data to be read
*/
_read(size) {
if (this.pushedBytesLength >= this.byteLength) {
this.push(null);
}
if (!size) {
size = this.readableHighWaterMark;
}
const outBuffers = [];
let i = 0;
while (i < size && this.pushedBytesLength < this.byteLength) {
// The last buffer may be longer than the data it contains.
const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength;
const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer;
const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers);
if (remaining > size - i) {
// chunkSize = size - i
const end = this.byteOffsetInCurrentBuffer + size - i;
outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));
this.pushedBytesLength += size - i;
this.byteOffsetInCurrentBuffer = end;
i = size;
break;
}
else {
// chunkSize = remaining
const end = this.byteOffsetInCurrentBuffer + remaining;
outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));
if (remaining === remainingCapacityInThisBuffer) {
// this.buffers[this.bufferIndex] used up, shift to next one
this.byteOffsetInCurrentBuffer = 0;
this.bufferIndex++;
}
else {
this.byteOffsetInCurrentBuffer = end;
}
this.pushedBytesLength += remaining;
i += remaining;
}
}
if (outBuffers.length > 1) {
this.push(Buffer.concat(outBuffers));
}
else if (outBuffers.length === 1) {
this.push(outBuffers[0]);
}
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const maxBufferLength = buffer.constants.MAX_LENGTH;
/**
* This class provides a buffer container which conceptually has no hard size limit.
* It accepts a capacity, an array of input buffers and the total length of input data.
* It will allocate an internal "buffer" of the capacity and fill the data in the input buffers
* into the internal "buffer" serially with respect to the total length.
* Then by calling PooledBuffer.getReadableStream(), you can get a readable stream
* assembled from all the data in the internal "buffer".
*/
class PooledBuffer {
/**
* The size of the data contained in the pooled buffers.
*/
get size() {
return this._size;
}
constructor(capacity, buffers, totalLength) {
/**
* Internal buffers used to keep the data.
* Each buffer has a length of the maxBufferLength except last one.
*/
this.buffers = [];
this.capacity = capacity;
this._size = 0;
// allocate
const bufferNum = Math.ceil(capacity / maxBufferLength);
for (let i = 0; i < bufferNum; i++) {
let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength;
if (len === 0) {
len = maxBufferLength;
}
this.buffers.push(Buffer.allocUnsafe(len));
}
if (buffers) {
this.fill(buffers, totalLength);
}
}
/**
* Fill the internal buffers with data in the input buffers serially
* with respect to the total length and the total capacity of the internal buffers.
* Data copied will be shift out of the input buffers.
*
* @param buffers - Input buffers containing the data to be filled in the pooled buffer
* @param totalLength - Total length of the data to be filled in.
*
*/
fill(buffers, totalLength) {
this._size = Math.min(this.capacity, totalLength);
let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0;
while (totalCopiedNum < this._size) {
const source = buffers[i];
const target = this.buffers[j];
const copiedNum = source.copy(target, targetOffset, sourceOffset);
totalCopiedNum += copiedNum;
sourceOffset += copiedNum;
targetOffset += copiedNum;
if (sourceOffset === source.length) {
i++;
sourceOffset = 0;
}
if (targetOffset === target.length) {
j++;
targetOffset = 0;
}
}
// clear copied from source buffers
buffers.splice(0, i);
if (buffers.length > 0) {
buffers[0] = buffers[0].slice(sourceOffset);
}
}
/**
* Get the readable stream assembled from all the data in the internal buffers.
*
*/
getReadableStream() {
return new BuffersStream(this.buffers, this.size);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This class accepts a Node.js Readable stream as input, and keeps reading data
* from the stream into the internal buffer structure, until it reaches maxBuffers.
* Every available buffer will try to trigger outgoingHandler.
*
* The internal buffer structure includes an incoming buffer array, and a outgoing
* buffer array. The incoming buffer array includes the "empty" buffers can be filled
* with new incoming data. The outgoing array includes the filled buffers to be
* handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize.
*
* NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING
*
* NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers
*
* PERFORMANCE IMPROVEMENT TIPS:
* 1. Input stream highWaterMark is better to set a same value with bufferSize
* parameter, which will avoid Buffer.concat() operations.
* 2. concurrency should set a smaller value than maxBuffers, which is helpful to
* reduce the possibility when a outgoing handler waits for the stream data.
* in this situation, outgoing handlers are blocked.
* Outgoing queue shouldn't be empty.
*/
class BufferScheduler {
/**
* Creates an instance of BufferScheduler.
*
* @param readable - A Node.js Readable stream
* @param bufferSize - Buffer size of every maintained buffer
* @param maxBuffers - How many buffers can be allocated
* @param outgoingHandler - An async function scheduled to be
* triggered when a buffer fully filled
* with stream data
* @param concurrency - Concurrency of executing outgoingHandlers (>0)
* @param encoding - [Optional] Encoding of Readable stream when it's a string stream
*/
constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) {
/**
* An internal event emitter.
*/
this.emitter = new events.EventEmitter();
/**
* An internal offset marker to track data offset in bytes of next outgoingHandler.
*/
this.offset = 0;
/**
* An internal marker to track whether stream is end.
*/
this.isStreamEnd = false;
/**
* An internal marker to track whether stream or outgoingHandler returns error.
*/
this.isError = false;
/**
* How many handlers are executing.
*/
this.executingOutgoingHandlers = 0;
/**
* How many buffers have been allocated.
*/
this.numBuffers = 0;
/**
* Because this class doesn't know how much data every time stream pops, which
* is defined by highWaterMarker of the stream. So BufferScheduler will cache
* data received from the stream, when data in unresolvedDataArray exceeds the
* blockSize defined, it will try to concat a blockSize of buffer, fill into available
* buffers from incoming and push to outgoing array.
*/
this.unresolvedDataArray = [];
/**
* How much data consisted in unresolvedDataArray.
*/
this.unresolvedLength = 0;
/**
* The array includes all the available buffers can be used to fill data from stream.
*/
this.incoming = [];
/**
* The array (queue) includes all the buffers filled from stream data.
*/
this.outgoing = [];
if (bufferSize <= 0) {
throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);
}
if (maxBuffers <= 0) {
throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);
}
if (concurrency <= 0) {
throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);
}
this.bufferSize = bufferSize;
this.maxBuffers = maxBuffers;
this.readable = readable;
this.outgoingHandler = outgoingHandler;
this.concurrency = concurrency;
this.encoding = encoding;
}
/**
* Start the scheduler, will return error when stream of any of the outgoingHandlers
* returns error.
*
*/
async do() {
return new Promise((resolve, reject) => {
this.readable.on("data", (data) => {
data = typeof data === "string" ? Buffer.from(data, this.encoding) : data;
this.appendUnresolvedData(data);
if (!this.resolveData()) {
this.readable.pause();
}
});
this.readable.on("error", (err) => {
this.emitter.emit("error", err);
});
this.readable.on("end", () => {
this.isStreamEnd = true;
this.emitter.emit("checkEnd");
});
this.emitter.on("error", (err) => {
this.isError = true;
this.readable.pause();
reject(err);
});
this.emitter.on("checkEnd", () => {
if (this.outgoing.length > 0) {
this.triggerOutgoingHandlers();
return;
}
if (this.isStreamEnd && this.executingOutgoingHandlers === 0) {
if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) {
const buffer = this.shiftBufferFromUnresolvedDataArray();
this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset)
.then(resolve)
.catch(reject);
}
else if (this.unresolvedLength >= this.bufferSize) {
return;
}
else {
resolve();
}
}
});
});
}
/**
* Insert a new data into unresolved array.
*
* @param data -
*/
appendUnresolvedData(data) {
this.unresolvedDataArray.push(data);
this.unresolvedLength += data.length;
}
/**
* Try to shift a buffer with size in blockSize. The buffer returned may be less
* than blockSize when data in unresolvedDataArray is less than bufferSize.
*
*/
shiftBufferFromUnresolvedDataArray(buffer) {
if (!buffer) {
buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength);
}
else {
buffer.fill(this.unresolvedDataArray, this.unresolvedLength);
}
this.unresolvedLength -= buffer.size;
return buffer;
}
/**
* Resolve data in unresolvedDataArray. For every buffer with size in blockSize
* shifted, it will try to get (or allocate a buffer) from incoming, and fill it,
* then push it into outgoing to be handled by outgoing handler.
*
* Return false when available buffers in incoming are not enough, else true.
*
* @returns Return false when buffers in incoming are not enough, else true.
*/
resolveData() {
while (this.unresolvedLength >= this.bufferSize) {
let buffer;
if (this.incoming.length > 0) {
buffer = this.incoming.shift();
this.shiftBufferFromUnresolvedDataArray(buffer);
}
else {
if (this.numBuffers < this.maxBuffers) {
buffer = this.shiftBufferFromUnresolvedDataArray();
this.numBuffers++;
}
else {
// No available buffer, wait for buffer returned
return false;
}
}
this.outgoing.push(buffer);
this.triggerOutgoingHandlers();
}
return true;
}
/**
* Try to trigger a outgoing handler for every buffer in outgoing. Stop when
* concurrency reaches.
*/
async triggerOutgoingHandlers() {
let buffer;
do {
if (this.executingOutgoingHandlers >= this.concurrency) {
return;
}
buffer = this.outgoing.shift();
if (buffer) {
this.triggerOutgoingHandler(buffer);
}
} while (buffer);
}
/**
* Trigger a outgoing handler for a buffer shifted from outgoing.
*
* @param buffer -
*/
async triggerOutgoingHandler(buffer) {
const bufferLength = buffer.size;
this.executingOutgoingHandlers++;
this.offset += bufferLength;
try {
await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength);
}
catch (err) {
this.emitter.emit("error", err);
return;
}
this.executingOutgoingHandlers--;
this.reuseBuffer(buffer);
this.emitter.emit("checkEnd");
}
/**
* Return buffer used by outgoing handler into incoming.
*
* @param buffer -
*/
reuseBuffer(buffer) {
this.incoming.push(buffer);
if (!this.isError && this.resolveData() && !this.isStreamEnd) {
this.readable.resume();
}
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Reads a readable stream into buffer. Fill the buffer from offset to end.
*
* @param stream - A Node.js Readable stream
* @param buffer - Buffer to be filled, length must greater than or equal to offset
* @param offset - From which position in the buffer to be filled, inclusive
* @param end - To which position in the buffer to be filled, exclusive
* @param encoding - Encoding of the Readable stream
*/
async function streamToBuffer(stream, buffer, offset, end, encoding) {
let pos = 0; // Position in stream
const count = end - offset; // Total amount of data needed in stream
return new Promise((resolve, reject) => {
const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT);
stream.on("readable", () => {
if (pos >= count) {
clearTimeout(timeout);
resolve();
return;
}
let chunk = stream.read();
if (!chunk) {
return;
}
if (typeof chunk === "string") {
chunk = Buffer.from(chunk, encoding);
}
// How much data needed in this chunk
const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;
buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);
pos += chunkLength;
});
stream.on("end", () => {
clearTimeout(timeout);
if (pos < count) {
reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`));
}
resolve();
});
stream.on("error", (msg) => {
clearTimeout(timeout);
reject(msg);
});
});
}
/**
* Reads a readable stream into buffer entirely.
*
* @param stream - A Node.js Readable stream
* @param buffer - Buffer to be filled, length must greater than or equal to offset
* @param encoding - Encoding of the Readable stream
* @returns with the count of bytes read.
* @throws `RangeError` If buffer size is not big enough.
*/
async function streamToBuffer2(stream, buffer, encoding) {
let pos = 0; // Position in stream
const bufferSize = buffer.length;
return new Promise((resolve, reject) => {
stream.on("readable", () => {
let chunk = stream.read();
if (!chunk) {
return;
}
if (typeof chunk === "string") {
chunk = Buffer.from(chunk, encoding);
}
if (pos + chunk.length > bufferSize) {
reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`));
return;
}
buffer.fill(chunk, pos, pos + chunk.length);
pos += chunk.length;
});
stream.on("end", () => {
resolve(pos);
});
stream.on("error", reject);
});
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed.
*
* @param rs - The read stream.
* @param file - Destination file path.
*/
async function readStreamToLocalFile(rs, file) {
return new Promise((resolve, reject) => {
const ws = fs__namespace.createWriteStream(file);
rs.on("error", (err) => {
reject(err);
});
ws.on("error", (err) => {
reject(err);
});
ws.on("close", resolve);
rs.pipe(ws);
});
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Promisified version of fs.stat().
*/
const fsStat = util__namespace.promisify(fs__namespace.stat);
const fsCreateReadStream = fs__namespace.createReadStream;
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
* append blob, or page blob.
*/
class BlobClient extends StorageClient {
/**
* The name of the blob.
*/
get name() {
return this._name;
}
/**
* The name of the storage container the blob is associated with.
*/
get containerName() {
return this._containerName;
}
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
options = options || {};
let pipeline;
let url;
if (isPipelineLike(credentialOrPipelineOrContainerName)) {
// (url: string, pipeline: Pipeline)
url = urlOrConnectionString;
pipeline = credentialOrPipelineOrContainerName;
}
else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||
credentialOrPipelineOrContainerName instanceof AnonymousCredential ||
coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
url = urlOrConnectionString;
options = blobNameOrOptions;
pipeline = newPipeline(credentialOrPipelineOrContainerName, options);
}
else if (!credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName !== "string") {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
// The second parameter is undefined. Use anonymous credential.
url = urlOrConnectionString;
if (blobNameOrOptions && typeof blobNameOrOptions !== "string") {
options = blobNameOrOptions;
}
pipeline = newPipeline(new AnonymousCredential(), options);
}
else if (credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName === "string" &&
blobNameOrOptions &&
typeof blobNameOrOptions === "string") {
// (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)
const containerName = credentialOrPipelineOrContainerName;
const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") {
if (coreUtil.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options);
}
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
}
else if (extractedCreds.kind === "SASConnString") {
url =
appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +
"?" +
extractedCreds.accountSas;
pipeline = newPipeline(new AnonymousCredential(), options);
}
else {
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
}
}
else {
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
}
super(url, pipeline);
({ blobName: this._name, containerName: this._containerName } =
this.getBlobAndContainerNamesFromUrl());
this.blobContext = this.storageClientContext.blob;
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
}
/**
* Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.
* Provide "" will remove the snapshot and return a Client to the base blob.
*
* @param snapshot - The snapshot timestamp.
* @returns A new BlobClient object identical to the source but with the specified snapshot timestamp
*/
withSnapshot(snapshot) {
return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);
}
/**
* Creates a new BlobClient object pointing to a version of this blob.
* Provide "" will remove the versionId and return a Client to the base blob.
*
* @param versionId - The versionId.
* @returns A new BlobClient object pointing to the version of this blob.
*/
withVersion(versionId) {
return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline);
}
/**
* Creates a AppendBlobClient object.
*
*/
getAppendBlobClient() {
return new AppendBlobClient(this.url, this.pipeline);
}
/**
* Creates a BlockBlobClient object.
*
*/
getBlockBlobClient() {
return new BlockBlobClient(this.url, this.pipeline);
}
/**
* Creates a PageBlobClient object.
*
*/
getPageBlobClient() {
return new PageBlobClient(this.url, this.pipeline);
}
/**
* Reads or downloads a blob from the system, including its metadata and properties.
* You can also call Get Blob to read a snapshot.
*
* * In Node.js, data returns in a Readable stream readableStreamBody
* * In browsers, data returns in a promise blobBody
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob
*
* @param offset - From which position of the blob to download, greater than or equal to 0
* @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined
* @param options - Optional options to Blob Download operation.
*
*
* Example usage (Node.js):
*
* ```js
* // Download and convert a blob to a string
* const downloadBlockBlobResponse = await blobClient.download();
* const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody);
* console.log("Downloaded blob content:", downloaded.toString());
*
* async function streamToBuffer(readableStream) {
* return new Promise((resolve, reject) => {
* const chunks = [];
* readableStream.on("data", (data) => {
* chunks.push(typeof data === "string" ? Buffer.from(data) : data);
* });
* readableStream.on("end", () => {
* resolve(Buffer.concat(chunks));
* });
* readableStream.on("error", reject);
* });
* }
* ```
*
* Example usage (browser):
*
* ```js
* // Download and convert a blob to a string
* const downloadBlockBlobResponse = await blobClient.download();
* const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody);
* console.log(
* "Downloaded blob content",
* downloaded
* );
*
* async function blobToString(blob: Blob): Promise {
* const fileReader = new FileReader();
* return new Promise((resolve, reject) => {
* fileReader.onloadend = (ev: any) => {
* resolve(ev.target!.result);
* };
* fileReader.onerror = reject;
* fileReader.readAsText(blob);
* });
* }
* ```
*/
async download(offset = 0, count, options = {}) {
options.conditions = options.conditions || {};
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => {
var _a;
const res = assertResponse(await this.blobContext.download({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
requestOptions: {
onDownloadProgress: coreUtil.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
},
range: offset === 0 && !count ? undefined : rangeToString({ offset, count }),
rangeGetContentMD5: options.rangeGetContentMD5,
rangeGetContentCRC64: options.rangeGetContentCrc64,
snapshot: options.snapshot,
cpkInfo: options.customerProvidedKey,
tracingOptions: updatedOptions.tracingOptions,
}));
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
// Return browser response immediately
if (!coreUtil.isNode) {
return wrappedRes;
}
// We support retrying when download stream unexpected ends in Node.js runtime
// Following code shouldn't be bundled into browser build, however some
// bundlers may try to bundle following code and "FileReadResponse.ts".
// In this case, "FileDownloadResponse.browser.ts" will be used as a shim of "FileDownloadResponse.ts"
// The config is in package.json "browser" field
if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) {
// TODO: Default value or make it a required parameter?
options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS;
}
if (res.contentLength === undefined) {
throw new RangeError(`File download response doesn't contain valid content length header`);
}
if (!res.etag) {
throw new RangeError(`File download response doesn't contain valid etag header`);
}
return new BlobDownloadResponse(wrappedRes, async (start) => {
var _a;
const updatedDownloadOptions = {
leaseAccessConditions: options.conditions,
modifiedAccessConditions: {
ifMatch: options.conditions.ifMatch || res.etag,
ifModifiedSince: options.conditions.ifModifiedSince,
ifNoneMatch: options.conditions.ifNoneMatch,
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,
},
range: rangeToString({
count: offset + res.contentLength - start,
offset: start,
}),
rangeGetContentMD5: options.rangeGetContentMD5,
rangeGetContentCRC64: options.rangeGetContentCrc64,
snapshot: options.snapshot,
cpkInfo: options.customerProvidedKey,
};
// Debug purpose only
// console.log(
// `Read from internal stream, range: ${
// updatedOptions.range
// }, options: ${JSON.stringify(updatedOptions)}`
// );
return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
}, offset, res.contentLength, {
maxRetryRequests: options.maxRetryRequests,
onProgress: options.onProgress,
});
});
}
/**
* Returns true if the Azure blob resource represented by this client exists; false otherwise.
*
* NOTE: use this function with care since an existing blob might be deleted by other clients or
* applications. Vice versa new blobs might be added by other clients or applications after this
* function completes.
*
* @param options - options to Exists operation.
*/
async exists(options = {}) {
return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => {
try {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
await this.getProperties({
abortSignal: options.abortSignal,
customerProvidedKey: options.customerProvidedKey,
conditions: options.conditions,
tracingOptions: updatedOptions.tracingOptions,
});
return true;
}
catch (e) {
if (e.statusCode === 404) {
// Expected exception when checking blob existence
return false;
}
else if (e.statusCode === 409 &&
(e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg ||
e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) {
// Expected exception when checking blob existence
return true;
}
throw e;
}
});
}
/**
* Returns all user-defined metadata, standard HTTP properties, and system properties
* for the blob. It does not return the content of the blob.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties
*
* WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
* they originally contained uppercase characters. This differs from the metadata keys returned by
* the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which
* will retain their original casing.
*
* @param options - Optional options to Get Properties operation.
*/
async getProperties(options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => {
var _a;
const res = assertResponse(await this.blobContext.getProperties({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
cpkInfo: options.customerProvidedKey,
tracingOptions: updatedOptions.tracingOptions,
}));
return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
});
}
/**
* Marks the specified blob or snapshot for deletion. The blob is later deleted
* during garbage collection. Note that in order to delete a blob, you must delete
* all of its snapshots. You can delete both at the same time with the Delete
* Blob operation.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob
*
* @param options - Optional options to Blob Delete operation.
*/
async delete(options = {}) {
options.conditions = options.conditions || {};
return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.blobContext.delete({
abortSignal: options.abortSignal,
deleteSnapshots: options.deleteSnapshots,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted
* during garbage collection. Note that in order to delete a blob, you must delete
* all of its snapshots. You can delete both at the same time with the Delete
* Blob operation.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob
*
* @param options - Optional options to Blob Delete operation.
*/
async deleteIfExists(options = {}) {
return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => {
var _a, _b;
try {
const res = assertResponse(await this.delete(updatedOptions));
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
}
catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
}
throw e;
}
});
}
/**
* Restores the contents and metadata of soft deleted blob and any associated
* soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29
* or later.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/undelete-blob
*
* @param options - Optional options to Blob Undelete operation.
*/
async undelete(options = {}) {
return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => {
return assertResponse(await this.blobContext.undelete({
abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Sets system properties on the blob.
*
* If no value provided, or no value provided for the specified blob HTTP headers,
* these blob HTTP headers without a value will be cleared.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties
*
* @param blobHTTPHeaders - If no value provided, or no value provided for
* the specified blob HTTP headers, these blob HTTP
* headers without a value will be cleared.
* A common header to set is `blobContentType`
* enabling the browser to provide functionality
* based on file type.
* @param options - Optional options to Blob Set HTTP Headers operation.
*/
async setHTTPHeaders(blobHTTPHeaders, options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.blobContext.setHttpHeaders({
abortSignal: options.abortSignal,
blobHttpHeaders: blobHTTPHeaders,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
// cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger.
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Sets user-defined metadata for the specified blob as one or more name-value pairs.
*
* If no option provided, or no metadata defined in the parameter, the blob
* metadata will be removed.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata
*
* @param metadata - Replace existing metadata with this value.
* If no value provided the existing metadata will be removed.
* @param options - Optional options to Set Metadata operation.
*/
async setMetadata(metadata, options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.blobContext.setMetadata({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
metadata,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Sets tags on the underlying blob.
* A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters.
* Valid tag key and value characters include lower and upper case letters, digits (0-9),
* space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').
*
* @param tags -
* @param options -
*/
async setTags(tags, options = {}) {
return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.blobContext.setTags({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
tags: toBlobTags(tags),
}));
});
}
/**
* Gets the tags associated with the underlying blob.
*
* @param options -
*/
async getTags(options = {}) {
return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => {
var _a;
const response = assertResponse(await this.blobContext.getTags({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
}));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} });
return wrappedResponse;
});
}
/**
* Get a {@link BlobLeaseClient} that manages leases on the blob.
*
* @param proposeLeaseId - Initial proposed lease Id.
* @returns A new BlobLeaseClient object for managing leases on the blob.
*/
getBlobLeaseClient(proposeLeaseId) {
return new BlobLeaseClient(this, proposeLeaseId);
}
/**
* Creates a read-only snapshot of a blob.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/snapshot-blob
*
* @param options - Optional options to the Blob Create Snapshot operation.
*/
async createSnapshot(options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.blobContext.createSnapshot({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
metadata: options.metadata,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Asynchronously copies a blob to a destination within the storage account.
* This method returns a long running operation poller that allows you to wait
* indefinitely until the copy is completed.
* You can also cancel a copy before it is completed by calling `cancelOperation` on the poller.
* Note that the onProgress callback will not be invoked if the operation completes in the first
* request, and attempting to cancel a completed copy will result in an error being thrown.
*
* In version 2012-02-12 and later, the source for a Copy Blob operation can be
* a committed blob in any Azure storage account.
* Beginning with version 2015-02-21, the source for a Copy Blob operation can be
* an Azure file in any Azure storage account.
* Only storage accounts created on or after June 7th, 2012 allow the Copy Blob
* operation to copy from another storage account.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob
*
* Example using automatic polling:
*
* ```js
* const copyPoller = await blobClient.beginCopyFromURL('url');
* const result = await copyPoller.pollUntilDone();
* ```
*
* Example using manual polling:
*
* ```js
* const copyPoller = await blobClient.beginCopyFromURL('url');
* while (!poller.isDone()) {
* await poller.poll();
* }
* const result = copyPoller.getResult();
* ```
*
* Example using progress updates:
*
* ```js
* const copyPoller = await blobClient.beginCopyFromURL('url', {
* onProgress(state) {
* console.log(`Progress: ${state.copyProgress}`);
* }
* });
* const result = await copyPoller.pollUntilDone();
* ```
*
* Example using a changing polling interval (default 15 seconds):
*
* ```js
* const copyPoller = await blobClient.beginCopyFromURL('url', {
* intervalInMs: 1000 // poll blob every 1 second for copy progress
* });
* const result = await copyPoller.pollUntilDone();
* ```
*
* Example using copy cancellation:
*
* ```js
* const copyPoller = await blobClient.beginCopyFromURL('url');
* // cancel operation after starting it.
* try {
* await copyPoller.cancelOperation();
* // calls to get the result now throw PollerCancelledError
* await copyPoller.getResult();
* } catch (err) {
* if (err.name === 'PollerCancelledError') {
* console.log('The copy was cancelled.');
* }
* }
* ```
*
* @param copySource - url to the source Azure Blob/File.
* @param options - Optional options to the Blob Start Copy From URL operation.
*/
async beginCopyFromURL(copySource, options = {}) {
const client = {
abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
getProperties: (...args) => this.getProperties(...args),
startCopyFromURL: (...args) => this.startCopyFromURL(...args),
};
const poller = new BlobBeginCopyFromUrlPoller({
blobClient: client,
copySource,
intervalInMs: options.intervalInMs,
onProgress: options.onProgress,
resumeFrom: options.resumeFrom,
startCopyFromURLOptions: options,
});
// Trigger the startCopyFromURL call by calling poll.
// Any errors from this method should be surfaced to the user.
await poller.poll();
return poller;
}
/**
* Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero
* length and full metadata. Version 2012-02-12 and newer.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob
*
* @param copyId - Id of the Copy From URL operation.
* @param options - Optional options to the Blob Abort Copy From URL operation.
*/
async abortCopyFromURL(copyId, options = {}) {
return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => {
return assertResponse(await this.blobContext.abortCopyFromURL(copyId, {
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not
* return a response until the copy is complete.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url
*
* @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication
* @param options -
*/
async syncCopyFromURL(copySource, options = {}) {
options.conditions = options.conditions || {};
options.sourceConditions = options.sourceConditions || {};
return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => {
var _a, _b, _c, _d, _e, _f, _g;
return assertResponse(await this.blobContext.copyFromURL(copySource, {
abortSignal: options.abortSignal,
metadata: options.metadata,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
sourceModifiedAccessConditions: {
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
},
sourceContentMD5: options.sourceContentMD5,
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
tier: toAccessTier(options.tier),
blobTagsString: toBlobTagsString(options.tags),
immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn,
immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode,
legalHold: options.legalHold,
encryptionScope: options.encryptionScope,
copySourceTags: options.copySourceTags,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Sets the tier on a blob. The operation is allowed on a page blob in a premium
* storage account and on a block blob in a blob storage account (locally redundant
* storage only). A premium page blob's tier determines the allowed size, IOPS,
* and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive
* storage type. This operation does not update the blob's ETag.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-tier
*
* @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive.
* @param options - Optional options to the Blob Set Tier operation.
*/
async setAccessTier(tier, options = {}) {
return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.blobContext.setTier(toAccessTier(tier), {
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
rehydratePriority: options.rehydratePriority,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
async downloadToBuffer(param1, param2, param3, param4 = {}) {
var _a;
let buffer;
let offset = 0;
let count = 0;
let options = param4;
if (param1 instanceof Buffer) {
buffer = param1;
offset = param2 || 0;
count = typeof param3 === "number" ? param3 : 0;
}
else {
offset = typeof param1 === "number" ? param1 : 0;
count = typeof param2 === "number" ? param2 : 0;
options = param3 || {};
}
let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0;
if (blockSize < 0) {
throw new RangeError("blockSize option must be >= 0");
}
if (blockSize === 0) {
blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;
}
if (offset < 0) {
throw new RangeError("offset option must be >= 0");
}
if (count && count <= 0) {
throw new RangeError("count option must be greater than 0");
}
if (!options.conditions) {
options.conditions = {};
}
return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => {
// Customer doesn't specify length, get it
if (!count) {
const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
count = response.contentLength - offset;
if (count < 0) {
throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`);
}
}
// Allocate the buffer of size = count if the buffer is not provided
if (!buffer) {
try {
buffer = Buffer.alloc(count);
}
catch (error) {
throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${error.message}`);
}
}
if (buffer.length < count) {
throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`);
}
let transferProgress = 0;
const batch = new Batch(options.concurrency);
for (let off = offset; off < offset + count; off = off + blockSize) {
batch.addOperation(async () => {
// Exclusive chunk end position
let chunkEnd = offset + count;
if (off + blockSize < chunkEnd) {
chunkEnd = off + blockSize;
}
const response = await this.download(off, chunkEnd - off, {
abortSignal: options.abortSignal,
conditions: options.conditions,
maxRetryRequests: options.maxRetryRequestsPerBlock,
customerProvidedKey: options.customerProvidedKey,
tracingOptions: updatedOptions.tracingOptions,
});
const stream = response.readableStreamBody;
await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
// Update progress after block is downloaded, in case of block trying
// Could provide finer grained progress updating inside HTTP requests,
// only if convenience layer download try is enabled
transferProgress += chunkEnd - off;
if (options.onProgress) {
options.onProgress({ loadedBytes: transferProgress });
}
});
}
await batch.do();
return buffer;
});
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Downloads an Azure Blob to a local file.
* Fails if the the given file path already exits.
* Offset and count are optional, pass 0 and undefined respectively to download the entire blob.
*
* @param filePath -
* @param offset - From which position of the block blob to download.
* @param count - How much data to be downloaded. Will download to the end when passing undefined.
* @param options - Options to Blob download options.
* @returns The response data for blob download operation,
* but with readableStreamBody set to undefined since its
* content is already read and written into a local file
* at the specified path.
*/
async downloadToFile(filePath, offset = 0, count, options = {}) {
return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => {
const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
if (response.readableStreamBody) {
await readStreamToLocalFile(response.readableStreamBody, filePath);
}
// The stream is no longer accessible so setting it to undefined.
response.blobDownloadStream = undefined;
return response;
});
}
getBlobAndContainerNamesFromUrl() {
let containerName;
let blobName;
try {
// URL may look like the following
// "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString";
// "https://myaccount.blob.core.windows.net/mycontainer/blob";
// "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString";
// "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt";
// IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob`
// http://localhost:10001/devstoreaccount1/containername/blob
const parsedUrl = new URL(this.url);
if (parsedUrl.host.split(".")[1] === "blob") {
// "https://myaccount.blob.core.windows.net/containername/blob".
// .getPath() -> /containername/blob
const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?");
containerName = pathComponents[1];
blobName = pathComponents[3];
}
else if (isIpEndpointStyle(parsedUrl)) {
// IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob
// Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob
// .getPath() -> /devstoreaccount1/containername/blob
const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?");
containerName = pathComponents[2];
blobName = pathComponents[4];
}
else {
// "https://customdomain.com/containername/blob".
// .getPath() -> /containername/blob
const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?");
containerName = pathComponents[1];
blobName = pathComponents[3];
}
// decode the encoded blobName, containerName - to get all the special characters that might be present in them
containerName = decodeURIComponent(containerName);
blobName = decodeURIComponent(blobName);
// Azure Storage Server will replace "\" with "/" in the blob names
// doing the same in the SDK side so that the user doesn't have to replace "\" instances in the blobName
blobName = blobName.replace(/\\/g, "/");
if (!containerName) {
throw new Error("Provided containerName is invalid.");
}
return { blobName, containerName };
}
catch (error) {
throw new Error("Unable to extract blobName and containerName with provided information.");
}
}
/**
* Asynchronously copies a blob to a destination within the storage account.
* In version 2012-02-12 and later, the source for a Copy Blob operation can be
* a committed blob in any Azure storage account.
* Beginning with version 2015-02-21, the source for a Copy Blob operation can be
* an Azure file in any Azure storage account.
* Only storage accounts created on or after June 7th, 2012 allow the Copy Blob
* operation to copy from another storage account.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob
*
* @param copySource - url to the source Azure Blob/File.
* @param options - Optional options to the Blob Start Copy From URL operation.
*/
async startCopyFromURL(copySource, options = {}) {
return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => {
var _a, _b, _c;
options.conditions = options.conditions || {};
options.sourceConditions = options.sourceConditions || {};
return assertResponse(await this.blobContext.startCopyFromURL(copySource, {
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
metadata: options.metadata,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
sourceModifiedAccessConditions: {
sourceIfMatch: options.sourceConditions.ifMatch,
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
sourceIfTags: options.sourceConditions.tagConditions,
},
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
legalHold: options.legalHold,
rehydratePriority: options.rehydratePriority,
tier: toAccessTier(options.tier),
blobTagsString: toBlobTagsString(options.tags),
sealBlob: options.sealBlob,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Only available for BlobClient constructed with a shared key credential.
*
* Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties
* and parameters passed in. The SAS is signed by the shared key credential of the client.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
*
* @param options - Optional parameters.
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
generateSasUrl(options) {
return new Promise((resolve) => {
if (!(this.credential instanceof StorageSharedKeyCredential)) {
throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
}
const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString();
resolve(appendToURLQuery(this.url, sas));
});
}
/**
* Only available for BlobClient constructed with a shared key credential.
*
* Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on
* the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
*
* @param options - Optional parameters.
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
generateSasStringToSign(options) {
if (!(this.credential instanceof StorageSharedKeyCredential)) {
throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
}
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign;
}
/**
*
* Generates a Blob Service Shared Access Signature (SAS) URI based on
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
*
* @param options - Optional parameters.
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
generateUserDelegationSasUrl(options, userDelegationKey) {
return new Promise((resolve) => {
const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).toString();
resolve(appendToURLQuery(this.url, sas));
});
}
/**
* Only available for BlobClient constructed with a shared key credential.
*
* Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
*
* @param options - Optional parameters.
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
generateUserDelegationSasStringToSign(options, userDelegationKey) {
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).stringToSign;
}
/**
* Delete the immutablility policy on the blob.
*
* @param options - Optional options to delete immutability policy on the blob.
*/
async deleteImmutabilityPolicy(options = {}) {
return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => {
return assertResponse(await this.blobContext.deleteImmutabilityPolicy({
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Set immutability policy on the blob.
*
* @param options - Optional options to set immutability policy on the blob.
*/
async setImmutabilityPolicy(immutabilityPolicy, options = {}) {
return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => {
return assertResponse(await this.blobContext.setImmutabilityPolicy({
immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn,
immutabilityPolicyMode: immutabilityPolicy.policyMode,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Set legal hold on the blob.
*
* @param options - Optional options to set legal hold on the blob.
*/
async setLegalHold(legalHoldEnabled, options = {}) {
return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => {
return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, {
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* The Get Account Information operation returns the sku name and account kind
* for the specified account.
* The Get Account Information operation is available on service versions beginning
* with version 2018-03-28.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information
*
* @param options - Options to the Service Get Account Info operation.
* @returns Response data for the Service Get Account Info operation.
*/
async getAccountInfo(options = {}) {
return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => {
return assertResponse(await this.blobContext.getAccountInfo({
abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
}
/**
* AppendBlobClient defines a set of operations applicable to append blobs.
*/
class AppendBlobClient extends BlobClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
// In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.
// super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);
let pipeline;
let url;
options = options || {};
if (isPipelineLike(credentialOrPipelineOrContainerName)) {
// (url: string, pipeline: Pipeline)
url = urlOrConnectionString;
pipeline = credentialOrPipelineOrContainerName;
}
else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||
credentialOrPipelineOrContainerName instanceof AnonymousCredential ||
coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString;
url = urlOrConnectionString;
options = blobNameOrOptions;
pipeline = newPipeline(credentialOrPipelineOrContainerName, options);
}
else if (!credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName !== "string") {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
url = urlOrConnectionString;
// The second parameter is undefined. Use anonymous credential.
pipeline = newPipeline(new AnonymousCredential(), options);
}
else if (credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName === "string" &&
blobNameOrOptions &&
typeof blobNameOrOptions === "string") {
// (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)
const containerName = credentialOrPipelineOrContainerName;
const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") {
if (coreUtil.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options);
}
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
}
else if (extractedCreds.kind === "SASConnString") {
url =
appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +
"?" +
extractedCreds.accountSas;
pipeline = newPipeline(new AnonymousCredential(), options);
}
else {
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
}
}
else {
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
}
super(url, pipeline);
this.appendBlobContext = this.storageClientContext.appendBlob;
}
/**
* Creates a new AppendBlobClient object identical to the source but with the
* specified snapshot timestamp.
* Provide "" will remove the snapshot and return a Client to the base blob.
*
* @param snapshot - The snapshot timestamp.
* @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp.
*/
withSnapshot(snapshot) {
return new AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);
}
/**
* Creates a 0-length append blob. Call AppendBlock to append data to an append blob.
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
*
* @param options - Options to the Append Block Create operation.
*
*
* Example usage:
*
* ```js
* const appendBlobClient = containerClient.getAppendBlobClient("");
* await appendBlobClient.create();
* ```
*/
async create(options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => {
var _a, _b, _c;
return assertResponse(await this.appendBlobContext.create(0, {
abortSignal: options.abortSignal,
blobHttpHeaders: options.blobHTTPHeaders,
leaseAccessConditions: options.conditions,
metadata: options.metadata,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
legalHold: options.legalHold,
blobTagsString: toBlobTagsString(options.tags),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Creates a 0-length append blob. Call AppendBlock to append data to an append blob.
* If the blob with the same name already exists, the content of the existing blob will remain unchanged.
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
*
* @param options -
*/
async createIfNotExists(options = {}) {
const conditions = { ifNoneMatch: ETagAny };
return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => {
var _a, _b;
try {
const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions })));
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
}
catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
}
throw e;
}
});
}
/**
* Seals the append blob, making it read only.
*
* @param options -
*/
async seal(options = {}) {
options.conditions = options.conditions || {};
return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.appendBlobContext.seal({
abortSignal: options.abortSignal,
appendPositionAccessConditions: options.conditions,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Commits a new block of data to the end of the existing append blob.
* @see https://learn.microsoft.com/rest/api/storageservices/append-block
*
* @param body - Data to be appended.
* @param contentLength - Length of the body in bytes.
* @param options - Options to the Append Block operation.
*
*
* Example usage:
*
* ```js
* const content = "Hello World!";
*
* // Create a new append blob and append data to the blob.
* const newAppendBlobClient = containerClient.getAppendBlobClient("");
* await newAppendBlobClient.create();
* await newAppendBlobClient.appendBlock(content, content.length);
*
* // Append data to an existing append blob.
* const existingAppendBlobClient = containerClient.getAppendBlobClient("");
* await existingAppendBlobClient.appendBlock(content, content.length);
* ```
*/
async appendBlock(body, contentLength, options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.appendBlobContext.appendBlock(contentLength, body, {
abortSignal: options.abortSignal,
appendPositionAccessConditions: options.conditions,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
requestOptions: {
onUploadProgress: options.onProgress,
},
transactionalContentMD5: options.transactionalContentMD5,
transactionalContentCrc64: options.transactionalContentCrc64,
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob
* where the contents are read from a source url.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/append-block-from-url
*
* @param sourceURL -
* The url to the blob that will be the source of the copy. A source blob in the same storage account can
* be authenticated via Shared Key. However, if the source is a blob in another account, the source blob
* must either be public or must be authenticated via a shared access signature. If the source blob is
* public, no authentication is required to perform the operation.
* @param sourceOffset - Offset in source to be appended
* @param count - Number of bytes to be appended as a block
* @param options -
*/
async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) {
options.conditions = options.conditions || {};
options.sourceConditions = options.sourceConditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => {
var _a, _b, _c, _d, _e;
return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, {
abortSignal: options.abortSignal,
sourceRange: rangeToString({ offset: sourceOffset, count }),
sourceContentMD5: options.sourceContentMD5,
sourceContentCrc64: options.sourceContentCrc64,
leaseAccessConditions: options.conditions,
appendPositionAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
sourceModifiedAccessConditions: {
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
},
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
}
/**
* BlockBlobClient defines a set of operations applicable to block blobs.
*/
class BlockBlobClient extends BlobClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
// In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.
// super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);
let pipeline;
let url;
options = options || {};
if (isPipelineLike(credentialOrPipelineOrContainerName)) {
// (url: string, pipeline: Pipeline)
url = urlOrConnectionString;
pipeline = credentialOrPipelineOrContainerName;
}
else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||
credentialOrPipelineOrContainerName instanceof AnonymousCredential ||
coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
url = urlOrConnectionString;
options = blobNameOrOptions;
pipeline = newPipeline(credentialOrPipelineOrContainerName, options);
}
else if (!credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName !== "string") {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
// The second parameter is undefined. Use anonymous credential.
url = urlOrConnectionString;
if (blobNameOrOptions && typeof blobNameOrOptions !== "string") {
options = blobNameOrOptions;
}
pipeline = newPipeline(new AnonymousCredential(), options);
}
else if (credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName === "string" &&
blobNameOrOptions &&
typeof blobNameOrOptions === "string") {
// (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)
const containerName = credentialOrPipelineOrContainerName;
const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") {
if (coreUtil.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options);
}
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
}
else if (extractedCreds.kind === "SASConnString") {
url =
appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +
"?" +
extractedCreds.accountSas;
pipeline = newPipeline(new AnonymousCredential(), options);
}
else {
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
}
}
else {
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
}
super(url, pipeline);
this.blockBlobContext = this.storageClientContext.blockBlob;
this._blobContext = this.storageClientContext.blob;
}
/**
* Creates a new BlockBlobClient object identical to the source but with the
* specified snapshot timestamp.
* Provide "" will remove the snapshot and return a URL to the base blob.
*
* @param snapshot - The snapshot timestamp.
* @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp.
*/
withSnapshot(snapshot) {
return new BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Quick query for a JSON or CSV formatted blob.
*
* Example usage (Node.js):
*
* ```js
* // Query and convert a blob to a string
* const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage");
* const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString();
* console.log("Query blob content:", downloaded);
*
* async function streamToBuffer(readableStream) {
* return new Promise((resolve, reject) => {
* const chunks = [];
* readableStream.on("data", (data) => {
* chunks.push(typeof data === "string" ? Buffer.from(data) : data);
* });
* readableStream.on("end", () => {
* resolve(Buffer.concat(chunks));
* });
* readableStream.on("error", reject);
* });
* }
* ```
*
* @param query -
* @param options -
*/
async query(query, options = {}) {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
if (!coreUtil.isNode) {
throw new Error("This operation currently is only supported in Node.js.");
}
return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => {
var _a;
const response = assertResponse(await this._blobContext.query({
abortSignal: options.abortSignal,
queryRequest: {
queryType: "SQL",
expression: query,
inputSerialization: toQuerySerialization(options.inputTextConfiguration),
outputSerialization: toQuerySerialization(options.outputTextConfiguration),
},
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
cpkInfo: options.customerProvidedKey,
tracingOptions: updatedOptions.tracingOptions,
}));
return new BlobQueryResponse(response, {
abortSignal: options.abortSignal,
onProgress: options.onProgress,
onError: options.onError,
});
});
}
/**
* Creates a new block blob, or updates the content of an existing block blob.
* Updating an existing block blob overwrites any existing metadata on the blob.
* Partial updates are not supported; the content of the existing blob is
* overwritten with the new content. To perform a partial update of a block blob's,
* use {@link stageBlock} and {@link commitBlockList}.
*
* This is a non-parallel uploading method, please use {@link uploadFile},
* {@link uploadStream} or {@link uploadBrowserData} for better performance
* with concurrency uploading.
*
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
*
* @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function
* which returns a new Readable stream whose offset is from data source beginning.
* @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a
* string including non non-Base64/Hex-encoded characters.
* @param options - Options to the Block Blob Upload operation.
* @returns Response data for the Block Blob Upload operation.
*
* Example usage:
*
* ```js
* const content = "Hello world!";
* const uploadBlobResponse = await blockBlobClient.upload(content, content.length);
* ```
*/
async upload(body, contentLength, options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => {
var _a, _b, _c;
return assertResponse(await this.blockBlobContext.upload(contentLength, body, {
abortSignal: options.abortSignal,
blobHttpHeaders: options.blobHTTPHeaders,
leaseAccessConditions: options.conditions,
metadata: options.metadata,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
requestOptions: {
onUploadProgress: options.onProgress,
},
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
legalHold: options.legalHold,
tier: toAccessTier(options.tier),
blobTagsString: toBlobTagsString(options.tags),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Creates a new Block Blob where the contents of the blob are read from a given URL.
* This API is supported beginning with the 2020-04-08 version. Partial updates
* are not supported with Put Blob from URL; the content of an existing blob is overwritten with
* the content of the new blob. To perform partial updates to a block blob’s contents using a
* source URL, use {@link stageBlockFromURL} and {@link commitBlockList}.
*
* @param sourceURL - Specifies the URL of the blob. The value
* may be a URL of up to 2 KB in length that specifies a blob.
* The value should be URL-encoded as it would appear
* in a request URI. The source blob must either be public
* or must be authenticated via a shared access signature.
* If the source blob is public, no authentication is required
* to perform the operation. Here are some examples of source object URLs:
* - https://myaccount.blob.core.windows.net/mycontainer/myblob
* - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=
* @param options - Optional parameters.
*/
async syncUploadFromURL(sourceURL, options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => {
var _a, _b, _c, _d, _e, _f;
return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions,
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions })));
});
}
/**
* Uploads the specified block to the block blob's "staging area" to be later
* committed by a call to commitBlockList.
* @see https://learn.microsoft.com/rest/api/storageservices/put-block
*
* @param blockId - A 64-byte value that is base64-encoded
* @param body - Data to upload to the staging area.
* @param contentLength - Number of bytes to upload.
* @param options - Options to the Block Blob Stage Block operation.
* @returns Response data for the Block Blob Stage Block operation.
*/
async stageBlock(blockId, body, contentLength, options = {}) {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => {
return assertResponse(await this.blockBlobContext.stageBlock(blockId, contentLength, body, {
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
requestOptions: {
onUploadProgress: options.onProgress,
},
transactionalContentMD5: options.transactionalContentMD5,
transactionalContentCrc64: options.transactionalContentCrc64,
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* The Stage Block From URL operation creates a new block to be committed as part
* of a blob where the contents are read from a URL.
* This API is available starting in version 2018-03-28.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-block-from-url
*
* @param blockId - A 64-byte value that is base64-encoded
* @param sourceURL - Specifies the URL of the blob. The value
* may be a URL of up to 2 KB in length that specifies a blob.
* The value should be URL-encoded as it would appear
* in a request URI. The source blob must either be public
* or must be authenticated via a shared access signature.
* If the source blob is public, no authentication is required
* to perform the operation. Here are some examples of source object URLs:
* - https://myaccount.blob.core.windows.net/mycontainer/myblob
* - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=
* @param offset - From which position of the blob to download, greater than or equal to 0
* @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined
* @param options - Options to the Block Blob Stage Block From URL operation.
* @returns Response data for the Block Blob Stage Block From URL operation.
*/
async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => {
return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, {
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
sourceContentMD5: options.sourceContentMD5,
sourceContentCrc64: options.sourceContentCrc64,
sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset, count }),
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Writes a blob by specifying the list of block IDs that make up the blob.
* In order to be written as part of a blob, a block must have been successfully written
* to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to
* update a blob by uploading only those blocks that have changed, then committing the new and existing
* blocks together. Any blocks not specified in the block list and permanently deleted.
* @see https://learn.microsoft.com/rest/api/storageservices/put-block-list
*
* @param blocks - Array of 64-byte value that is base64-encoded
* @param options - Options to the Block Blob Commit Block List operation.
* @returns Response data for the Block Blob Commit Block List operation.
*/
async commitBlockList(blocks, options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => {
var _a, _b, _c;
return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks }, {
abortSignal: options.abortSignal,
blobHttpHeaders: options.blobHTTPHeaders,
leaseAccessConditions: options.conditions,
metadata: options.metadata,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
legalHold: options.legalHold,
tier: toAccessTier(options.tier),
blobTagsString: toBlobTagsString(options.tags),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Returns the list of blocks that have been uploaded as part of a block blob
* using the specified block list filter.
* @see https://learn.microsoft.com/rest/api/storageservices/get-block-list
*
* @param listType - Specifies whether to return the list of committed blocks,
* the list of uncommitted blocks, or both lists together.
* @param options - Options to the Block Blob Get Block List operation.
* @returns Response data for the Block Blob Get Block List operation.
*/
async getBlockList(listType, options = {}) {
return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => {
var _a;
const res = assertResponse(await this.blockBlobContext.getBlockList(listType, {
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
}));
if (!res.committedBlocks) {
res.committedBlocks = [];
}
if (!res.uncommittedBlocks) {
res.uncommittedBlocks = [];
}
return res;
});
}
// High level functions
/**
* Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob.
*
* When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
* to commit the block list.
*
* A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is
* `blobContentType`, enabling the browser to provide
* functionality based on file type.
*
* @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView
* @param options -
*/
async uploadData(data, options = {}) {
return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => {
if (coreUtil.isNode) {
let buffer;
if (data instanceof Buffer) {
buffer = data;
}
else if (data instanceof ArrayBuffer) {
buffer = Buffer.from(data);
}
else {
data = data;
buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength);
}
return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);
}
else {
const browserBlob = new Blob([data]);
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
}
});
}
/**
* ONLY AVAILABLE IN BROWSERS.
*
* Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob.
*
* When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call
* {@link commitBlockList} to commit the block list.
*
* A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is
* `blobContentType`, enabling the browser to provide
* functionality based on file type.
*
* @deprecated Use {@link uploadData} instead.
*
* @param browserData - Blob, File, ArrayBuffer or ArrayBufferView
* @param options - Options to upload browser data.
* @returns Response data for the Blob Upload operation.
*/
async uploadBrowserData(browserData, options = {}) {
return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => {
const browserBlob = new Blob([browserData]);
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
});
}
/**
*
* Uploads data to block blob. Requires a bodyFactory as the data source,
* which need to return a {@link HttpRequestBody} object with the offset and size provided.
*
* When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
* to commit the block list.
*
* @param bodyFactory -
* @param size - size of the data to upload.
* @param options - Options to Upload to Block Blob operation.
* @returns Response data for the Blob Upload operation.
*/
async uploadSeekableInternal(bodyFactory, size, options = {}) {
var _a, _b;
let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0;
if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {
throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`);
}
const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;
if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) {
throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`);
}
if (blockSize === 0) {
if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) {
throw new RangeError(`${size} is too larger to upload to a block blob.`);
}
if (size > maxSingleShotSize) {
blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS);
if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) {
blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;
}
}
}
if (!options.blobHTTPHeaders) {
options.blobHTTPHeaders = {};
}
if (!options.conditions) {
options.conditions = {};
}
return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => {
if (size <= maxSingleShotSize) {
return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions));
}
const numBlocks = Math.floor((size - 1) / blockSize) + 1;
if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) {
throw new RangeError(`The buffer's size is too big or the BlockSize is too small;` +
`the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`);
}
const blockList = [];
const blockIDPrefix = coreUtil.randomUUID();
let transferProgress = 0;
const batch = new Batch(options.concurrency);
for (let i = 0; i < numBlocks; i++) {
batch.addOperation(async () => {
const blockID = generateBlockID(blockIDPrefix, i);
const start = blockSize * i;
const end = i === numBlocks - 1 ? size : start + blockSize;
const contentLength = end - start;
blockList.push(blockID);
await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, {
abortSignal: options.abortSignal,
conditions: options.conditions,
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
});
// Update progress after block is successfully uploaded to server, in case of block trying
// TODO: Hook with convenience layer progress event in finer level
transferProgress += contentLength;
if (options.onProgress) {
options.onProgress({
loadedBytes: transferProgress,
});
}
});
}
await batch.do();
return this.commitBlockList(blockList, updatedOptions);
});
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Uploads a local file in blocks to a block blob.
*
* When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.
* Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList
* to commit the block list.
*
* @param filePath - Full path of local file
* @param options - Options to Upload to Block Blob operation.
* @returns Response data for the Blob Upload operation.
*/
async uploadFile(filePath, options = {}) {
return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => {
const size = (await fsStat(filePath)).size;
return this.uploadSeekableInternal((offset, count) => {
return () => fsCreateReadStream(filePath, {
autoClose: true,
end: count ? offset + count - 1 : Infinity,
start: offset,
});
}, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
});
}
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Uploads a Node.js Readable stream into block blob.
*
* PERFORMANCE IMPROVEMENT TIPS:
* * Input stream highWaterMark is better to set a same value with bufferSize
* parameter, which will avoid Buffer.concat() operations.
*
* @param stream - Node.js Readable stream
* @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB
* @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated,
* positive correlation with max uploading concurrency. Default value is 5
* @param options - Options to Upload Stream to Block Blob operation.
* @returns Response data for the Blob Upload operation.
*/
async uploadStream(stream, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) {
if (!options.blobHTTPHeaders) {
options.blobHTTPHeaders = {};
}
if (!options.conditions) {
options.conditions = {};
}
return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => {
let blockNum = 0;
const blockIDPrefix = coreUtil.randomUUID();
let transferProgress = 0;
const blockList = [];
const scheduler = new BufferScheduler(stream, bufferSize, maxConcurrency, async (body, length) => {
const blockID = generateBlockID(blockIDPrefix, blockNum);
blockList.push(blockID);
blockNum++;
await this.stageBlock(blockID, body, length, {
customerProvidedKey: options.customerProvidedKey,
conditions: options.conditions,
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
});
// Update progress after block is successfully uploaded to server, in case of block trying
transferProgress += length;
if (options.onProgress) {
options.onProgress({ loadedBytes: transferProgress });
}
},
// concurrency should set a smaller value than maxConcurrency, which is helpful to
// reduce the possibility when a outgoing handler waits for stream data, in
// this situation, outgoing handlers are blocked.
// Outgoing queue shouldn't be empty.
Math.ceil((maxConcurrency / 4) * 3));
await scheduler.do();
return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })));
});
}
}
/**
* PageBlobClient defines a set of operations applicable to page blobs.
*/
class PageBlobClient extends BlobClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
// In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.
// super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);
let pipeline;
let url;
options = options || {};
if (isPipelineLike(credentialOrPipelineOrContainerName)) {
// (url: string, pipeline: Pipeline)
url = urlOrConnectionString;
pipeline = credentialOrPipelineOrContainerName;
}
else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||
credentialOrPipelineOrContainerName instanceof AnonymousCredential ||
coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
url = urlOrConnectionString;
options = blobNameOrOptions;
pipeline = newPipeline(credentialOrPipelineOrContainerName, options);
}
else if (!credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName !== "string") {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
// The second parameter is undefined. Use anonymous credential.
url = urlOrConnectionString;
pipeline = newPipeline(new AnonymousCredential(), options);
}
else if (credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName === "string" &&
blobNameOrOptions &&
typeof blobNameOrOptions === "string") {
// (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)
const containerName = credentialOrPipelineOrContainerName;
const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") {
if (coreUtil.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options);
}
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
}
else if (extractedCreds.kind === "SASConnString") {
url =
appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +
"?" +
extractedCreds.accountSas;
pipeline = newPipeline(new AnonymousCredential(), options);
}
else {
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
}
}
else {
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
}
super(url, pipeline);
this.pageBlobContext = this.storageClientContext.pageBlob;
}
/**
* Creates a new PageBlobClient object identical to the source but with the
* specified snapshot timestamp.
* Provide "" will remove the snapshot and return a Client to the base blob.
*
* @param snapshot - The snapshot timestamp.
* @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp.
*/
withSnapshot(snapshot) {
return new PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);
}
/**
* Creates a page blob of the specified length. Call uploadPages to upload data
* data to a page blob.
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
*
* @param size - size of the page blob.
* @param options - Options to the Page Blob Create operation.
* @returns Response data for the Page Blob Create operation.
*/
async create(size, options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => {
var _a, _b, _c;
return assertResponse(await this.pageBlobContext.create(0, size, {
abortSignal: options.abortSignal,
blobHttpHeaders: options.blobHTTPHeaders,
blobSequenceNumber: options.blobSequenceNumber,
leaseAccessConditions: options.conditions,
metadata: options.metadata,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
legalHold: options.legalHold,
tier: toAccessTier(options.tier),
blobTagsString: toBlobTagsString(options.tags),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Creates a page blob of the specified length. Call uploadPages to upload data
* data to a page blob. If the blob with the same name already exists, the content
* of the existing blob will remain unchanged.
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
*
* @param size - size of the page blob.
* @param options -
*/
async createIfNotExists(size, options = {}) {
return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => {
var _a, _b;
try {
const conditions = { ifNoneMatch: ETagAny };
const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions })));
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
}
catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
}
throw e;
}
});
}
/**
* Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512.
* @see https://learn.microsoft.com/rest/api/storageservices/put-page
*
* @param body - Data to upload
* @param offset - Offset of destination page blob
* @param count - Content length of the body, also number of bytes to be uploaded
* @param options - Options to the Page Blob Upload Pages operation.
* @returns Response data for the Page Blob Upload Pages operation.
*/
async uploadPages(body, offset, count, options = {}) {
options.conditions = options.conditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.pageBlobContext.uploadPages(count, body, {
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
requestOptions: {
onUploadProgress: options.onProgress,
},
range: rangeToString({ offset, count }),
sequenceNumberAccessConditions: options.conditions,
transactionalContentMD5: options.transactionalContentMD5,
transactionalContentCrc64: options.transactionalContentCrc64,
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* The Upload Pages operation writes a range of pages to a page blob where the
* contents are read from a URL.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-page-from-url
*
* @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication
* @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob
* @param destOffset - Offset of destination page blob
* @param count - Number of bytes to be uploaded from source page blob
* @param options -
*/
async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) {
options.conditions = options.conditions || {};
options.sourceConditions = options.sourceConditions || {};
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => {
var _a, _b, _c, _d, _e;
return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), {
abortSignal: options.abortSignal,
sourceContentMD5: options.sourceContentMD5,
sourceContentCrc64: options.sourceContentCrc64,
leaseAccessConditions: options.conditions,
sequenceNumberAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
sourceModifiedAccessConditions: {
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
},
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Frees the specified pages from the page blob.
* @see https://learn.microsoft.com/rest/api/storageservices/put-page
*
* @param offset - Starting byte position of the pages to clear.
* @param count - Number of bytes to clear.
* @param options - Options to the Page Blob Clear Pages operation.
* @returns Response data for the Page Blob Clear Pages operation.
*/
async clearPages(offset = 0, count, options = {}) {
options.conditions = options.conditions || {};
return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.pageBlobContext.clearPages(0, {
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
range: rangeToString({ offset, count }),
sequenceNumberAccessConditions: options.conditions,
cpkInfo: options.customerProvidedKey,
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Returns the list of valid page ranges for a page blob or snapshot of a page blob.
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
*
* @param offset - Starting byte position of the page ranges.
* @param count - Number of bytes to get.
* @param options - Options to the Page Blob Get Ranges operation.
* @returns Response data for the Page Blob Get Ranges operation.
*/
async getPageRanges(offset = 0, count, options = {}) {
options.conditions = options.conditions || {};
return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => {
var _a;
const response = assertResponse(await this.pageBlobContext.getPageRanges({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
range: rangeToString({ offset, count }),
tracingOptions: updatedOptions.tracingOptions,
}));
return rangeResponseFromModel(response);
});
}
/**
* getPageRangesSegment returns a single segment of page ranges starting from the
* specified Marker. Use an empty Marker to start enumeration from the beginning.
* After getting a segment, process it, and then call getPageRangesSegment again
* (passing the the previously-returned Marker) to get the next segment.
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
*
* @param offset - Starting byte position of the page ranges.
* @param count - Number of bytes to get.
* @param marker - A string value that identifies the portion of the list to be returned with the next list operation.
* @param options - Options to PageBlob Get Page Ranges Segment operation.
*/
async listPageRangesSegment(offset = 0, count, marker, options = {}) {
return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.pageBlobContext.getPageRanges({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
range: rangeToString({ offset, count }),
marker: marker,
maxPageSize: options.maxPageSize,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel}
*
* @param offset - Starting byte position of the page ranges.
* @param count - Number of bytes to get.
* @param marker - A string value that identifies the portion of
* the get of page ranges to be returned with the next getting operation. The
* operation returns the ContinuationToken value within the response body if the
* getting operation did not return all page ranges remaining within the current page.
* The ContinuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of get
* items. The marker value is opaque to the client.
* @param options - Options to List Page Ranges operation.
*/
listPageRangeItemSegments() {
return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker, options = {}) {
let getPageRangeItemSegmentsResponse;
if (!!marker || marker === undefined) {
do {
getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker, options));
marker = getPageRangeItemSegmentsResponse.continuationToken;
yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse));
} while (marker);
}
});
}
/**
* Returns an AsyncIterableIterator of {@link PageRangeInfo} objects
*
* @param offset - Starting byte position of the page ranges.
* @param count - Number of bytes to get.
* @param options - Options to List Page Ranges operation.
*/
listPageRangeItems() {
return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) {
var _a, e_1, _b, _c;
let marker;
try {
for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const getPageRangesSegment = _c;
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
}
finally { if (e_1) throw e_1.error; }
}
});
}
/**
* Returns an async iterable iterator to list of page ranges for a page blob.
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
*
* .byPage() returns an async iterable iterator to list of page ranges for a page blob.
*
* Example using `for await` syntax:
*
* ```js
* // Get the pageBlobClient before you run these snippets,
* // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");`
* let i = 1;
* for await (const pageRange of pageBlobClient.listPageRanges()) {
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
* }
* ```
*
* Example using `iter.next()`:
*
* ```js
* let i = 1;
* let iter = pageBlobClient.listPageRanges();
* let pageRangeItem = await iter.next();
* while (!pageRangeItem.done) {
* console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);
* pageRangeItem = await iter.next();
* }
* ```
*
* Example using `byPage()`:
*
* ```js
* // passing optional maxPageSize in the page settings
* let i = 1;
* for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) {
* for (const pageRange of response) {
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
* }
* }
* ```
*
* Example using paging with a marker:
*
* ```js
* let i = 1;
* let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 });
* let response = (await iterator.next()).value;
*
* // Prints 2 page ranges
* for (const pageRange of response) {
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
* }
*
* // Gets next marker
* let marker = response.continuationToken;
*
* // Passing next marker as continuationToken
*
* iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 });
* response = (await iterator.next()).value;
*
* // Prints 10 page ranges
* for (const blob of response) {
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
* }
* ```
* @param offset - Starting byte position of the page ranges.
* @param count - Number of bytes to get.
* @param options - Options to the Page Blob Get Ranges operation.
* @returns An asyncIterableIterator that supports paging.
*/
listPageRanges(offset = 0, count, options = {}) {
options.conditions = options.conditions || {};
// AsyncIterableIterator to iterate over blobs
const iter = this.listPageRangeItems(offset, count, options);
return {
/**
* The next method, part of the iteration protocol
*/
next() {
return iter.next();
},
/**
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings = {}) => {
return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options));
},
};
}
/**
* Gets the collection of page ranges that differ between a specified snapshot and this page blob.
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
*
* @param offset - Starting byte position of the page blob
* @param count - Number of bytes to get ranges diff.
* @param prevSnapshot - Timestamp of snapshot to retrieve the difference.
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
* @returns Response data for the Page Blob Get Page Range Diff operation.
*/
async getPageRangesDiff(offset, count, prevSnapshot, options = {}) {
options.conditions = options.conditions || {};
return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => {
var _a;
const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
prevsnapshot: prevSnapshot,
range: rangeToString({ offset, count }),
tracingOptions: updatedOptions.tracingOptions,
}));
return rangeResponseFromModel(result);
});
}
/**
* getPageRangesDiffSegment returns a single segment of page ranges starting from the
* specified Marker for difference between previous snapshot and the target page blob.
* Use an empty Marker to start enumeration from the beginning.
* After getting a segment, process it, and then call getPageRangesDiffSegment again
* (passing the the previously-returned Marker) to get the next segment.
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
*
* @param offset - Starting byte position of the page ranges.
* @param count - Number of bytes to get.
* @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
* @param marker - A string value that identifies the portion of the get to be returned with the next get operation.
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
*/
async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) {
return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.pageBlobContext.getPageRangesDiff({
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
prevsnapshot: prevSnapshotOrUrl,
range: rangeToString({
offset: offset,
count: count,
}),
marker: marker,
maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel}
*
*
* @param offset - Starting byte position of the page ranges.
* @param count - Number of bytes to get.
* @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
* @param marker - A string value that identifies the portion of
* the get of page ranges to be returned with the next getting operation. The
* operation returns the ContinuationToken value within the response body if the
* getting operation did not return all page ranges remaining within the current page.
* The ContinuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of get
* items. The marker value is opaque to the client.
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
*/
listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) {
return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() {
let getPageRangeItemSegmentsResponse;
if (!!marker || marker === undefined) {
do {
getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options));
marker = getPageRangeItemSegmentsResponse.continuationToken;
yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse));
} while (marker);
}
});
}
/**
* Returns an AsyncIterableIterator of {@link PageRangeInfo} objects
*
* @param offset - Starting byte position of the page ranges.
* @param count - Number of bytes to get.
* @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
*/
listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) {
return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() {
var _a, e_2, _b, _c;
let marker;
try {
for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const getPageRangesSegment = _c;
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
}
finally { if (e_2) throw e_2.error; }
}
});
}
/**
* Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
*
* .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.
*
* Example using `for await` syntax:
*
* ```js
* // Get the pageBlobClient before you run these snippets,
* // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");`
* let i = 1;
* for await (const pageRange of pageBlobClient.listPageRangesDiff()) {
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
* }
* ```
*
* Example using `iter.next()`:
*
* ```js
* let i = 1;
* let iter = pageBlobClient.listPageRangesDiff();
* let pageRangeItem = await iter.next();
* while (!pageRangeItem.done) {
* console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);
* pageRangeItem = await iter.next();
* }
* ```
*
* Example using `byPage()`:
*
* ```js
* // passing optional maxPageSize in the page settings
* let i = 1;
* for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) {
* for (const pageRange of response) {
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
* }
* }
* ```
*
* Example using paging with a marker:
*
* ```js
* let i = 1;
* let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 });
* let response = (await iterator.next()).value;
*
* // Prints 2 page ranges
* for (const pageRange of response) {
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
* }
*
* // Gets next marker
* let marker = response.continuationToken;
*
* // Passing next marker as continuationToken
*
* iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 });
* response = (await iterator.next()).value;
*
* // Prints 10 page ranges
* for (const blob of response) {
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
* }
* ```
* @param offset - Starting byte position of the page ranges.
* @param count - Number of bytes to get.
* @param prevSnapshot - Timestamp of snapshot to retrieve the difference.
* @param options - Options to the Page Blob Get Ranges operation.
* @returns An asyncIterableIterator that supports paging.
*/
listPageRangesDiff(offset, count, prevSnapshot, options = {}) {
options.conditions = options.conditions || {};
// AsyncIterableIterator to iterate over blobs
const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options));
return {
/**
* The next method, part of the iteration protocol
*/
next() {
return iter.next();
},
/**
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings = {}) => {
return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options));
},
};
}
/**
* Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks.
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
*
* @param offset - Starting byte position of the page blob
* @param count - Number of bytes to get ranges diff.
* @param prevSnapshotUrl - URL of snapshot to retrieve the difference.
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
* @returns Response data for the Page Blob Get Page Range Diff operation.
*/
async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) {
options.conditions = options.conditions || {};
return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => {
var _a;
const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
prevSnapshotUrl,
range: rangeToString({ offset, count }),
tracingOptions: updatedOptions.tracingOptions,
}));
return rangeResponseFromModel(response);
});
}
/**
* Resizes the page blob to the specified size (which must be a multiple of 512).
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties
*
* @param size - Target size
* @param options - Options to the Page Blob Resize operation.
* @returns Response data for the Page Blob Resize operation.
*/
async resize(size, options = {}) {
options.conditions = options.conditions || {};
return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.pageBlobContext.resize(size, {
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Sets a page blob's sequence number.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties
*
* @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number.
* @param sequenceNumber - Required if sequenceNumberAction is max or update
* @param options - Options to the Page Blob Update Sequence Number operation.
* @returns Response data for the Page Blob Update Sequence Number operation.
*/
async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) {
options.conditions = options.conditions || {};
return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, {
abortSignal: options.abortSignal,
blobSequenceNumber: sequenceNumber,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.
* The snapshot is copied such that only the differential changes between the previously
* copied snapshot are transferred to the destination.
* The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.
* @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob
* @see https://learn.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots
*
* @param copySource - Specifies the name of the source page blob snapshot. For example,
* https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=
* @param options - Options to the Page Blob Copy Incremental operation.
* @returns Response data for the Page Blob Copy Incremental operation.
*/
async startCopyIncremental(copySource, options = {}) {
return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => {
var _a;
return assertResponse(await this.pageBlobContext.copyIncremental(copySource, {
abortSignal: options.abortSignal,
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
async function getBodyAsText(batchResponse) {
let buffer = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES);
const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer);
// Slice the buffer to trim the empty ending.
buffer = buffer.slice(0, responseLength);
return buffer.toString();
}
function utf8ByteLength(str) {
return Buffer.byteLength(str);
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const HTTP_HEADER_DELIMITER = ": ";
const SPACE_DELIMITER = " ";
const NOT_FOUND = -1;
/**
* Util class for parsing batch response.
*/
class BatchResponseParser {
constructor(batchResponse, subRequests) {
if (!batchResponse || !batchResponse.contentType) {
// In special case(reported), server may return invalid content-type which could not be parsed.
throw new RangeError("batchResponse is malformed or doesn't contain valid content-type.");
}
if (!subRequests || subRequests.size === 0) {
// This should be prevent during coding.
throw new RangeError("Invalid state: subRequests is not provided or size is 0.");
}
this.batchResponse = batchResponse;
this.subRequests = subRequests;
this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1];
this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`;
this.batchResponseEnding = `--${this.responseBatchBoundary}--`;
}
// For example of response, please refer to https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#response
async parseBatchResponse() {
// When logic reach here, suppose batch request has already succeeded with 202, so we can further parse
// sub request's response.
if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) {
throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`);
}
const responseBodyAsText = await getBodyAsText(this.batchResponse);
const subResponses = responseBodyAsText
.split(this.batchResponseEnding)[0] // string after ending is useless
.split(this.perResponsePrefix)
.slice(1); // string before first response boundary is useless
const subResponseCount = subResponses.length;
// Defensive coding in case of potential error parsing.
// Note: subResponseCount == 1 is special case where sub request is invalid.
// We try to prevent such cases through early validation, e.g. validate sub request count >= 1.
// While in unexpected sub request invalid case, we allow sub response to be parsed and return to user.
if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) {
throw new Error("Invalid state: sub responses' count is not equal to sub requests' count.");
}
const deserializedSubResponses = new Array(subResponseCount);
let subResponsesSucceededCount = 0;
let subResponsesFailedCount = 0;
// Parse sub subResponses.
for (let index = 0; index < subResponseCount; index++) {
const subResponse = subResponses[index];
const deserializedSubResponse = {};
deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders());
const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`);
let subRespHeaderStartFound = false;
let subRespHeaderEndFound = false;
let subRespFailed = false;
let contentId = NOT_FOUND;
for (const responseLine of responseLines) {
if (!subRespHeaderStartFound) {
// Convention line to indicate content ID
if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) {
contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]);
}
// Http version line with status code indicates the start of sub request's response.
// Example: HTTP/1.1 202 Accepted
if (responseLine.startsWith(HTTP_VERSION_1_1)) {
subRespHeaderStartFound = true;
const tokens = responseLine.split(SPACE_DELIMITER);
deserializedSubResponse.status = parseInt(tokens[1]);
deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER);
}
continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: *
}
if (responseLine.trim() === "") {
// Sub response's header start line already found, and the first empty line indicates header end line found.
if (!subRespHeaderEndFound) {
subRespHeaderEndFound = true;
}
continue; // Skip empty line
}
// Note: when code reach here, it indicates subRespHeaderStartFound == true
if (!subRespHeaderEndFound) {
if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) {
// Defensive coding to prevent from missing valuable lines.
throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`);
}
// Parse headers of sub response.
const tokens = responseLine.split(HTTP_HEADER_DELIMITER);
deserializedSubResponse.headers.set(tokens[0], tokens[1]);
if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) {
deserializedSubResponse.errorCode = tokens[1];
subRespFailed = true;
}
}
else {
// Assemble body of sub response.
if (!deserializedSubResponse.bodyAsText) {
deserializedSubResponse.bodyAsText = "";
}
deserializedSubResponse.bodyAsText += responseLine;
}
} // Inner for end
// The response will contain the Content-ID header for each corresponding subrequest response to use for tracking.
// The Content-IDs are set to a valid index in the subrequests we sent. In the status code 202 path, we could expect it
// to be 1-1 mapping from the [0, subRequests.size) to the Content-IDs returned. If not, we simply don't return that
// unexpected subResponse in the parsed reponse and we can always look it up in the raw response for debugging purpose.
if (contentId !== NOT_FOUND &&
Number.isInteger(contentId) &&
contentId >= 0 &&
contentId < this.subRequests.size &&
deserializedSubResponses[contentId] === undefined) {
deserializedSubResponse._request = this.subRequests.get(contentId);
deserializedSubResponses[contentId] = deserializedSubResponse;
}
else {
logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`);
}
if (subRespFailed) {
subResponsesFailedCount++;
}
else {
subResponsesSucceededCount++;
}
}
return {
subResponses: deserializedSubResponses,
subResponsesSucceededCount: subResponsesSucceededCount,
subResponsesFailedCount: subResponsesFailedCount,
};
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
var MutexLockStatus;
(function (MutexLockStatus) {
MutexLockStatus[MutexLockStatus["LOCKED"] = 0] = "LOCKED";
MutexLockStatus[MutexLockStatus["UNLOCKED"] = 1] = "UNLOCKED";
})(MutexLockStatus || (MutexLockStatus = {}));
/**
* An async mutex lock.
*/
class Mutex {
/**
* Lock for a specific key. If the lock has been acquired by another customer, then
* will wait until getting the lock.
*
* @param key - lock key
*/
static async lock(key) {
return new Promise((resolve) => {
if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) {
this.keys[key] = MutexLockStatus.LOCKED;
resolve();
}
else {
this.onUnlockEvent(key, () => {
this.keys[key] = MutexLockStatus.LOCKED;
resolve();
});
}
});
}
/**
* Unlock a key.
*
* @param key -
*/
static async unlock(key) {
return new Promise((resolve) => {
if (this.keys[key] === MutexLockStatus.LOCKED) {
this.emitUnlockEvent(key);
}
delete this.keys[key];
resolve();
});
}
static onUnlockEvent(key, handler) {
if (this.listeners[key] === undefined) {
this.listeners[key] = [handler];
}
else {
this.listeners[key].push(handler);
}
}
static emitUnlockEvent(key) {
if (this.listeners[key] !== undefined && this.listeners[key].length > 0) {
const handler = this.listeners[key].shift();
setImmediate(() => {
handler.call(this);
});
}
}
}
Mutex.keys = {};
Mutex.listeners = {};
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* A BlobBatch represents an aggregated set of operations on blobs.
* Currently, only `delete` and `setAccessTier` are supported.
*/
class BlobBatch {
constructor() {
this.batch = "batch";
this.batchRequest = new InnerBatchRequest();
}
/**
* Get the value of Content-Type for a batch request.
* The value must be multipart/mixed with a batch boundary.
* Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252
*/
getMultiPartContentType() {
return this.batchRequest.getMultipartContentType();
}
/**
* Get assembled HTTP request body for sub requests.
*/
getHttpRequestBody() {
return this.batchRequest.getHttpRequestBody();
}
/**
* Get sub requests that are added into the batch request.
*/
getSubRequests() {
return this.batchRequest.getSubRequests();
}
async addSubRequestInternal(subRequest, assembleSubRequestFunc) {
await Mutex.lock(this.batch);
try {
this.batchRequest.preAddSubRequest(subRequest);
await assembleSubRequestFunc();
this.batchRequest.postAddSubRequest(subRequest);
}
finally {
await Mutex.unlock(this.batch);
}
}
setBatchType(batchType) {
if (!this.batchType) {
this.batchType = batchType;
}
if (this.batchType !== batchType) {
throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`);
}
}
async deleteBlob(urlOrBlobClient, credentialOrOptions, options) {
let url;
let credential;
if (typeof urlOrBlobClient === "string" &&
((coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential) ||
credentialOrOptions instanceof AnonymousCredential ||
coreAuth.isTokenCredential(credentialOrOptions))) {
// First overload
url = urlOrBlobClient;
credential = credentialOrOptions;
}
else if (urlOrBlobClient instanceof BlobClient) {
// Second overload
url = urlOrBlobClient.url;
credential = urlOrBlobClient.credential;
options = credentialOrOptions;
}
else {
throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.");
}
if (!options) {
options = {};
}
return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => {
this.setBatchType("delete");
await this.addSubRequestInternal({
url: url,
credential: credential,
}, async () => {
await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);
});
});
}
async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) {
let url;
let credential;
let tier;
if (typeof urlOrBlobClient === "string" &&
((coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential) ||
credentialOrTier instanceof AnonymousCredential ||
coreAuth.isTokenCredential(credentialOrTier))) {
// First overload
url = urlOrBlobClient;
credential = credentialOrTier;
tier = tierOrOptions;
}
else if (urlOrBlobClient instanceof BlobClient) {
// Second overload
url = urlOrBlobClient.url;
credential = urlOrBlobClient.credential;
tier = credentialOrTier;
options = tierOrOptions;
}
else {
throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.");
}
if (!options) {
options = {};
}
return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => {
this.setBatchType("setAccessTier");
await this.addSubRequestInternal({
url: url,
credential: credential,
}, async () => {
await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);
});
});
}
}
/**
* Inner batch request class which is responsible for assembling and serializing sub requests.
* See https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled.
*/
class InnerBatchRequest {
constructor() {
this.operationCount = 0;
this.body = "";
const tempGuid = coreUtil.randomUUID();
// batch_{batchid}
this.boundary = `batch_${tempGuid}`;
// --batch_{batchid}
// Content-Type: application/http
// Content-Transfer-Encoding: binary
this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`;
// multipart/mixed; boundary=batch_{batchid}
this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`;
// --batch_{batchid}--
this.batchRequestEnding = `--${this.boundary}--`;
this.subRequests = new Map();
}
/**
* Create pipeline to assemble sub requests. The idea here is to use existing
* credential and serialization/deserialization components, with additional policies to
* filter unnecessary headers, assemble sub requests into request's body
* and intercept request from going to wire.
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
*/
createPipeline(credential) {
const corePipeline = coreRestPipeline.createEmptyPipeline();
corePipeline.addPolicy(coreClient.serializationPolicy({
stringifyXML: coreXml.stringifyXML,
serializerOptions: {
xml: {
xmlCharKey: "#",
},
},
}), { phase: "Serialize" });
// Use batch header filter policy to exclude unnecessary headers
corePipeline.addPolicy(batchHeaderFilterPolicy());
// Use batch assemble policy to assemble request and intercept request from going to wire
corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" });
if (coreAuth.isTokenCredential(credential)) {
corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
credential,
scopes: StorageOAuthScopes,
challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge },
}), { phase: "Sign" });
}
else if (credential instanceof StorageSharedKeyCredential) {
corePipeline.addPolicy(storageSharedKeyCredentialPolicy({
accountName: credential.accountName,
accountKey: credential.accountKey,
}), { phase: "Sign" });
}
const pipeline = new Pipeline([]);
// attach the v2 pipeline to this one
pipeline._credential = credential;
pipeline._corePipeline = corePipeline;
return pipeline;
}
appendSubRequestToBody(request) {
// Start to assemble sub request
this.body += [
this.subRequestPrefix, // sub request constant prefix
`${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID
"", // empty line after sub request's content ID
`${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method
].join(HTTP_LINE_ENDING);
for (const [name, value] of request.headers) {
this.body += `${name}: ${value}${HTTP_LINE_ENDING}`;
}
this.body += HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line
// No body to assemble for current batch request support
// End to assemble sub request
}
preAddSubRequest(subRequest) {
if (this.operationCount >= BATCH_MAX_REQUEST) {
throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`);
}
// Fast fail if url for sub request is invalid
const path = getURLPath(subRequest.url);
if (!path || path === "") {
throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`);
}
}
postAddSubRequest(subRequest) {
this.subRequests.set(this.operationCount, subRequest);
this.operationCount++;
}
// Return the http request body with assembling the ending line to the sub request body.
getHttpRequestBody() {
return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`;
}
getMultipartContentType() {
return this.multipartContentType;
}
getSubRequests() {
return this.subRequests;
}
}
function batchRequestAssemblePolicy(batchRequest) {
return {
name: "batchRequestAssemblePolicy",
async sendRequest(request) {
batchRequest.appendSubRequestToBody(request);
return {
request,
status: 200,
headers: coreRestPipeline.createHttpHeaders(),
};
},
};
}
function batchHeaderFilterPolicy() {
return {
name: "batchHeaderFilterPolicy",
async sendRequest(request, next) {
let xMsHeaderName = "";
for (const [name] of request.headers) {
if (iEqual(name, HeaderConstants.X_MS_VERSION)) {
xMsHeaderName = name;
}
}
if (xMsHeaderName !== "") {
request.headers.delete(xMsHeaderName); // The subrequests should not have the x-ms-version header.
}
return next(request);
},
};
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch
*/
class BlobBatchClient {
constructor(url, credentialOrPipeline,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
let pipeline;
if (isPipelineLike(credentialOrPipeline)) {
pipeline = credentialOrPipeline;
}
else if (!credentialOrPipeline) {
// no credential provided
pipeline = newPipeline(new AnonymousCredential(), options);
}
else {
pipeline = newPipeline(credentialOrPipeline, options);
}
const storageClientContext = new StorageContextClient(url, getCoreClientOptions(pipeline));
const path = getURLPath(url);
if (path && path !== "/") {
// Container scoped.
this.serviceOrContainerContext = storageClientContext.container;
}
else {
this.serviceOrContainerContext = storageClientContext.service;
}
}
/**
* Creates a {@link BlobBatch}.
* A BlobBatch represents an aggregated set of operations on blobs.
*/
createBatch() {
return new BlobBatch();
}
async deleteBlobs(urlsOrBlobClients, credentialOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
const batch = new BlobBatch();
for (const urlOrBlobClient of urlsOrBlobClients) {
if (typeof urlOrBlobClient === "string") {
await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options);
}
else {
await batch.deleteBlob(urlOrBlobClient, credentialOrOptions);
}
}
return this.submitBatch(batch);
}
async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
const batch = new BlobBatch();
for (const urlOrBlobClient of urlsOrBlobClients) {
if (typeof urlOrBlobClient === "string") {
await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options);
}
else {
await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions);
}
}
return this.submitBatch(batch);
}
/**
* Submit batch request which consists of multiple subrequests.
*
* Get `blobBatchClient` and other details before running the snippets.
* `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient`
*
* Example usage:
*
* ```js
* let batchRequest = new BlobBatch();
* await batchRequest.deleteBlob(urlInString0, credential0);
* await batchRequest.deleteBlob(urlInString1, credential1, {
* deleteSnapshots: "include"
* });
* const batchResp = await blobBatchClient.submitBatch(batchRequest);
* console.log(batchResp.subResponsesSucceededCount);
* ```
*
* Example using a lease:
*
* ```js
* let batchRequest = new BlobBatch();
* await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool");
* await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", {
* conditions: { leaseId: leaseId }
* });
* const batchResp = await blobBatchClient.submitBatch(batchRequest);
* console.log(batchResp.subResponsesSucceededCount);
* ```
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch
*
* @param batchRequest - A set of Delete or SetTier operations.
* @param options -
*/
async submitBatch(batchRequest, options = {}) {
if (!batchRequest || batchRequest.getSubRequests().size === 0) {
throw new RangeError("Batch request should contain one or more sub requests.");
}
return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => {
const batchRequestBody = batchRequest.getHttpRequestBody();
// ServiceSubmitBatchResponseModel and ContainerSubmitBatchResponse are compatible for now.
const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions)));
// Parse the sub responses result, if logic reaches here(i.e. the batch request succeeded with status code 202).
const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests());
const responseSummary = await batchResponseParser.parseBatchResponse();
const res = {
_response: rawBatchResponse._response,
contentType: rawBatchResponse.contentType,
errorCode: rawBatchResponse.errorCode,
requestId: rawBatchResponse.requestId,
clientRequestId: rawBatchResponse.clientRequestId,
version: rawBatchResponse.version,
subResponses: responseSummary.subResponses,
subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,
subResponsesFailedCount: responseSummary.subResponsesFailedCount,
};
return res;
});
}
}
/**
* A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.
*/
class ContainerClient extends StorageClient {
/**
* The name of the container.
*/
get containerName() {
return this._containerName;
}
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
let pipeline;
let url;
options = options || {};
if (isPipelineLike(credentialOrPipelineOrContainerName)) {
// (url: string, pipeline: Pipeline)
url = urlOrConnectionString;
pipeline = credentialOrPipelineOrContainerName;
}
else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||
credentialOrPipelineOrContainerName instanceof AnonymousCredential ||
coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
url = urlOrConnectionString;
pipeline = newPipeline(credentialOrPipelineOrContainerName, options);
}
else if (!credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName !== "string") {
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
// The second parameter is undefined. Use anonymous credential.
url = urlOrConnectionString;
pipeline = newPipeline(new AnonymousCredential(), options);
}
else if (credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName === "string") {
// (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)
const containerName = credentialOrPipelineOrContainerName;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") {
if (coreUtil.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));
if (!options.proxyOptions) {
options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options);
}
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
}
else if (extractedCreds.kind === "SASConnString") {
url =
appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) +
"?" +
extractedCreds.accountSas;
pipeline = newPipeline(new AnonymousCredential(), options);
}
else {
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
}
}
else {
throw new Error("Expecting non-empty strings for containerName parameter");
}
super(url, pipeline);
this._containerName = this.getContainerNameFromUrl();
this.containerContext = this.storageClientContext.container;
}
/**
* Creates a new container under the specified account. If the container with
* the same name already exists, the operation fails.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container
* Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata
*
* @param options - Options to Container Create operation.
*
*
* Example usage:
*
* ```js
* const containerClient = blobServiceClient.getContainerClient("");
* const createContainerResponse = await containerClient.create();
* console.log("Container was created successfully", createContainerResponse.requestId);
* ```
*/
async create(options = {}) {
return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => {
return assertResponse(await this.containerContext.create(updatedOptions));
});
}
/**
* Creates a new container under the specified account. If the container with
* the same name already exists, it is not changed.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container
* Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata
*
* @param options -
*/
async createIfNotExists(options = {}) {
return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => {
var _a, _b;
try {
const res = await this.create(updatedOptions);
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
}
catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
}
else {
throw e;
}
}
});
}
/**
* Returns true if the Azure container resource represented by this client exists; false otherwise.
*
* NOTE: use this function with care since an existing container might be deleted by other clients or
* applications. Vice versa new containers with the same name might be added by other clients or
* applications after this function completes.
*
* @param options -
*/
async exists(options = {}) {
return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => {
try {
await this.getProperties({
abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions,
});
return true;
}
catch (e) {
if (e.statusCode === 404) {
return false;
}
throw e;
}
});
}
/**
* Creates a {@link BlobClient}
*
* @param blobName - A blob name
* @returns A new BlobClient object for the given blob name.
*/
getBlobClient(blobName) {
return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);
}
/**
* Creates an {@link AppendBlobClient}
*
* @param blobName - An append blob name
*/
getAppendBlobClient(blobName) {
return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);
}
/**
* Creates a {@link BlockBlobClient}
*
* @param blobName - A block blob name
*
*
* Example usage:
*
* ```js
* const content = "Hello world!";
*
* const blockBlobClient = containerClient.getBlockBlobClient("");
* const uploadBlobResponse = await blockBlobClient.upload(content, content.length);
* ```
*/
getBlockBlobClient(blobName) {
return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);
}
/**
* Creates a {@link PageBlobClient}
*
* @param blobName - A page blob name
*/
getPageBlobClient(blobName) {
return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);
}
/**
* Returns all user-defined metadata and system properties for the specified
* container. The data returned does not include the container's list of blobs.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties
*
* WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
* they originally contained uppercase characters. This differs from the metadata keys returned by
* the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which
* will retain their original casing.
*
* @param options - Options to Container Get Properties operation.
*/
async getProperties(options = {}) {
if (!options.conditions) {
options.conditions = {};
}
return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => {
return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions })));
});
}
/**
* Marks the specified container for deletion. The container and any blobs
* contained within it are later deleted during garbage collection.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container
*
* @param options - Options to Container Delete operation.
*/
async delete(options = {}) {
if (!options.conditions) {
options.conditions = {};
}
return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => {
return assertResponse(await this.containerContext.delete({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: options.conditions,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Marks the specified container for deletion if it exists. The container and any blobs
* contained within it are later deleted during garbage collection.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container
*
* @param options - Options to Container Delete operation.
*/
async deleteIfExists(options = {}) {
return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => {
var _a, _b;
try {
const res = await this.delete(updatedOptions);
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
}
catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
}
throw e;
}
});
}
/**
* Sets one or more user-defined name-value pairs for the specified container.
*
* If no option provided, or no metadata defined in the parameter, the container
* metadata will be removed.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-metadata
*
* @param metadata - Replace existing metadata with this value.
* If no value provided the existing metadata will be removed.
* @param options - Options to Container Set Metadata operation.
*/
async setMetadata(metadata, options = {}) {
if (!options.conditions) {
options.conditions = {};
}
if (options.conditions.ifUnmodifiedSince) {
throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service");
}
return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => {
return assertResponse(await this.containerContext.setMetadata({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
metadata,
modifiedAccessConditions: options.conditions,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Gets the permissions for the specified container. The permissions indicate
* whether container data may be accessed publicly.
*
* WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.
* For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z".
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-acl
*
* @param options - Options to Container Get Access Policy operation.
*/
async getAccessPolicy(options = {}) {
if (!options.conditions) {
options.conditions = {};
}
return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => {
const response = assertResponse(await this.containerContext.getAccessPolicy({
abortSignal: options.abortSignal,
leaseAccessConditions: options.conditions,
tracingOptions: updatedOptions.tracingOptions,
}));
const res = {
_response: response._response,
blobPublicAccess: response.blobPublicAccess,
date: response.date,
etag: response.etag,
errorCode: response.errorCode,
lastModified: response.lastModified,
requestId: response.requestId,
clientRequestId: response.clientRequestId,
signedIdentifiers: [],
version: response.version,
};
for (const identifier of response) {
let accessPolicy = undefined;
if (identifier.accessPolicy) {
accessPolicy = {
permissions: identifier.accessPolicy.permissions,
};
if (identifier.accessPolicy.expiresOn) {
accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
}
if (identifier.accessPolicy.startsOn) {
accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn);
}
}
res.signedIdentifiers.push({
accessPolicy,
id: identifier.id,
});
}
return res;
});
}
/**
* Sets the permissions for the specified container. The permissions indicate
* whether blobs in a container may be accessed publicly.
*
* When you set permissions for a container, the existing permissions are replaced.
* If no access or containerAcl provided, the existing container ACL will be
* removed.
*
* When you establish a stored access policy on a container, it may take up to 30 seconds to take effect.
* During this interval, a shared access signature that is associated with the stored access policy will
* fail with status code 403 (Forbidden), until the access policy becomes active.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-acl
*
* @param access - The level of public access to data in the container.
* @param containerAcl - Array of elements each having a unique Id and details of the access policy.
* @param options - Options to Container Set Access Policy operation.
*/
async setAccessPolicy(access, containerAcl, options = {}) {
options.conditions = options.conditions || {};
return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => {
const acl = [];
for (const identifier of containerAcl || []) {
acl.push({
accessPolicy: {
expiresOn: identifier.accessPolicy.expiresOn
? truncatedISO8061Date(identifier.accessPolicy.expiresOn)
: "",
permissions: identifier.accessPolicy.permissions,
startsOn: identifier.accessPolicy.startsOn
? truncatedISO8061Date(identifier.accessPolicy.startsOn)
: "",
},
id: identifier.id,
});
}
return assertResponse(await this.containerContext.setAccessPolicy({
abortSignal: options.abortSignal,
access,
containerAcl: acl,
leaseAccessConditions: options.conditions,
modifiedAccessConditions: options.conditions,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Get a {@link BlobLeaseClient} that manages leases on the container.
*
* @param proposeLeaseId - Initial proposed lease Id.
* @returns A new BlobLeaseClient object for managing leases on the container.
*/
getBlobLeaseClient(proposeLeaseId) {
return new BlobLeaseClient(this, proposeLeaseId);
}
/**
* Creates a new block blob, or updates the content of an existing block blob.
*
* Updating an existing block blob overwrites any existing metadata on the blob.
* Partial updates are not supported; the content of the existing blob is
* overwritten with the new content. To perform a partial update of a block blob's,
* use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}.
*
* This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile},
* {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better
* performance with concurrency uploading.
*
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
*
* @param blobName - Name of the block blob to create or update.
* @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function
* which returns a new Readable stream whose offset is from data source beginning.
* @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a
* string including non non-Base64/Hex-encoded characters.
* @param options - Options to configure the Block Blob Upload operation.
* @returns Block Blob upload response data and the corresponding BlockBlobClient instance.
*/
async uploadBlockBlob(blobName, body, contentLength, options = {}) {
return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => {
const blockBlobClient = this.getBlockBlobClient(blobName);
const response = await blockBlobClient.upload(body, contentLength, updatedOptions);
return {
blockBlobClient,
response,
};
});
}
/**
* Marks the specified blob or snapshot for deletion. The blob is later deleted
* during garbage collection. Note that in order to delete a blob, you must delete
* all of its snapshots. You can delete both at the same time with the Delete
* Blob operation.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob
*
* @param blobName -
* @param options - Options to Blob Delete operation.
* @returns Block blob deletion response data.
*/
async deleteBlob(blobName, options = {}) {
return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => {
let blobClient = this.getBlobClient(blobName);
if (options.versionId) {
blobClient = blobClient.withVersion(options.versionId);
}
return blobClient.delete(updatedOptions);
});
}
/**
* listBlobFlatSegment returns a single segment of blobs starting from the
* specified Marker. Use an empty Marker to start enumeration from the beginning.
* After getting a segment, process it, and then call listBlobsFlatSegment again
* (passing the the previously-returned Marker) to get the next segment.
* @see https://learn.microsoft.com/rest/api/storageservices/list-blobs
*
* @param marker - A string value that identifies the portion of the list to be returned with the next list operation.
* @param options - Options to Container List Blob Flat Segment operation.
*/
async listBlobFlatSegment(marker, options = {}) {
return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => {
const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), { tracingOptions: updatedOptions.tracingOptions })));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => {
const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) });
return blobItem;
}) }) });
return wrappedResponse;
});
}
/**
* listBlobHierarchySegment returns a single segment of blobs starting from
* the specified Marker. Use an empty Marker to start enumeration from the
* beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment
* again (passing the the previously-returned Marker) to get the next segment.
* @see https://learn.microsoft.com/rest/api/storageservices/list-blobs
*
* @param delimiter - The character or string used to define the virtual hierarchy
* @param marker - A string value that identifies the portion of the list to be returned with the next list operation.
* @param options - Options to Container List Blob Hierarchy Segment operation.
*/
async listBlobHierarchySegment(delimiter, marker, options = {}) {
return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => {
var _a;
const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), { tracingOptions: updatedOptions.tracingOptions })));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => {
const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) });
return blobItem;
}), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) });
return blobPrefix;
}) }) });
return wrappedResponse;
});
}
/**
* Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse
*
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the ContinuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The ContinuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to list blobs operation.
*/
listSegments(marker_1) {
return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker, options = {}) {
let listBlobsFlatSegmentResponse;
if (!!marker || marker === undefined) {
do {
listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options));
marker = listBlobsFlatSegmentResponse.continuationToken;
yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse));
} while (marker);
}
});
}
/**
* Returns an AsyncIterableIterator of {@link BlobItem} objects
*
* @param options - Options to list blobs operation.
*/
listItems() {
return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) {
var _a, e_1, _b, _c;
let marker;
try {
for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const listBlobsFlatSegmentResponse = _c;
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems)));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
}
finally { if (e_1) throw e_1.error; }
}
});
}
/**
* Returns an async iterable iterator to list all the blobs
* under the specified account.
*
* .byPage() returns an async iterable iterator to list the blobs in pages.
*
* Example using `for await` syntax:
*
* ```js
* // Get the containerClient before you run these snippets,
* // Can be obtained from `blobServiceClient.getContainerClient("");`
* let i = 1;
* for await (const blob of containerClient.listBlobsFlat()) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* ```
*
* Example using `iter.next()`:
*
* ```js
* let i = 1;
* let iter = containerClient.listBlobsFlat();
* let blobItem = await iter.next();
* while (!blobItem.done) {
* console.log(`Blob ${i++}: ${blobItem.value.name}`);
* blobItem = await iter.next();
* }
* ```
*
* Example using `byPage()`:
*
* ```js
* // passing optional maxPageSize in the page settings
* let i = 1;
* for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) {
* for (const blob of response.segment.blobItems) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
* ```
*
* Example using paging with a marker:
*
* ```js
* let i = 1;
* let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 });
* let response = (await iterator.next()).value;
*
* // Prints 2 blob names
* for (const blob of response.segment.blobItems) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
*
* // Gets next marker
* let marker = response.continuationToken;
*
* // Passing next marker as continuationToken
*
* iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 });
* response = (await iterator.next()).value;
*
* // Prints 10 blob names
* for (const blob of response.segment.blobItems) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* ```
*
* @param options - Options to list blobs.
* @returns An asyncIterableIterator that supports paging.
*/
listBlobsFlat(options = {}) {
const include = [];
if (options.includeCopy) {
include.push("copy");
}
if (options.includeDeleted) {
include.push("deleted");
}
if (options.includeMetadata) {
include.push("metadata");
}
if (options.includeSnapshots) {
include.push("snapshots");
}
if (options.includeVersions) {
include.push("versions");
}
if (options.includeUncommitedBlobs) {
include.push("uncommittedblobs");
}
if (options.includeTags) {
include.push("tags");
}
if (options.includeDeletedWithVersions) {
include.push("deletedwithversions");
}
if (options.includeImmutabilityPolicy) {
include.push("immutabilitypolicy");
}
if (options.includeLegalHold) {
include.push("legalhold");
}
if (options.prefix === "") {
options.prefix = undefined;
}
const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));
// AsyncIterableIterator to iterate over blobs
const iter = this.listItems(updatedOptions);
return {
/**
* The next method, part of the iteration protocol
*/
next() {
return iter.next();
},
/**
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings = {}) => {
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
},
};
}
/**
* Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse
*
* @param delimiter - The character or string used to define the virtual hierarchy
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the ContinuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The ContinuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to list blobs operation.
*/
listHierarchySegments(delimiter_1, marker_1) {
return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter, marker, options = {}) {
let listBlobsHierarchySegmentResponse;
if (!!marker || marker === undefined) {
do {
listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter, marker, options));
marker = listBlobsHierarchySegmentResponse.continuationToken;
yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse));
} while (marker);
}
});
}
/**
* Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects.
*
* @param delimiter - The character or string used to define the virtual hierarchy
* @param options - Options to list blobs operation.
*/
listItemsByHierarchy(delimiter_1) {
return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter, options = {}) {
var _a, e_2, _b, _c;
let marker;
try {
for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const listBlobsHierarchySegmentResponse = _c;
const segment = listBlobsHierarchySegmentResponse.segment;
if (segment.blobPrefixes) {
for (const prefix of segment.blobPrefixes) {
yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix));
}
}
for (const blob of segment.blobItems) {
yield yield tslib.__await(Object.assign({ kind: "blob" }, blob));
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
}
finally { if (e_2) throw e_2.error; }
}
});
}
/**
* Returns an async iterable iterator to list all the blobs by hierarchy.
* under the specified account.
*
* .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages.
*
* Example using `for await` syntax:
*
* ```js
* for await (const item of containerClient.listBlobsByHierarchy("/")) {
* if (item.kind === "prefix") {
* console.log(`\tBlobPrefix: ${item.name}`);
* } else {
* console.log(`\tBlobItem: name - ${item.name}`);
* }
* }
* ```
*
* Example using `iter.next()`:
*
* ```js
* let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" });
* let entity = await iter.next();
* while (!entity.done) {
* let item = entity.value;
* if (item.kind === "prefix") {
* console.log(`\tBlobPrefix: ${item.name}`);
* } else {
* console.log(`\tBlobItem: name - ${item.name}`);
* }
* entity = await iter.next();
* }
* ```
*
* Example using `byPage()`:
*
* ```js
* console.log("Listing blobs by hierarchy by page");
* for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) {
* const segment = response.segment;
* if (segment.blobPrefixes) {
* for (const prefix of segment.blobPrefixes) {
* console.log(`\tBlobPrefix: ${prefix.name}`);
* }
* }
* for (const blob of response.segment.blobItems) {
* console.log(`\tBlobItem: name - ${blob.name}`);
* }
* }
* ```
*
* Example using paging with a max page size:
*
* ```js
* console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
*
* let i = 1;
* for await (const response of containerClient
* .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" })
* .byPage({ maxPageSize: 2 })) {
* console.log(`Page ${i++}`);
* const segment = response.segment;
*
* if (segment.blobPrefixes) {
* for (const prefix of segment.blobPrefixes) {
* console.log(`\tBlobPrefix: ${prefix.name}`);
* }
* }
*
* for (const blob of response.segment.blobItems) {
* console.log(`\tBlobItem: name - ${blob.name}`);
* }
* }
* ```
*
* @param delimiter - The character or string used to define the virtual hierarchy
* @param options - Options to list blobs operation.
*/
listBlobsByHierarchy(delimiter, options = {}) {
if (delimiter === "") {
throw new RangeError("delimiter should contain one or more characters");
}
const include = [];
if (options.includeCopy) {
include.push("copy");
}
if (options.includeDeleted) {
include.push("deleted");
}
if (options.includeMetadata) {
include.push("metadata");
}
if (options.includeSnapshots) {
include.push("snapshots");
}
if (options.includeVersions) {
include.push("versions");
}
if (options.includeUncommitedBlobs) {
include.push("uncommittedblobs");
}
if (options.includeTags) {
include.push("tags");
}
if (options.includeDeletedWithVersions) {
include.push("deletedwithversions");
}
if (options.includeImmutabilityPolicy) {
include.push("immutabilitypolicy");
}
if (options.includeLegalHold) {
include.push("legalhold");
}
if (options.prefix === "") {
options.prefix = undefined;
}
const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));
// AsyncIterableIterator to iterate over blob prefixes and blobs
const iter = this.listItemsByHierarchy(delimiter, updatedOptions);
return {
/**
* The next method, part of the iteration protocol
*/
async next() {
return iter.next();
},
/**
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings = {}) => {
return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
},
};
}
/**
* The Filter Blobs operation enables callers to list blobs in the container whose tags
* match a given search expression.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to find blobs by tags.
*/
async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {
return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => {
const response = assertResponse(await this.containerContext.filterBlobs({
abortSignal: options.abortSignal,
where: tagFilterSqlExpression,
marker,
maxPageSize: options.maxPageSize,
tracingOptions: updatedOptions.tracingOptions,
}));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
var _a;
let tagValue = "";
if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
tagValue = blob.tags.blobTagSet[0].value;
}
return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
}) });
return wrappedResponse;
});
}
/**
* Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to find blobs by tags.
*/
findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) {
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker, options = {}) {
let response;
if (!!marker || marker === undefined) {
do {
response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));
response.blobs = response.blobs || [];
marker = response.continuationToken;
yield yield tslib.__await(response);
} while (marker);
}
});
}
/**
* Returns an AsyncIterableIterator for blobs.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param options - Options to findBlobsByTagsItems.
*/
findBlobsByTagsItems(tagFilterSqlExpression_1) {
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) {
var _a, e_3, _b, _c;
let marker;
try {
for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const segment = _c;
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
}
finally { if (e_3) throw e_3.error; }
}
});
}
/**
* Returns an async iterable iterator to find all blobs with specified tag
* under the specified container.
*
* .byPage() returns an async iterable iterator to list the blobs in pages.
*
* Example using `for await` syntax:
*
* ```js
* let i = 1;
* for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* ```
*
* Example using `iter.next()`:
*
* ```js
* let i = 1;
* const iter = containerClient.findBlobsByTags("tagkey='tagvalue'");
* let blobItem = await iter.next();
* while (!blobItem.done) {
* console.log(`Blob ${i++}: ${blobItem.value.name}`);
* blobItem = await iter.next();
* }
* ```
*
* Example using `byPage()`:
*
* ```js
* // passing optional maxPageSize in the page settings
* let i = 1;
* for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
* }
* ```
*
* Example using paging with a marker:
*
* ```js
* let i = 1;
* let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
* let response = (await iterator.next()).value;
*
* // Prints 2 blob names
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
*
* // Gets next marker
* let marker = response.continuationToken;
* // Passing next marker as continuationToken
* iterator = containerClient
* .findBlobsByTags("tagkey='tagvalue'")
* .byPage({ continuationToken: marker, maxPageSize: 10 });
* response = (await iterator.next()).value;
*
* // Prints blob names
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
* ```
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param options - Options to find blobs by tags.
*/
findBlobsByTags(tagFilterSqlExpression, options = {}) {
// AsyncIterableIterator to iterate over blobs
const listSegmentOptions = Object.assign({}, options);
const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
return {
/**
* The next method, part of the iteration protocol
*/
next() {
return iter.next();
},
/**
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings = {}) => {
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
},
};
}
/**
* The Get Account Information operation returns the sku name and account kind
* for the specified account.
* The Get Account Information operation is available on service versions beginning
* with version 2018-03-28.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information
*
* @param options - Options to the Service Get Account Info operation.
* @returns Response data for the Service Get Account Info operation.
*/
async getAccountInfo(options = {}) {
return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => {
return assertResponse(await this.containerContext.getAccountInfo({
abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
getContainerNameFromUrl() {
let containerName;
try {
// URL may look like the following
// "https://myaccount.blob.core.windows.net/mycontainer?sasString";
// "https://myaccount.blob.core.windows.net/mycontainer";
// IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername`
// http://localhost:10001/devstoreaccount1/containername
const parsedUrl = new URL(this.url);
if (parsedUrl.hostname.split(".")[1] === "blob") {
// "https://myaccount.blob.core.windows.net/containername".
// "https://customdomain.com/containername".
// .getPath() -> /containername
containerName = parsedUrl.pathname.split("/")[1];
}
else if (isIpEndpointStyle(parsedUrl)) {
// IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername
// Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername
// .getPath() -> /devstoreaccount1/containername
containerName = parsedUrl.pathname.split("/")[2];
}
else {
// "https://customdomain.com/containername".
// .getPath() -> /containername
containerName = parsedUrl.pathname.split("/")[1];
}
// decode the encoded containerName - to get all the special characters that might be present in it
containerName = decodeURIComponent(containerName);
if (!containerName) {
throw new Error("Provided containerName is invalid.");
}
return containerName;
}
catch (error) {
throw new Error("Unable to extract containerName with provided information.");
}
}
/**
* Only available for ContainerClient constructed with a shared key credential.
*
* Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties
* and parameters passed in. The SAS is signed by the shared key credential of the client.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
*
* @param options - Optional parameters.
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
generateSasUrl(options) {
return new Promise((resolve) => {
if (!(this.credential instanceof StorageSharedKeyCredential)) {
throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
}
const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString();
resolve(appendToURLQuery(this.url, sas));
});
}
/**
* Only available for ContainerClient constructed with a shared key credential.
*
* Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI
* based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
*
* @param options - Optional parameters.
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
generateSasStringToSign(options) {
if (!(this.credential instanceof StorageSharedKeyCredential)) {
throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
}
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign;
}
/**
* Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties
* and parameters passed in. The SAS is signed by the input user delegation key.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
*
* @param options - Optional parameters.
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
generateUserDelegationSasUrl(options, userDelegationKey) {
return new Promise((resolve) => {
const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).toString();
resolve(appendToURLQuery(this.url, sas));
});
}
/**
* Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI
* based on the client properties and parameters passed in. The SAS is signed by the input user delegation key.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
*
* @param options - Optional parameters.
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
generateUserDelegationSasStringToSign(options, userDelegationKey) {
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).stringToSign;
}
/**
* Creates a BlobBatchClient object to conduct batch operations.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch
*
* @returns A new BlobBatchClient object for this container.
*/
getBlobBatchClient() {
return new BlobBatchClient(this.url, this.pipeline);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value
* to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the
* values are set, this should be serialized with toString and set as the permissions field on an
* {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but
* the order of the permissions is particular and this class guarantees correctness.
*/
class AccountSASPermissions {
constructor() {
/**
* Permission to read resources and list queues and tables granted.
*/
this.read = false;
/**
* Permission to write resources granted.
*/
this.write = false;
/**
* Permission to delete blobs and files granted.
*/
this.delete = false;
/**
* Permission to delete versions granted.
*/
this.deleteVersion = false;
/**
* Permission to list blob containers, blobs, shares, directories, and files granted.
*/
this.list = false;
/**
* Permission to add messages, table entities, and append to blobs granted.
*/
this.add = false;
/**
* Permission to create blobs and files granted.
*/
this.create = false;
/**
* Permissions to update messages and table entities granted.
*/
this.update = false;
/**
* Permission to get and delete messages granted.
*/
this.process = false;
/**
* Specfies Tag access granted.
*/
this.tag = false;
/**
* Permission to filter blobs.
*/
this.filter = false;
/**
* Permission to set immutability policy.
*/
this.setImmutabilityPolicy = false;
/**
* Specifies that Permanent Delete is permitted.
*/
this.permanentDelete = false;
}
/**
* Parse initializes the AccountSASPermissions fields from a string.
*
* @param permissions -
*/
static parse(permissions) {
const accountSASPermissions = new AccountSASPermissions();
for (const c of permissions) {
switch (c) {
case "r":
accountSASPermissions.read = true;
break;
case "w":
accountSASPermissions.write = true;
break;
case "d":
accountSASPermissions.delete = true;
break;
case "x":
accountSASPermissions.deleteVersion = true;
break;
case "l":
accountSASPermissions.list = true;
break;
case "a":
accountSASPermissions.add = true;
break;
case "c":
accountSASPermissions.create = true;
break;
case "u":
accountSASPermissions.update = true;
break;
case "p":
accountSASPermissions.process = true;
break;
case "t":
accountSASPermissions.tag = true;
break;
case "f":
accountSASPermissions.filter = true;
break;
case "i":
accountSASPermissions.setImmutabilityPolicy = true;
break;
case "y":
accountSASPermissions.permanentDelete = true;
break;
default:
throw new RangeError(`Invalid permission character: ${c}`);
}
}
return accountSASPermissions;
}
/**
* Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it
* and boolean values for them.
*
* @param permissionLike -
*/
static from(permissionLike) {
const accountSASPermissions = new AccountSASPermissions();
if (permissionLike.read) {
accountSASPermissions.read = true;
}
if (permissionLike.write) {
accountSASPermissions.write = true;
}
if (permissionLike.delete) {
accountSASPermissions.delete = true;
}
if (permissionLike.deleteVersion) {
accountSASPermissions.deleteVersion = true;
}
if (permissionLike.filter) {
accountSASPermissions.filter = true;
}
if (permissionLike.tag) {
accountSASPermissions.tag = true;
}
if (permissionLike.list) {
accountSASPermissions.list = true;
}
if (permissionLike.add) {
accountSASPermissions.add = true;
}
if (permissionLike.create) {
accountSASPermissions.create = true;
}
if (permissionLike.update) {
accountSASPermissions.update = true;
}
if (permissionLike.process) {
accountSASPermissions.process = true;
}
if (permissionLike.setImmutabilityPolicy) {
accountSASPermissions.setImmutabilityPolicy = true;
}
if (permissionLike.permanentDelete) {
accountSASPermissions.permanentDelete = true;
}
return accountSASPermissions;
}
/**
* Produces the SAS permissions string for an Azure Storage account.
* Call this method to set AccountSASSignatureValues Permissions field.
*
* Using this method will guarantee the resource types are in
* an order accepted by the service.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
*
*/
toString() {
// The order of the characters should be as specified here to ensure correctness:
// https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
// Use a string array instead of string concatenating += operator for performance
const permissions = [];
if (this.read) {
permissions.push("r");
}
if (this.write) {
permissions.push("w");
}
if (this.delete) {
permissions.push("d");
}
if (this.deleteVersion) {
permissions.push("x");
}
if (this.filter) {
permissions.push("f");
}
if (this.tag) {
permissions.push("t");
}
if (this.list) {
permissions.push("l");
}
if (this.add) {
permissions.push("a");
}
if (this.create) {
permissions.push("c");
}
if (this.update) {
permissions.push("u");
}
if (this.process) {
permissions.push("p");
}
if (this.setImmutabilityPolicy) {
permissions.push("i");
}
if (this.permanentDelete) {
permissions.push("y");
}
return permissions.join("");
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value
* to true means that any SAS which uses these permissions will grant access to that resource type. Once all the
* values are set, this should be serialized with toString and set as the resources field on an
* {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but
* the order of the resources is particular and this class guarantees correctness.
*/
class AccountSASResourceTypes {
constructor() {
/**
* Permission to access service level APIs granted.
*/
this.service = false;
/**
* Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.
*/
this.container = false;
/**
* Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.
*/
this.object = false;
}
/**
* Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an
* Error if it encounters a character that does not correspond to a valid resource type.
*
* @param resourceTypes -
*/
static parse(resourceTypes) {
const accountSASResourceTypes = new AccountSASResourceTypes();
for (const c of resourceTypes) {
switch (c) {
case "s":
accountSASResourceTypes.service = true;
break;
case "c":
accountSASResourceTypes.container = true;
break;
case "o":
accountSASResourceTypes.object = true;
break;
default:
throw new RangeError(`Invalid resource type: ${c}`);
}
}
return accountSASResourceTypes;
}
/**
* Converts the given resource types to a string.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
*
*/
toString() {
const resourceTypes = [];
if (this.service) {
resourceTypes.push("s");
}
if (this.container) {
resourceTypes.push("c");
}
if (this.object) {
resourceTypes.push("o");
}
return resourceTypes.join("");
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value
* to true means that any SAS which uses these permissions will grant access to that service. Once all the
* values are set, this should be serialized with toString and set as the services field on an
* {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but
* the order of the services is particular and this class guarantees correctness.
*/
class AccountSASServices {
constructor() {
/**
* Permission to access blob resources granted.
*/
this.blob = false;
/**
* Permission to access file resources granted.
*/
this.file = false;
/**
* Permission to access queue resources granted.
*/
this.queue = false;
/**
* Permission to access table resources granted.
*/
this.table = false;
}
/**
* Creates an {@link AccountSASServices} from the specified services string. This method will throw an
* Error if it encounters a character that does not correspond to a valid service.
*
* @param services -
*/
static parse(services) {
const accountSASServices = new AccountSASServices();
for (const c of services) {
switch (c) {
case "b":
accountSASServices.blob = true;
break;
case "f":
accountSASServices.file = true;
break;
case "q":
accountSASServices.queue = true;
break;
case "t":
accountSASServices.table = true;
break;
default:
throw new RangeError(`Invalid service character: ${c}`);
}
}
return accountSASServices;
}
/**
* Converts the given services to a string.
*
*/
toString() {
const services = [];
if (this.blob) {
services.push("b");
}
if (this.table) {
services.push("t");
}
if (this.queue) {
services.push("q");
}
if (this.file) {
services.push("f");
}
return services.join("");
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual
* REST request.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
*
* @param accountSASSignatureValues -
* @param sharedKeyCredential -
*/
function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) {
return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential)
.sasQueryParameters;
}
function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) {
const version = accountSASSignatureValues.version
? accountSASSignatureValues.version
: SERVICE_VERSION;
if (accountSASSignatureValues.permissions &&
accountSASSignatureValues.permissions.setImmutabilityPolicy &&
version < "2020-08-04") {
throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");
}
if (accountSASSignatureValues.permissions &&
accountSASSignatureValues.permissions.deleteVersion &&
version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.");
}
if (accountSASSignatureValues.permissions &&
accountSASSignatureValues.permissions.permanentDelete &&
version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission.");
}
if (accountSASSignatureValues.permissions &&
accountSASSignatureValues.permissions.tag &&
version < "2019-12-12") {
throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission.");
}
if (accountSASSignatureValues.permissions &&
accountSASSignatureValues.permissions.filter &&
version < "2019-12-12") {
throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.");
}
if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") {
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
}
const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString());
const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();
const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString();
let stringToSign;
if (version >= "2020-12-06") {
stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "",
"", // Account SAS requires an additional newline character
].join("\n");
}
else {
stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
"", // Account SAS requires an additional newline character
].join("\n");
}
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return {
sasQueryParameters: new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope),
stringToSign: stringToSign,
};
}
/**
* A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you
* to manipulate blob containers.
*/
class BlobServiceClient extends StorageClient {
/**
*
* Creates an instance of BlobServiceClient from connection string.
*
* @param connectionString - Account connection string or a SAS connection string of an Azure storage account.
* [ Note - Account connection string can only be used in NODE.JS runtime. ]
* Account connection string example -
* `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
* SAS connection string example -
* `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param options - Optional. Options to configure the HTTP pipeline.
*/
static fromConnectionString(connectionString,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
options = options || {};
const extractedCreds = extractConnectionStringParts(connectionString);
if (extractedCreds.kind === "AccountConnString") {
if (coreUtil.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
if (!options.proxyOptions) {
options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri);
}
const pipeline = newPipeline(sharedKeyCredential, options);
return new BlobServiceClient(extractedCreds.url, pipeline);
}
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
}
else if (extractedCreds.kind === "SASConnString") {
const pipeline = newPipeline(new AnonymousCredential(), options);
return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline);
}
else {
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
}
}
constructor(url, credentialOrPipeline,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
let pipeline;
if (isPipelineLike(credentialOrPipeline)) {
pipeline = credentialOrPipeline;
}
else if ((coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
credentialOrPipeline instanceof AnonymousCredential ||
coreAuth.isTokenCredential(credentialOrPipeline)) {
pipeline = newPipeline(credentialOrPipeline, options);
}
else {
// The second parameter is undefined. Use anonymous credential
pipeline = newPipeline(new AnonymousCredential(), options);
}
super(url, pipeline);
this.serviceContext = this.storageClientContext.service;
}
/**
* Creates a {@link ContainerClient} object
*
* @param containerName - A container name
* @returns A new ContainerClient object for the given container name.
*
* Example usage:
*
* ```js
* const containerClient = blobServiceClient.getContainerClient("");
* ```
*/
getContainerClient(containerName) {
return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline);
}
/**
* Create a Blob container. @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container
*
* @param containerName - Name of the container to create.
* @param options - Options to configure Container Create operation.
* @returns Container creation response and the corresponding container client.
*/
async createContainer(containerName, options = {}) {
return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => {
const containerClient = this.getContainerClient(containerName);
const containerCreateResponse = await containerClient.create(updatedOptions);
return {
containerClient,
containerCreateResponse,
};
});
}
/**
* Deletes a Blob container.
*
* @param containerName - Name of the container to delete.
* @param options - Options to configure Container Delete operation.
* @returns Container deletion response.
*/
async deleteContainer(containerName, options = {}) {
return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => {
const containerClient = this.getContainerClient(containerName);
return containerClient.delete(updatedOptions);
});
}
/**
* Restore a previously deleted Blob container.
* This API is only functional if Container Soft Delete is enabled for the storage account associated with the container.
*
* @param deletedContainerName - Name of the previously deleted container.
* @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container.
* @param options - Options to configure Container Restore operation.
* @returns Container deletion response.
*/
async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) {
return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => {
const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName);
// Hack to access a protected member.
const containerContext = containerClient["storageClientContext"].container;
const containerUndeleteResponse = assertResponse(await containerContext.restore({
deletedContainerName,
deletedContainerVersion,
tracingOptions: updatedOptions.tracingOptions,
}));
return { containerClient, containerUndeleteResponse };
});
}
/**
* Rename an existing Blob Container.
*
* @param sourceContainerName - The name of the source container.
* @param destinationContainerName - The new name of the container.
* @param options - Options to configure Container Rename operation.
*/
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
// @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready.
async renameContainer(sourceContainerName, destinationContainerName, options = {}) {
return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => {
var _a;
const containerClient = this.getContainerClient(destinationContainerName);
// Hack to access a protected member.
const containerContext = containerClient["storageClientContext"].container;
const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId })));
return { containerClient, containerRenameResponse };
});
}
/**
* Gets the properties of a storage account’s Blob service, including properties
* for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties
*
* @param options - Options to the Service Get Properties operation.
* @returns Response data for the Service Get Properties operation.
*/
async getProperties(options = {}) {
return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => {
return assertResponse(await this.serviceContext.getProperties({
abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Sets properties for a storage account’s Blob service endpoint, including properties
* for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties
*
* @param properties -
* @param options - Options to the Service Set Properties operation.
* @returns Response data for the Service Set Properties operation.
*/
async setProperties(properties, options = {}) {
return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => {
return assertResponse(await this.serviceContext.setProperties(properties, {
abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Retrieves statistics related to replication for the Blob service. It is only
* available on the secondary location endpoint when read-access geo-redundant
* replication is enabled for the storage account.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats
*
* @param options - Options to the Service Get Statistics operation.
* @returns Response data for the Service Get Statistics operation.
*/
async getStatistics(options = {}) {
return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => {
return assertResponse(await this.serviceContext.getStatistics({
abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* The Get Account Information operation returns the sku name and account kind
* for the specified account.
* The Get Account Information operation is available on service versions beginning
* with version 2018-03-28.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information
*
* @param options - Options to the Service Get Account Info operation.
* @returns Response data for the Service Get Account Info operation.
*/
async getAccountInfo(options = {}) {
return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => {
return assertResponse(await this.serviceContext.getAccountInfo({
abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions,
}));
});
}
/**
* Returns a list of the containers under the specified account.
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2
*
* @param marker - A string value that identifies the portion of
* the list of containers to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all containers remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to the Service List Container Segment operation.
* @returns Response data for the Service List Container Segment operation.
*/
async listContainersSegment(marker, options = {}) {
return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => {
return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions })));
});
}
/**
* The Filter Blobs operation enables callers to list blobs across all containers whose tags
* match a given search expression. Filter blobs searches across all containers within a
* storage account but can be scoped within the expression to a single container.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to find blobs by tags.
*/
async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {
return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => {
const response = assertResponse(await this.serviceContext.filterBlobs({
abortSignal: options.abortSignal,
where: tagFilterSqlExpression,
marker,
maxPageSize: options.maxPageSize,
tracingOptions: updatedOptions.tracingOptions,
}));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
var _a;
let tagValue = "";
if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
tagValue = blob.tags.blobTagSet[0].value;
}
return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
}) });
return wrappedResponse;
});
}
/**
* Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to find blobs by tags.
*/
findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) {
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker, options = {}) {
let response;
if (!!marker || marker === undefined) {
do {
response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));
response.blobs = response.blobs || [];
marker = response.continuationToken;
yield yield tslib.__await(response);
} while (marker);
}
});
}
/**
* Returns an AsyncIterableIterator for blobs.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param options - Options to findBlobsByTagsItems.
*/
findBlobsByTagsItems(tagFilterSqlExpression_1) {
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) {
var _a, e_1, _b, _c;
let marker;
try {
for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const segment = _c;
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
}
finally { if (e_1) throw e_1.error; }
}
});
}
/**
* Returns an async iterable iterator to find all blobs with specified tag
* under the specified account.
*
* .byPage() returns an async iterable iterator to list the blobs in pages.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties
*
* Example using `for await` syntax:
*
* ```js
* let i = 1;
* for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) {
* console.log(`Blob ${i++}: ${container.name}`);
* }
* ```
*
* Example using `iter.next()`:
*
* ```js
* let i = 1;
* const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'");
* let blobItem = await iter.next();
* while (!blobItem.done) {
* console.log(`Blob ${i++}: ${blobItem.value.name}`);
* blobItem = await iter.next();
* }
* ```
*
* Example using `byPage()`:
*
* ```js
* // passing optional maxPageSize in the page settings
* let i = 1;
* for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
* }
* ```
*
* Example using paging with a marker:
*
* ```js
* let i = 1;
* let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
* let response = (await iterator.next()).value;
*
* // Prints 2 blob names
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
*
* // Gets next marker
* let marker = response.continuationToken;
* // Passing next marker as continuationToken
* iterator = blobServiceClient
* .findBlobsByTags("tagkey='tagvalue'")
* .byPage({ continuationToken: marker, maxPageSize: 10 });
* response = (await iterator.next()).value;
*
* // Prints blob names
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
* ```
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param options - Options to find blobs by tags.
*/
findBlobsByTags(tagFilterSqlExpression, options = {}) {
// AsyncIterableIterator to iterate over blobs
const listSegmentOptions = Object.assign({}, options);
const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
return {
/**
* The next method, part of the iteration protocol
*/
next() {
return iter.next();
},
/**
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings = {}) => {
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
},
};
}
/**
* Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses
*
* @param marker - A string value that identifies the portion of
* the list of containers to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all containers remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to list containers operation.
*/
listSegments(marker_1) {
return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker, options = {}) {
let listContainersSegmentResponse;
if (!!marker || marker === undefined) {
do {
listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker, options));
listContainersSegmentResponse.containerItems =
listContainersSegmentResponse.containerItems || [];
marker = listContainersSegmentResponse.continuationToken;
yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse));
} while (marker);
}
});
}
/**
* Returns an AsyncIterableIterator for Container Items
*
* @param options - Options to list containers operation.
*/
listItems() {
return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) {
var _a, e_2, _b, _c;
let marker;
try {
for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const segment = _c;
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems)));
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
}
finally { if (e_2) throw e_2.error; }
}
});
}
/**
* Returns an async iterable iterator to list all the containers
* under the specified account.
*
* .byPage() returns an async iterable iterator to list the containers in pages.
*
* Example using `for await` syntax:
*
* ```js
* let i = 1;
* for await (const container of blobServiceClient.listContainers()) {
* console.log(`Container ${i++}: ${container.name}`);
* }
* ```
*
* Example using `iter.next()`:
*
* ```js
* let i = 1;
* const iter = blobServiceClient.listContainers();
* let containerItem = await iter.next();
* while (!containerItem.done) {
* console.log(`Container ${i++}: ${containerItem.value.name}`);
* containerItem = await iter.next();
* }
* ```
*
* Example using `byPage()`:
*
* ```js
* // passing optional maxPageSize in the page settings
* let i = 1;
* for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {
* if (response.containerItems) {
* for (const container of response.containerItems) {
* console.log(`Container ${i++}: ${container.name}`);
* }
* }
* }
* ```
*
* Example using paging with a marker:
*
* ```js
* let i = 1;
* let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });
* let response = (await iterator.next()).value;
*
* // Prints 2 container names
* if (response.containerItems) {
* for (const container of response.containerItems) {
* console.log(`Container ${i++}: ${container.name}`);
* }
* }
*
* // Gets next marker
* let marker = response.continuationToken;
* // Passing next marker as continuationToken
* iterator = blobServiceClient
* .listContainers()
* .byPage({ continuationToken: marker, maxPageSize: 10 });
* response = (await iterator.next()).value;
*
* // Prints 10 container names
* if (response.containerItems) {
* for (const container of response.containerItems) {
* console.log(`Container ${i++}: ${container.name}`);
* }
* }
* ```
*
* @param options - Options to list containers.
* @returns An asyncIterableIterator that supports paging.
*/
listContainers(options = {}) {
if (options.prefix === "") {
options.prefix = undefined;
}
const include = [];
if (options.includeDeleted) {
include.push("deleted");
}
if (options.includeMetadata) {
include.push("metadata");
}
if (options.includeSystem) {
include.push("system");
}
// AsyncIterableIterator to iterate over containers
const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));
const iter = this.listItems(listSegmentOptions);
return {
/**
* The next method, part of the iteration protocol
*/
next() {
return iter.next();
},
/**
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings = {}) => {
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
},
};
}
/**
* ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).
*
* Retrieves a user delegation key for the Blob service. This is only a valid operation when using
* bearer token authentication.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key
*
* @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time
* @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time
*/
async getUserDelegationKey(startsOn, expiresOn, options = {}) {
return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => {
const response = assertResponse(await this.serviceContext.getUserDelegationKey({
startsOn: truncatedISO8061Date(startsOn, false),
expiresOn: truncatedISO8061Date(expiresOn, false),
}, {
abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions,
}));
const userDelegationKey = {
signedObjectId: response.signedObjectId,
signedTenantId: response.signedTenantId,
signedStartsOn: new Date(response.signedStartsOn),
signedExpiresOn: new Date(response.signedExpiresOn),
signedService: response.signedService,
signedVersion: response.signedVersion,
value: response.value,
};
const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
return res;
});
}
/**
* Creates a BlobBatchClient object to conduct batch operations.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch
*
* @returns A new BlobBatchClient object for this service.
*/
getBlobBatchClient() {
return new BlobBatchClient(this.url, this.pipeline);
}
/**
* Only available for BlobServiceClient constructed with a shared key credential.
*
* Generates a Blob account Shared Access Signature (SAS) URI based on the client properties
* and parameters passed in. The SAS is signed by the shared key credential of the client.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas
*
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.
* @param permissions - Specifies the list of permissions to be associated with the SAS.
* @param resourceTypes - Specifies the resource types associated with the shared access signature.
* @param options - Optional parameters.
* @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) {
if (!(this.credential instanceof StorageSharedKeyCredential)) {
throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
}
if (expiresOn === undefined) {
const now = new Date();
expiresOn = new Date(now.getTime() + 3600 * 1000);
}
const sas = generateAccountSASQueryParameters(Object.assign({ permissions,
expiresOn,
resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).toString();
return appendToURLQuery(this.url, sas);
}
/**
* Only available for BlobServiceClient constructed with a shared key credential.
*
* Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on
* the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.
*
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas
*
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.
* @param permissions - Specifies the list of permissions to be associated with the SAS.
* @param resourceTypes - Specifies the resource types associated with the shared access signature.
* @param options - Optional parameters.
* @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
*/
generateSasStringToSign(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) {
if (!(this.credential instanceof StorageSharedKeyCredential)) {
throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
}
if (expiresOn === undefined) {
const now = new Date();
expiresOn = new Date(now.getTime() + 3600 * 1000);
}
return generateAccountSASQueryParametersInternal(Object.assign({ permissions,
expiresOn,
resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).stringToSign;
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
exports.KnownEncryptionAlgorithmType = void 0;
(function (KnownEncryptionAlgorithmType) {
KnownEncryptionAlgorithmType["AES256"] = "AES256";
})(exports.KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = {}));
Object.defineProperty(exports, "RestError", ({
enumerable: true,
get: function () { return coreRestPipeline.RestError; }
}));
exports.AccountSASPermissions = AccountSASPermissions;
exports.AccountSASResourceTypes = AccountSASResourceTypes;
exports.AccountSASServices = AccountSASServices;
exports.AnonymousCredential = AnonymousCredential;
exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy;
exports.AppendBlobClient = AppendBlobClient;
exports.BaseRequestPolicy = BaseRequestPolicy;
exports.BlobBatch = BlobBatch;
exports.BlobBatchClient = BlobBatchClient;
exports.BlobClient = BlobClient;
exports.BlobLeaseClient = BlobLeaseClient;
exports.BlobSASPermissions = BlobSASPermissions;
exports.BlobServiceClient = BlobServiceClient;
exports.BlockBlobClient = BlockBlobClient;
exports.ContainerClient = ContainerClient;
exports.ContainerSASPermissions = ContainerSASPermissions;
exports.Credential = Credential;
exports.CredentialPolicy = CredentialPolicy;
exports.PageBlobClient = PageBlobClient;
exports.Pipeline = Pipeline;
exports.SASQueryParameters = SASQueryParameters;
exports.StorageBrowserPolicy = StorageBrowserPolicy;
exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory;
exports.StorageOAuthScopes = StorageOAuthScopes;
exports.StorageRetryPolicy = StorageRetryPolicy;
exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory;
exports.StorageSharedKeyCredential = StorageSharedKeyCredential;
exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy;
exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters;
exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters;
exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience;
exports.isPipelineLike = isPipelineLike;
exports.logger = logger;
exports.newPipeline = newPipeline;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 56664:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(67551);
tslib_1.__exportStar(__nccwpck_require__(37233), exports);
//# sourceMappingURL=api.js.map
/***/ }),
/***/ 48698:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Attach = void 0;
const querystring = __nccwpck_require__(63477);
const terminal_size_queue_1 = __nccwpck_require__(76023);
const web_socket_handler_1 = __nccwpck_require__(47581);
class Attach {
constructor(config, websocketInterface) {
this.handler = websocketInterface || new web_socket_handler_1.WebSocketHandler(config);
}
async attach(namespace, podName, containerName, stdout, stderr, stdin, tty) {
const query = {
container: containerName,
stderr: stderr != null,
stdin: stdin != null,
stdout: stdout != null,
tty,
};
const queryStr = querystring.stringify(query);
const path = `/api/v1/namespaces/${namespace}/pods/${podName}/attach?${queryStr}`;
const conn = await this.handler.connect(path, null, (streamNum, buff) => {
web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr);
return true;
});
if (stdin != null) {
web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream);
}
if (terminal_size_queue_1.isResizable(stdout)) {
this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue();
web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream);
this.terminalSizeQueue.handleResizes(stdout);
}
return conn;
}
}
exports.Attach = Attach;
//# sourceMappingURL=attach.js.map
/***/ }),
/***/ 83237:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AzureAuth = void 0;
const tslib_1 = __nccwpck_require__(67551);
const proc = tslib_1.__importStar(__nccwpck_require__(32081));
const jsonpath = tslib_1.__importStar(__nccwpck_require__(63269));
class AzureAuth {
isAuthProvider(user) {
if (!user || !user.authProvider) {
return false;
}
return user.authProvider.name === 'azure';
}
async applyAuthentication(user, opts) {
const token = this.getToken(user);
if (token) {
opts.headers.Authorization = `Bearer ${token}`;
}
}
getToken(user) {
const config = user.authProvider.config;
if (this.isExpired(config)) {
this.updateAccessToken(config);
}
return config['access-token'];
}
isExpired(config) {
const token = config['access-token'];
const expiry = config.expiry;
const expiresOn = config['expires-on'];
if (!token) {
return true;
}
if (!expiry && !expiresOn) {
return false;
}
const expiresOnDate = expiresOn ? new Date(parseInt(expiresOn, 10) * 1000) : undefined;
const expiration = expiry ? Date.parse(expiry) : expiresOnDate;
if (expiration < Date.now()) {
return true;
}
return false;
}
updateAccessToken(config) {
let cmd = config['cmd-path'];
if (!cmd) {
throw new Error('Token is expired!');
}
// Wrap cmd in quotes to make it cope with spaces in path
cmd = `"${cmd}"`;
const args = config['cmd-args'];
if (args) {
cmd = cmd + ' ' + args;
}
// TODO: Cache to file?
// TODO: do this asynchronously
let output;
try {
output = proc.execSync(cmd);
}
catch (err) {
throw new Error('Failed to refresh token: ' + err.message);
}
const resultObj = JSON.parse(output);
const tokenPathKeyInConfig = config['token-key'];
const expiryPathKeyInConfig = config['expiry-key'];
// Format in file is {}, so slice it out and add '$'
const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1);
const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1);
config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj);
config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj);
}
}
exports.AzureAuth = AzureAuth;
//# sourceMappingURL=azure_auth.js.map
/***/ }),
/***/ 5434:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.deleteObject = exports.addOrUpdateObject = exports.deleteItems = exports.ListWatch = void 0;
const api_1 = __nccwpck_require__(56664);
const informer_1 = __nccwpck_require__(88029);
class ListWatch {
constructor(path, watch, listFn, autoStart = true, labelSelector) {
this.path = path;
this.watch = watch;
this.listFn = listFn;
this.labelSelector = labelSelector;
this.objects = [];
this.indexCache = {};
this.callbackCache = {};
this.stopped = false;
this.callbackCache[informer_1.ADD] = [];
this.callbackCache[informer_1.UPDATE] = [];
this.callbackCache[informer_1.DELETE] = [];
this.callbackCache[informer_1.ERROR] = [];
this.callbackCache[informer_1.CONNECT] = [];
this.resourceVersion = '';
if (autoStart) {
this.doneHandler(null);
}
}
async start() {
this.stopped = false;
await this.doneHandler(null);
}
async stop() {
this.stopped = true;
this._stop();
}
on(verb, cb) {
if (verb === informer_1.CHANGE) {
this.on('add', cb);
this.on('update', cb);
this.on('delete', cb);
return;
}
if (this.callbackCache[verb] === undefined) {
throw new Error(`Unknown verb: ${verb}`);
}
this.callbackCache[verb].push(cb);
}
off(verb, cb) {
if (verb === informer_1.CHANGE) {
this.off('add', cb);
this.off('update', cb);
this.off('delete', cb);
return;
}
if (this.callbackCache[verb] === undefined) {
throw new Error(`Unknown verb: ${verb}`);
}
const indexToRemove = this.callbackCache[verb].findIndex((cachedCb) => cachedCb === cb);
if (indexToRemove === -1) {
return;
}
this.callbackCache[verb].splice(indexToRemove, 1);
}
get(name, namespace) {
return this.objects.find((obj) => {
return obj.metadata.name === name && (!namespace || obj.metadata.namespace === namespace);
});
}
list(namespace) {
if (!namespace) {
return this.objects;
}
return this.indexCache[namespace];
}
latestResourceVersion() {
return this.resourceVersion;
}
_stop() {
if (this.request) {
this.request.abort();
this.request = undefined;
}
}
async doneHandler(err) {
this._stop();
if (err && err.statusCode === 410) {
this.resourceVersion = '';
}
else if (err) {
this.callbackCache[informer_1.ERROR].forEach((elt) => elt(err));
return;
}
if (this.stopped) {
// do not auto-restart
return;
}
this.callbackCache[informer_1.CONNECT].forEach((elt) => elt(undefined));
if (!this.resourceVersion) {
const promise = this.listFn();
const result = await promise;
const list = result.body;
this.objects = deleteItems(this.objects, list.items, this.callbackCache[informer_1.DELETE].slice());
Object.keys(this.indexCache).forEach((key) => {
const updateObjects = deleteItems(this.indexCache[key], list.items);
if (updateObjects.length !== 0) {
this.indexCache[key] = updateObjects;
}
else {
delete this.indexCache[key];
}
});
this.addOrUpdateItems(list.items);
this.resourceVersion = list.metadata.resourceVersion;
}
const queryParams = {
resourceVersion: this.resourceVersion,
};
if (this.labelSelector !== undefined) {
queryParams.labelSelector = api_1.ObjectSerializer.serialize(this.labelSelector, 'string');
}
this.request = await this.watch.watch(this.path, queryParams, this.watchHandler.bind(this), this.doneHandler.bind(this));
}
addOrUpdateItems(items) {
items.forEach((obj) => {
addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice());
if (obj.metadata.namespace) {
this.indexObj(obj);
}
});
}
indexObj(obj) {
let namespaceList = this.indexCache[obj.metadata.namespace];
if (!namespaceList) {
namespaceList = [];
this.indexCache[obj.metadata.namespace] = namespaceList;
}
addOrUpdateObject(namespaceList, obj);
}
watchHandler(phase, obj, watchObj) {
switch (phase) {
case 'ADDED':
case 'MODIFIED':
addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice());
if (obj.metadata.namespace) {
this.indexObj(obj);
}
break;
case 'DELETED':
deleteObject(this.objects, obj, this.callbackCache[informer_1.DELETE].slice());
if (obj.metadata.namespace) {
const namespaceList = this.indexCache[obj.metadata.namespace];
if (namespaceList) {
deleteObject(namespaceList, obj);
}
}
break;
case 'BOOKMARK':
// nothing to do, here for documentation, mostly.
break;
}
if (watchObj && watchObj.metadata) {
this.resourceVersion = watchObj.metadata.resourceVersion;
}
}
}
exports.ListWatch = ListWatch;
// external for testing
function deleteItems(oldObjects, newObjects, deleteCallback) {
return oldObjects.filter((obj) => {
if (findKubernetesObject(newObjects, obj) === -1) {
if (deleteCallback) {
deleteCallback.forEach((fn) => fn(obj));
}
return false;
}
return true;
});
}
exports.deleteItems = deleteItems;
// Only public for testing.
function addOrUpdateObject(objects, obj, addCallback, updateCallback) {
const ix = findKubernetesObject(objects, obj);
if (ix === -1) {
objects.push(obj);
if (addCallback) {
addCallback.forEach((elt) => elt(obj));
}
}
else {
if (!isSameVersion(objects[ix], obj)) {
objects[ix] = obj;
if (updateCallback) {
updateCallback.forEach((elt) => elt(obj));
}
}
}
}
exports.addOrUpdateObject = addOrUpdateObject;
function isSameObject(o1, o2) {
return o1.metadata.name === o2.metadata.name && o1.metadata.namespace === o2.metadata.namespace;
}
function isSameVersion(o1, o2) {
return (o1.metadata.resourceVersion !== undefined &&
o1.metadata.resourceVersion !== null &&
o1.metadata.resourceVersion === o2.metadata.resourceVersion);
}
function findKubernetesObject(objects, obj) {
return objects.findIndex((elt) => {
return isSameObject(elt, obj);
});
}
// Public for testing.
function deleteObject(objects, obj, deleteCallback) {
const ix = findKubernetesObject(objects, obj);
if (ix !== -1) {
objects.splice(ix, 1);
if (deleteCallback) {
deleteCallback.forEach((elt) => elt(obj));
}
}
}
exports.deleteObject = deleteObject;
//# sourceMappingURL=cache.js.map
/***/ }),
/***/ 14958:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.findObject = exports.findHomeDir = exports.bufferFromFileOrString = exports.makeAbsolutePath = exports.Config = exports.KubeConfig = void 0;
const tslib_1 = __nccwpck_require__(67551);
const execa = __nccwpck_require__(56754);
const fs = __nccwpck_require__(57147);
const yaml = __nccwpck_require__(21917);
const net = __nccwpck_require__(41808);
const path = __nccwpck_require__(71017);
const shelljs = __nccwpck_require__(33516);
const api = tslib_1.__importStar(__nccwpck_require__(56664));
const azure_auth_1 = __nccwpck_require__(83237);
const config_types_1 = __nccwpck_require__(86218);
const exec_auth_1 = __nccwpck_require__(18325);
const file_auth_1 = __nccwpck_require__(38572);
const gcp_auth_1 = __nccwpck_require__(94064);
const oidc_auth_1 = __nccwpck_require__(41691);
// fs.existsSync was removed in node 10
function fileExists(filepath) {
try {
fs.accessSync(filepath);
return true;
}
catch (ignore) {
return false;
}
}
class KubeConfig {
constructor() {
this.contexts = [];
this.clusters = [];
this.users = [];
}
getContexts() {
return this.contexts;
}
getClusters() {
return this.clusters;
}
getUsers() {
return this.users;
}
getCurrentContext() {
return this.currentContext;
}
setCurrentContext(context) {
this.currentContext = context;
}
getContextObject(name) {
if (!this.contexts) {
return null;
}
return findObject(this.contexts, name, 'context');
}
getCurrentCluster() {
const context = this.getCurrentContextObject();
if (!context) {
return null;
}
return this.getCluster(context.cluster);
}
getCluster(name) {
return findObject(this.clusters, name, 'cluster');
}
getCurrentUser() {
const ctx = this.getCurrentContextObject();
if (!ctx) {
return null;
}
return this.getUser(ctx.user);
}
getUser(name) {
return findObject(this.users, name, 'user');
}
loadFromFile(file, opts) {
const rootDirectory = path.dirname(file);
this.loadFromString(fs.readFileSync(file, 'utf8'), opts);
this.makePathsAbsolute(rootDirectory);
}
async applytoHTTPSOptions(opts) {
const user = this.getCurrentUser();
await this.applyOptions(opts);
if (user && user.username) {
opts.auth = `${user.username}:${user.password}`;
}
}
async applyToRequest(opts) {
const cluster = this.getCurrentCluster();
const user = this.getCurrentUser();
await this.applyOptions(opts);
if (cluster && cluster.skipTLSVerify) {
opts.strictSSL = false;
}
if (user && user.username) {
opts.auth = {
password: user.password,
username: user.username,
};
}
}
loadFromString(config, opts) {
const obj = yaml.load(config);
this.clusters = config_types_1.newClusters(obj.clusters, opts);
this.contexts = config_types_1.newContexts(obj.contexts, opts);
this.users = config_types_1.newUsers(obj.users, opts);
this.currentContext = obj['current-context'];
}
loadFromOptions(options) {
this.clusters = options.clusters;
this.contexts = options.contexts;
this.users = options.users;
this.currentContext = options.currentContext;
}
loadFromClusterAndUser(cluster, user) {
this.clusters = [cluster];
this.users = [user];
this.currentContext = 'loaded-context';
this.contexts = [
{
cluster: cluster.name,
user: user.name,
name: this.currentContext,
},
];
}
loadFromCluster(pathPrefix = '') {
const host = process.env.KUBERNETES_SERVICE_HOST;
const port = process.env.KUBERNETES_SERVICE_PORT;
const clusterName = 'inCluster';
const userName = 'inClusterUser';
const contextName = 'inClusterContext';
let scheme = 'https';
if (port === '80' || port === '8080' || port === '8001') {
scheme = 'http';
}
// Wrap raw IPv6 addresses in brackets.
let serverHost = host;
if (host && net.isIPv6(host)) {
serverHost = `[${host}]`;
}
this.clusters = [
{
name: clusterName,
caFile: `${pathPrefix}${Config.SERVICEACCOUNT_CA_PATH}`,
server: `${scheme}://${serverHost}:${port}`,
skipTLSVerify: false,
},
];
this.users = [
{
name: userName,
authProvider: {
name: 'tokenFile',
config: {
tokenFile: `${pathPrefix}${Config.SERVICEACCOUNT_TOKEN_PATH}`,
},
},
},
];
const namespaceFile = `${pathPrefix}${Config.SERVICEACCOUNT_NAMESPACE_PATH}`;
let namespace;
if (fileExists(namespaceFile)) {
namespace = fs.readFileSync(namespaceFile, 'utf8');
}
this.contexts = [
{
cluster: clusterName,
name: contextName,
user: userName,
namespace,
},
];
this.currentContext = contextName;
}
mergeConfig(config, preserveContext = false) {
if (!preserveContext) {
this.currentContext = config.currentContext;
}
config.clusters.forEach((cluster) => {
this.addCluster(cluster);
});
config.users.forEach((user) => {
this.addUser(user);
});
config.contexts.forEach((ctx) => {
this.addContext(ctx);
});
}
addCluster(cluster) {
if (!this.clusters) {
this.clusters = [];
}
this.clusters.forEach((c, ix) => {
if (c.name === cluster.name) {
throw new Error(`Duplicate cluster: ${c.name}`);
}
});
this.clusters.push(cluster);
}
addUser(user) {
if (!this.users) {
this.users = [];
}
this.users.forEach((c, ix) => {
if (c.name === user.name) {
throw new Error(`Duplicate user: ${c.name}`);
}
});
this.users.push(user);
}
addContext(ctx) {
if (!this.contexts) {
this.contexts = [];
}
this.contexts.forEach((c, ix) => {
if (c.name === ctx.name) {
throw new Error(`Duplicate context: ${c.name}`);
}
});
this.contexts.push(ctx);
}
loadFromDefault(opts, contextFromStartingConfig = false) {
if (process.env.KUBECONFIG && process.env.KUBECONFIG.length > 0) {
const files = process.env.KUBECONFIG.split(path.delimiter).filter((filename) => filename);
this.loadFromFile(files[0], opts);
for (let i = 1; i < files.length; i++) {
const kc = new KubeConfig();
kc.loadFromFile(files[i], opts);
this.mergeConfig(kc, contextFromStartingConfig);
}
return;
}
const home = findHomeDir();
if (home) {
const config = path.join(home, '.kube', 'config');
if (fileExists(config)) {
this.loadFromFile(config, opts);
return;
}
}
if (process.platform === 'win32' && shelljs.which('wsl.exe')) {
try {
const envKubeconfigPathResult = execa.sync('wsl.exe', ['bash', '-ic', 'printenv KUBECONFIG']);
if (envKubeconfigPathResult.exitCode === 0 && envKubeconfigPathResult.stdout.length > 0) {
const result = execa.sync('wsl.exe', ['cat', envKubeconfigPathResult.stdout]);
if (result.exitCode === 0) {
this.loadFromString(result.stdout, opts);
return;
}
if (result.exitCode === 0) {
this.loadFromString(result.stdout, opts);
return;
}
}
}
catch (err) {
// Falling back to default kubeconfig
}
try {
const result = execa.sync('wsl.exe', ['cat', '~/.kube/config']);
if (result.exitCode === 0) {
this.loadFromString(result.stdout, opts);
return;
}
}
catch (err) {
// Falling back to alternative auth
}
}
if (fileExists(Config.SERVICEACCOUNT_TOKEN_PATH)) {
this.loadFromCluster();
return;
}
this.loadFromClusterAndUser({ name: 'cluster', server: 'http://localhost:8080' }, { name: 'user' });
}
makeApiClient(apiClientType) {
const cluster = this.getCurrentCluster();
if (!cluster) {
throw new Error('No active cluster!');
}
const apiClient = new apiClientType(cluster.server);
apiClient.setDefaultAuthentication(this);
return apiClient;
}
makePathsAbsolute(rootDirectory) {
this.clusters.forEach((cluster) => {
if (cluster.caFile) {
cluster.caFile = makeAbsolutePath(rootDirectory, cluster.caFile);
}
});
this.users.forEach((user) => {
if (user.certFile) {
user.certFile = makeAbsolutePath(rootDirectory, user.certFile);
}
if (user.keyFile) {
user.keyFile = makeAbsolutePath(rootDirectory, user.keyFile);
}
});
}
exportConfig() {
const configObj = {
apiVersion: 'v1',
kind: 'Config',
clusters: this.clusters.map(config_types_1.exportCluster),
users: this.users.map(config_types_1.exportUser),
contexts: this.contexts.map(config_types_1.exportContext),
preferences: {},
'current-context': this.getCurrentContext(),
};
return JSON.stringify(configObj);
}
getCurrentContextObject() {
return this.getContextObject(this.currentContext);
}
applyHTTPSOptions(opts) {
const cluster = this.getCurrentCluster();
const user = this.getCurrentUser();
if (!user) {
return;
}
if (cluster != null && cluster.skipTLSVerify) {
opts.rejectUnauthorized = false;
}
const ca = cluster != null ? bufferFromFileOrString(cluster.caFile, cluster.caData) : null;
if (ca) {
opts.ca = ca;
}
const cert = bufferFromFileOrString(user.certFile, user.certData);
if (cert) {
opts.cert = cert;
}
const key = bufferFromFileOrString(user.keyFile, user.keyData);
if (key) {
opts.key = key;
}
}
async applyAuthorizationHeader(opts) {
const user = this.getCurrentUser();
if (!user) {
return;
}
const authenticator = KubeConfig.authenticators.find((elt) => {
return elt.isAuthProvider(user);
});
if (!opts.headers) {
opts.headers = {};
}
if (authenticator) {
await authenticator.applyAuthentication(user, opts);
}
if (user.token) {
opts.headers.Authorization = `Bearer ${user.token}`;
}
}
async applyOptions(opts) {
this.applyHTTPSOptions(opts);
await this.applyAuthorizationHeader(opts);
}
}
exports.KubeConfig = KubeConfig;
KubeConfig.authenticators = [
new azure_auth_1.AzureAuth(),
new gcp_auth_1.GoogleCloudPlatformAuth(),
new exec_auth_1.ExecAuth(),
new file_auth_1.FileAuth(),
new oidc_auth_1.OpenIDConnectAuth(),
];
// This class is deprecated and will eventually be removed.
class Config {
static fromFile(filename) {
return Config.apiFromFile(filename, api.CoreV1Api);
}
static fromCluster() {
return Config.apiFromCluster(api.CoreV1Api);
}
static defaultClient() {
return Config.apiFromDefaultClient(api.CoreV1Api);
}
static apiFromFile(filename, apiClientType) {
const kc = new KubeConfig();
kc.loadFromFile(filename);
return kc.makeApiClient(apiClientType);
}
static apiFromCluster(apiClientType) {
const kc = new KubeConfig();
kc.loadFromCluster();
const cluster = kc.getCurrentCluster();
if (!cluster) {
throw new Error('No active cluster!');
}
const k8sApi = new apiClientType(cluster.server);
k8sApi.setDefaultAuthentication(kc);
return k8sApi;
}
static apiFromDefaultClient(apiClientType) {
const kc = new KubeConfig();
kc.loadFromDefault();
return kc.makeApiClient(apiClientType);
}
}
exports.Config = Config;
Config.SERVICEACCOUNT_ROOT = '/var/run/secrets/kubernetes.io/serviceaccount';
Config.SERVICEACCOUNT_CA_PATH = Config.SERVICEACCOUNT_ROOT + '/ca.crt';
Config.SERVICEACCOUNT_TOKEN_PATH = Config.SERVICEACCOUNT_ROOT + '/token';
Config.SERVICEACCOUNT_NAMESPACE_PATH = Config.SERVICEACCOUNT_ROOT + '/namespace';
function makeAbsolutePath(root, file) {
if (!root || path.isAbsolute(file)) {
return file;
}
return path.join(root, file);
}
exports.makeAbsolutePath = makeAbsolutePath;
// This is public really only for testing.
function bufferFromFileOrString(file, data) {
if (file) {
return fs.readFileSync(file);
}
if (data) {
return Buffer.from(data, 'base64');
}
return null;
}
exports.bufferFromFileOrString = bufferFromFileOrString;
function dropDuplicatesAndNils(a) {
return a.reduce((acceptedValues, currentValue) => {
// Good-enough algorithm for reducing a small (3 items at this point) array into an ordered list
// of unique non-empty strings.
if (currentValue && !acceptedValues.includes(currentValue)) {
return acceptedValues.concat(currentValue);
}
else {
return acceptedValues;
}
}, []);
}
// Only public for testing.
function findHomeDir() {
if (process.platform !== 'win32') {
if (process.env.HOME) {
try {
fs.accessSync(process.env.HOME);
return process.env.HOME;
// tslint:disable-next-line:no-empty
}
catch (ignore) { }
}
return null;
}
// $HOME is always favoured, but the k8s go-client prefers the other two env vars
// differently depending on whether .kube/config exists or not.
const homeDrivePath = process.env.HOMEDRIVE && process.env.HOMEPATH
? path.join(process.env.HOMEDRIVE, process.env.HOMEPATH)
: '';
const homePath = process.env.HOME || '';
const userProfile = process.env.USERPROFILE || '';
const favourHomeDrivePathList = dropDuplicatesAndNils([homePath, homeDrivePath, userProfile]);
const favourUserProfileList = dropDuplicatesAndNils([homePath, userProfile, homeDrivePath]);
// 1. the first of %HOME%, %HOMEDRIVE%%HOMEPATH%, %USERPROFILE% containing a `.kube\config` file is returned.
for (const dir of favourHomeDrivePathList) {
try {
fs.accessSync(path.join(dir, '.kube', 'config'));
return dir;
// tslint:disable-next-line:no-empty
}
catch (ignore) { }
}
// 2. ...the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists and is writeable is returned
for (const dir of favourUserProfileList) {
try {
fs.accessSync(dir, fs.constants.W_OK);
return dir;
// tslint:disable-next-line:no-empty
}
catch (ignore) { }
}
// 3. ...the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists is returned.
for (const dir of favourUserProfileList) {
try {
fs.accessSync(dir);
return dir;
// tslint:disable-next-line:no-empty
}
catch (ignore) { }
}
// 4. if none of those locations exists, the first of
// %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that is set is returned.
return favourUserProfileList[0] || null;
}
exports.findHomeDir = findHomeDir;
// Only really public for testing...
function findObject(list, name, key) {
if (!list) {
return null;
}
for (const obj of list) {
if (obj.name === name) {
if (obj[key]) {
obj[key].name = name;
return obj[key];
}
return obj;
}
}
return null;
}
exports.findObject = findObject;
//# sourceMappingURL=config.js.map
/***/ }),
/***/ 86218:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.exportContext = exports.newContexts = exports.exportUser = exports.newUsers = exports.exportCluster = exports.newClusters = exports.ActionOnInvalid = void 0;
const tslib_1 = __nccwpck_require__(67551);
const fs = tslib_1.__importStar(__nccwpck_require__(57147));
const _ = tslib_1.__importStar(__nccwpck_require__(15067));
var ActionOnInvalid;
(function (ActionOnInvalid) {
ActionOnInvalid["THROW"] = "throw";
ActionOnInvalid["FILTER"] = "filter";
})(ActionOnInvalid = exports.ActionOnInvalid || (exports.ActionOnInvalid = {}));
function defaultNewConfigOptions() {
return {
onInvalidEntry: ActionOnInvalid.THROW,
};
}
function newClusters(a, opts) {
const options = Object.assign(defaultNewConfigOptions(), opts || {});
return _.compact(_.map(a, clusterIterator(options.onInvalidEntry)));
}
exports.newClusters = newClusters;
function exportCluster(cluster) {
return {
name: cluster.name,
cluster: {
server: cluster.server,
'certificate-authority-data': cluster.caData,
'certificate-authority': cluster.caFile,
'insecure-skip-tls-verify': cluster.skipTLSVerify,
},
};
}
exports.exportCluster = exportCluster;
function clusterIterator(onInvalidEntry) {
return (elt, i, list) => {
try {
if (!elt.name) {
throw new Error(`clusters[${i}].name is missing`);
}
if (!elt.cluster) {
throw new Error(`clusters[${i}].cluster is missing`);
}
if (!elt.cluster.server) {
throw new Error(`clusters[${i}].cluster.server is missing`);
}
return {
caData: elt.cluster['certificate-authority-data'],
caFile: elt.cluster['certificate-authority'],
name: elt.name,
server: elt.cluster.server.replace(/\/$/, ''),
skipTLSVerify: elt.cluster['insecure-skip-tls-verify'] === true,
};
}
catch (err) {
switch (onInvalidEntry) {
case ActionOnInvalid.FILTER:
return null;
default:
case ActionOnInvalid.THROW:
throw err;
}
}
};
}
function newUsers(a, opts) {
const options = Object.assign(defaultNewConfigOptions(), opts || {});
return _.compact(_.map(a, userIterator(options.onInvalidEntry)));
}
exports.newUsers = newUsers;
function exportUser(user) {
return {
name: user.name,
user: {
'auth-provider': user.authProvider,
'client-certificate-data': user.certData,
'client-certificate': user.certFile,
exec: user.exec,
'client-key-data': user.keyData,
'client-key': user.keyFile,
token: user.token,
password: user.password,
username: user.username,
},
};
}
exports.exportUser = exportUser;
function userIterator(onInvalidEntry) {
return (elt, i, list) => {
try {
if (!elt.name) {
throw new Error(`users[${i}].name is missing`);
}
return {
authProvider: elt.user ? elt.user['auth-provider'] : null,
certData: elt.user ? elt.user['client-certificate-data'] : null,
certFile: elt.user ? elt.user['client-certificate'] : null,
exec: elt.user ? elt.user.exec : null,
keyData: elt.user ? elt.user['client-key-data'] : null,
keyFile: elt.user ? elt.user['client-key'] : null,
name: elt.name,
token: findToken(elt.user),
password: elt.user ? elt.user.password : null,
username: elt.user ? elt.user.username : null,
};
}
catch (err) {
switch (onInvalidEntry) {
case ActionOnInvalid.FILTER:
return null;
default:
case ActionOnInvalid.THROW:
throw err;
}
}
};
}
function findToken(user) {
if (user) {
if (user.token) {
return user.token;
}
if (user['token-file']) {
return fs.readFileSync(user['token-file']).toString();
}
}
}
function newContexts(a, opts) {
const options = Object.assign(defaultNewConfigOptions(), opts || {});
return _.compact(_.map(a, contextIterator(options.onInvalidEntry)));
}
exports.newContexts = newContexts;
function exportContext(ctx) {
return {
name: ctx.name,
context: ctx,
};
}
exports.exportContext = exportContext;
function contextIterator(onInvalidEntry) {
return (elt, i, list) => {
try {
if (!elt.name) {
throw new Error(`contexts[${i}].name is missing`);
}
if (!elt.context) {
throw new Error(`contexts[${i}].context is missing`);
}
if (!elt.context.cluster) {
throw new Error(`contexts[${i}].context.cluster is missing`);
}
return {
cluster: elt.context.cluster,
name: elt.name,
user: elt.context.user || undefined,
namespace: elt.context.namespace || undefined,
};
}
catch (err) {
switch (onInvalidEntry) {
case ActionOnInvalid.FILTER:
return null;
default:
case ActionOnInvalid.THROW:
throw err;
}
}
};
}
//# sourceMappingURL=config_types.js.map
/***/ }),
/***/ 54815:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Cp = void 0;
const tslib_1 = __nccwpck_require__(67551);
const fs = tslib_1.__importStar(__nccwpck_require__(57147));
const stream_buffers_1 = __nccwpck_require__(48168);
const tar = tslib_1.__importStar(__nccwpck_require__(74674));
const tmp = tslib_1.__importStar(__nccwpck_require__(68065));
const exec_1 = __nccwpck_require__(62864);
class Cp {
constructor(config, execInstance) {
this.execInstance = execInstance || new exec_1.Exec(config);
}
/**
* @param {string} namespace - The namespace of the pod to exec the command inside.
* @param {string} podName - The name of the pod to exec the command inside.
* @param {string} containerName - The name of the container in the pod to exec the command inside.
* @param {string} srcPath - The source path in the pod
* @param {string} tgtPath - The target path in local
*/
async cpFromPod(namespace, podName, containerName, srcPath, tgtPath) {
const tmpFile = tmp.fileSync();
const tmpFileName = tmpFile.name;
const command = ['tar', 'zcf', '-', srcPath];
const writerStream = fs.createWriteStream(tmpFileName);
const errStream = new stream_buffers_1.WritableStreamBuffer();
this.execInstance.exec(namespace, podName, containerName, command, writerStream, errStream, null, false, async () => {
if (errStream.size()) {
throw new Error(`Error from cpFromPod - details: \n ${errStream.getContentsAsString()}`);
}
await tar.x({
file: tmpFileName,
cwd: tgtPath,
});
});
}
/**
* @param {string} namespace - The namespace of the pod to exec the command inside.
* @param {string} podName - The name of the pod to exec the command inside.
* @param {string} containerName - The name of the container in the pod to exec the command inside.
* @param {string} srcPath - The source path in local
* @param {string} tgtPath - The target path in the pod
*/
async cpToPod(namespace, podName, containerName, srcPath, tgtPath) {
const tmpFile = tmp.fileSync();
const tmpFileName = tmpFile.name;
const command = ['tar', 'xf', '-', '-C', tgtPath];
await tar.c({
file: tmpFile.name,
}, [srcPath]);
const readStream = fs.createReadStream(tmpFileName);
const errStream = new stream_buffers_1.WritableStreamBuffer();
this.execInstance.exec(namespace, podName, containerName, command, null, errStream, readStream, false, async () => {
if (errStream.size()) {
throw new Error(`Error from cpToPod - details: \n ${errStream.getContentsAsString()}`);
}
});
}
}
exports.Cp = Cp;
//# sourceMappingURL=cp.js.map
/***/ }),
/***/ 62864:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Exec = void 0;
const querystring = __nccwpck_require__(63477);
const terminal_size_queue_1 = __nccwpck_require__(76023);
const web_socket_handler_1 = __nccwpck_require__(47581);
class Exec {
constructor(config, wsInterface) {
this.handler = wsInterface || new web_socket_handler_1.WebSocketHandler(config);
}
/**
* @param {string} namespace - The namespace of the pod to exec the command inside.
* @param {string} podName - The name of the pod to exec the command inside.
* @param {string} containerName - The name of the container in the pod to exec the command inside.
* @param {(string|string[])} command - The command or command and arguments to execute.
* @param {stream.Writable} stdout - The stream to write stdout data from the command.
* @param {stream.Writable} stderr - The stream to write stderr data from the command.
* @param {stream.Readable} stdin - The stream to write stdin data into the command.
* @param {boolean} tty - Should the command execute in a TTY enabled session.
* @param {(V1Status) => void} statusCallback -
* A callback to received the status (e.g. exit code) from the command, optional.
* @return {string} This is the result
*/
async exec(namespace, podName, containerName, command, stdout, stderr, stdin, tty, statusCallback) {
const query = {
stdout: stdout != null,
stderr: stderr != null,
stdin: stdin != null,
tty,
command,
container: containerName,
};
const queryStr = querystring.stringify(query);
const path = `/api/v1/namespaces/${namespace}/pods/${podName}/exec?${queryStr}`;
const conn = await this.handler.connect(path, null, (streamNum, buff) => {
const status = web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr);
if (status != null) {
if (statusCallback) {
statusCallback(status);
}
return false;
}
return true;
});
if (stdin != null) {
web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream);
}
if (terminal_size_queue_1.isResizable(stdout)) {
this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue();
web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream);
this.terminalSizeQueue.handleResizes(stdout);
}
return conn;
}
}
exports.Exec = Exec;
//# sourceMappingURL=exec.js.map
/***/ }),
/***/ 18325:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ExecAuth = void 0;
const execa = __nccwpck_require__(56754);
class ExecAuth {
constructor() {
this.tokenCache = {};
this.execFn = execa.sync;
}
isAuthProvider(user) {
if (!user) {
return false;
}
if (user.exec) {
return true;
}
if (!user.authProvider) {
return false;
}
return (user.authProvider.name === 'exec' || !!(user.authProvider.config && user.authProvider.config.exec));
}
async applyAuthentication(user, opts) {
const credential = this.getCredential(user);
if (!credential) {
return;
}
if (credential.status.clientCertificateData) {
opts.cert = credential.status.clientCertificateData;
}
if (credential.status.clientKeyData) {
opts.key = credential.status.clientKeyData;
}
const token = this.getToken(credential);
if (token) {
if (!opts.headers) {
opts.headers = [];
}
opts.headers.Authorization = `Bearer ${token}`;
}
}
getToken(credential) {
if (!credential) {
return null;
}
if (credential.status.token) {
return credential.status.token;
}
return null;
}
getCredential(user) {
// TODO: Add a unit test for token caching.
const cachedToken = this.tokenCache[user.name];
if (cachedToken) {
const date = Date.parse(cachedToken.status.expirationTimestamp);
if (date > Date.now()) {
return cachedToken;
}
this.tokenCache[user.name] = null;
}
let exec = null;
if (user.authProvider && user.authProvider.config) {
exec = user.authProvider.config.exec;
}
if (user.exec) {
exec = user.exec;
}
if (!exec) {
return null;
}
if (!exec.command) {
throw new Error('No command was specified for exec authProvider!');
}
let opts = {};
if (exec.env) {
const env = process.env;
exec.env.forEach((elt) => (env[elt.name] = elt.value));
opts = { ...opts, env };
}
const result = this.execFn(exec.command, exec.args, opts);
if (result.exitCode === 0) {
const obj = JSON.parse(result.stdout);
this.tokenCache[user.name] = obj;
return obj;
}
throw new Error(result.stderr);
}
}
exports.ExecAuth = ExecAuth;
//# sourceMappingURL=exec_auth.js.map
/***/ }),
/***/ 38572:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.FileAuth = void 0;
const fs = __nccwpck_require__(57147);
class FileAuth {
constructor() {
this.token = null;
this.lastRead = null;
}
isAuthProvider(user) {
return user.authProvider && user.authProvider.config && user.authProvider.config.tokenFile;
}
async applyAuthentication(user, opts) {
if (this.token == null) {
this.refreshToken(user.authProvider.config.tokenFile);
}
if (this.isTokenExpired()) {
this.refreshToken(user.authProvider.config.tokenFile);
}
if (this.token) {
opts.headers.Authorization = `Bearer ${this.token}`;
}
}
refreshToken(filePath) {
// TODO make this async?
this.token = fs.readFileSync(filePath).toString('UTF-8');
this.lastRead = new Date();
}
isTokenExpired() {
if (this.lastRead === null) {
return true;
}
const now = new Date();
const delta = (now.getTime() - this.lastRead.getTime()) / 1000;
// For now just refresh every 60 seconds. This is imperfect since the token
// could be out of date for this time, but it is unlikely and it's also what
// the client-go library does.
// TODO: Use file notifications instead?
return delta > 60;
}
}
exports.FileAuth = FileAuth;
//# sourceMappingURL=file_auth.js.map
/***/ }),
/***/ 94064:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GoogleCloudPlatformAuth = void 0;
const tslib_1 = __nccwpck_require__(67551);
const proc = tslib_1.__importStar(__nccwpck_require__(32081));
const jsonpath = tslib_1.__importStar(__nccwpck_require__(63269));
class GoogleCloudPlatformAuth {
isAuthProvider(user) {
if (!user || !user.authProvider) {
return false;
}
return user.authProvider.name === 'gcp';
}
async applyAuthentication(user, opts) {
const token = this.getToken(user);
if (token) {
opts.headers.Authorization = `Bearer ${token}`;
}
}
getToken(user) {
const config = user.authProvider.config;
if (this.isExpired(config)) {
this.updateAccessToken(config);
}
return config['access-token'];
}
isExpired(config) {
const token = config['access-token'];
const expiry = config.expiry;
if (!token) {
return true;
}
if (!expiry) {
return false;
}
const expiration = Date.parse(expiry);
if (expiration < Date.now()) {
return true;
}
return false;
}
updateAccessToken(config) {
let cmd = config['cmd-path'];
if (!cmd) {
throw new Error('Token is expired!');
}
// Wrap cmd in quotes to make it cope with spaces in path
cmd = `"${cmd}"`;
const args = config['cmd-args'];
if (args) {
cmd = cmd + ' ' + args;
}
// TODO: Cache to file?
// TODO: do this asynchronously
let output;
try {
output = proc.execSync(cmd);
}
catch (err) {
throw new Error('Failed to refresh token: ' + err.message);
}
const resultObj = JSON.parse(output);
const tokenPathKeyInConfig = config['token-key'];
const expiryPathKeyInConfig = config['expiry-key'];
// Format in file is {}, so slice it out and add '$'
const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1);
const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1);
config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj);
config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj);
}
}
exports.GoogleCloudPlatformAuth = GoogleCloudPlatformAuth;
//# sourceMappingURL=gcp_auth.js.map
/***/ }),
/***/ 37233:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(67551);
// This is the entrypoint for the package
tslib_1.__exportStar(__nccwpck_require__(25997), exports);
tslib_1.__exportStar(__nccwpck_require__(15158), exports);
//# sourceMappingURL=api.js.map
/***/ }),
/***/ 79893:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AdmissionregistrationApi = exports.AdmissionregistrationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AdmissionregistrationApiApiKeys;
(function (AdmissionregistrationApiApiKeys) {
AdmissionregistrationApiApiKeys[AdmissionregistrationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AdmissionregistrationApiApiKeys = exports.AdmissionregistrationApiApiKeys || (exports.AdmissionregistrationApiApiKeys = {}));
class AdmissionregistrationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AdmissionregistrationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AdmissionregistrationApi = AdmissionregistrationApi;
//# sourceMappingURL=admissionregistrationApi.js.map
/***/ }),
/***/ 69218:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AdmissionregistrationV1Api = exports.AdmissionregistrationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AdmissionregistrationV1ApiApiKeys;
(function (AdmissionregistrationV1ApiApiKeys) {
AdmissionregistrationV1ApiApiKeys[AdmissionregistrationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AdmissionregistrationV1ApiApiKeys = exports.AdmissionregistrationV1ApiApiKeys || (exports.AdmissionregistrationV1ApiApiKeys = {}));
class AdmissionregistrationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AdmissionregistrationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a MutatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1MutatingWebhookConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ValidatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ValidatingWebhookConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of MutatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ValidatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind MutatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfigurationList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ValidatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfigurationList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchMutatingWebhookConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchValidatingWebhookConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
*/
async readMutatingWebhookConfiguration(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
*/
async readValidatingWebhookConfiguration(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceMutatingWebhookConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1MutatingWebhookConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceValidatingWebhookConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ValidatingWebhookConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AdmissionregistrationV1Api = AdmissionregistrationV1Api;
//# sourceMappingURL=admissionregistrationV1Api.js.map
/***/ }),
/***/ 67758:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiextensionsApi = exports.ApiextensionsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApiextensionsApiApiKeys;
(function (ApiextensionsApiApiKeys) {
ApiextensionsApiApiKeys[ApiextensionsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApiextensionsApiApiKeys = exports.ApiextensionsApiApiKeys || (exports.ApiextensionsApiApiKeys = {}));
class ApiextensionsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApiextensionsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApiextensionsApi = ApiextensionsApi;
//# sourceMappingURL=apiextensionsApi.js.map
/***/ }),
/***/ 91294:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiextensionsV1Api = exports.ApiextensionsV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApiextensionsV1ApiApiKeys;
(function (ApiextensionsV1ApiApiKeys) {
ApiextensionsV1ApiApiKeys[ApiextensionsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApiextensionsV1ApiApiKeys = exports.ApiextensionsV1ApiApiKeys || (exports.ApiextensionsV1ApiApiKeys = {}));
class ApiextensionsV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApiextensionsV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createCustomResourceDefinition(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinitionList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinition.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinitionStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinitionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCustomResourceDefinition(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCustomResourceDefinitionStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinitionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinition.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinitionStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinitionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApiextensionsV1Api = ApiextensionsV1Api;
//# sourceMappingURL=apiextensionsV1Api.js.map
/***/ }),
/***/ 99722:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiregistrationApi = exports.ApiregistrationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApiregistrationApiApiKeys;
(function (ApiregistrationApiApiKeys) {
ApiregistrationApiApiKeys[ApiregistrationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApiregistrationApiApiKeys = exports.ApiregistrationApiApiKeys || (exports.ApiregistrationApiApiKeys = {}));
class ApiregistrationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApiregistrationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApiregistrationApi = ApiregistrationApi;
//# sourceMappingURL=apiregistrationApi.js.map
/***/ }),
/***/ 99365:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiregistrationV1Api = exports.ApiregistrationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApiregistrationV1ApiApiKeys;
(function (ApiregistrationV1ApiApiKeys) {
ApiregistrationV1ApiApiKeys[ApiregistrationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApiregistrationV1ApiApiKeys = exports.ApiregistrationV1ApiApiKeys || (exports.ApiregistrationV1ApiApiKeys = {}));
class ApiregistrationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApiregistrationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createAPIService(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1APIService")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an APIService
* @param name name of the APIService
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of APIService
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind APIService
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIServiceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified APIService
* @param name name of the APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchAPIService(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchAPIService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified APIService
* @param name name of the APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchAPIServiceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchAPIServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified APIService
* @param name name of the APIService
* @param pretty If \'true\', then the output is pretty printed.
*/
async readAPIService(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified APIService
* @param name name of the APIService
* @param pretty If \'true\', then the output is pretty printed.
*/
async readAPIServiceStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readAPIServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified APIService
* @param name name of the APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceAPIService(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceAPIService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1APIService")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified APIService
* @param name name of the APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceAPIServiceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceAPIServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1APIService")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApiregistrationV1Api = ApiregistrationV1Api;
//# sourceMappingURL=apiregistrationV1Api.js.map
/***/ }),
/***/ 25997:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.APIS = exports.HttpError = void 0;
const tslib_1 = __nccwpck_require__(67551);
tslib_1.__exportStar(__nccwpck_require__(79893), exports);
const admissionregistrationApi_1 = __nccwpck_require__(79893);
tslib_1.__exportStar(__nccwpck_require__(69218), exports);
const admissionregistrationV1Api_1 = __nccwpck_require__(69218);
tslib_1.__exportStar(__nccwpck_require__(67758), exports);
const apiextensionsApi_1 = __nccwpck_require__(67758);
tslib_1.__exportStar(__nccwpck_require__(91294), exports);
const apiextensionsV1Api_1 = __nccwpck_require__(91294);
tslib_1.__exportStar(__nccwpck_require__(99722), exports);
const apiregistrationApi_1 = __nccwpck_require__(99722);
tslib_1.__exportStar(__nccwpck_require__(99365), exports);
const apiregistrationV1Api_1 = __nccwpck_require__(99365);
tslib_1.__exportStar(__nccwpck_require__(59536), exports);
const apisApi_1 = __nccwpck_require__(59536);
tslib_1.__exportStar(__nccwpck_require__(99869), exports);
const appsApi_1 = __nccwpck_require__(99869);
tslib_1.__exportStar(__nccwpck_require__(10588), exports);
const appsV1Api_1 = __nccwpck_require__(10588);
tslib_1.__exportStar(__nccwpck_require__(61226), exports);
const authenticationApi_1 = __nccwpck_require__(61226);
tslib_1.__exportStar(__nccwpck_require__(17421), exports);
const authenticationV1Api_1 = __nccwpck_require__(17421);
tslib_1.__exportStar(__nccwpck_require__(75154), exports);
const authorizationApi_1 = __nccwpck_require__(75154);
tslib_1.__exportStar(__nccwpck_require__(97999), exports);
const authorizationV1Api_1 = __nccwpck_require__(97999);
tslib_1.__exportStar(__nccwpck_require__(94692), exports);
const autoscalingApi_1 = __nccwpck_require__(94692);
tslib_1.__exportStar(__nccwpck_require__(47098), exports);
const autoscalingV1Api_1 = __nccwpck_require__(47098);
tslib_1.__exportStar(__nccwpck_require__(15872), exports);
const autoscalingV2beta1Api_1 = __nccwpck_require__(15872);
tslib_1.__exportStar(__nccwpck_require__(76982), exports);
const autoscalingV2beta2Api_1 = __nccwpck_require__(76982);
tslib_1.__exportStar(__nccwpck_require__(91445), exports);
const batchApi_1 = __nccwpck_require__(91445);
tslib_1.__exportStar(__nccwpck_require__(78246), exports);
const batchV1Api_1 = __nccwpck_require__(78246);
tslib_1.__exportStar(__nccwpck_require__(71101), exports);
const batchV1beta1Api_1 = __nccwpck_require__(71101);
tslib_1.__exportStar(__nccwpck_require__(92076), exports);
const certificatesApi_1 = __nccwpck_require__(92076);
tslib_1.__exportStar(__nccwpck_require__(32593), exports);
const certificatesV1Api_1 = __nccwpck_require__(32593);
tslib_1.__exportStar(__nccwpck_require__(69209), exports);
const coordinationApi_1 = __nccwpck_require__(69209);
tslib_1.__exportStar(__nccwpck_require__(52653), exports);
const coordinationV1Api_1 = __nccwpck_require__(52653);
tslib_1.__exportStar(__nccwpck_require__(51489), exports);
const coreApi_1 = __nccwpck_require__(51489);
tslib_1.__exportStar(__nccwpck_require__(4738), exports);
const coreV1Api_1 = __nccwpck_require__(4738);
tslib_1.__exportStar(__nccwpck_require__(36522), exports);
const customObjectsApi_1 = __nccwpck_require__(36522);
tslib_1.__exportStar(__nccwpck_require__(44310), exports);
const discoveryApi_1 = __nccwpck_require__(44310);
tslib_1.__exportStar(__nccwpck_require__(9089), exports);
const discoveryV1Api_1 = __nccwpck_require__(9089);
tslib_1.__exportStar(__nccwpck_require__(10420), exports);
const discoveryV1beta1Api_1 = __nccwpck_require__(10420);
tslib_1.__exportStar(__nccwpck_require__(89829), exports);
const eventsApi_1 = __nccwpck_require__(89829);
tslib_1.__exportStar(__nccwpck_require__(15621), exports);
const eventsV1Api_1 = __nccwpck_require__(15621);
tslib_1.__exportStar(__nccwpck_require__(5821), exports);
const eventsV1beta1Api_1 = __nccwpck_require__(5821);
tslib_1.__exportStar(__nccwpck_require__(16001), exports);
const flowcontrolApiserverApi_1 = __nccwpck_require__(16001);
tslib_1.__exportStar(__nccwpck_require__(58365), exports);
const flowcontrolApiserverV1beta1Api_1 = __nccwpck_require__(58365);
tslib_1.__exportStar(__nccwpck_require__(31857), exports);
const internalApiserverApi_1 = __nccwpck_require__(31857);
tslib_1.__exportStar(__nccwpck_require__(76012), exports);
const internalApiserverV1alpha1Api_1 = __nccwpck_require__(76012);
tslib_1.__exportStar(__nccwpck_require__(88382), exports);
const logsApi_1 = __nccwpck_require__(88382);
tslib_1.__exportStar(__nccwpck_require__(48169), exports);
const networkingApi_1 = __nccwpck_require__(48169);
tslib_1.__exportStar(__nccwpck_require__(97534), exports);
const networkingV1Api_1 = __nccwpck_require__(97534);
tslib_1.__exportStar(__nccwpck_require__(31466), exports);
const nodeApi_1 = __nccwpck_require__(31466);
tslib_1.__exportStar(__nccwpck_require__(9090), exports);
const nodeV1Api_1 = __nccwpck_require__(9090);
tslib_1.__exportStar(__nccwpck_require__(17374), exports);
const nodeV1alpha1Api_1 = __nccwpck_require__(17374);
tslib_1.__exportStar(__nccwpck_require__(78504), exports);
const nodeV1beta1Api_1 = __nccwpck_require__(78504);
tslib_1.__exportStar(__nccwpck_require__(5381), exports);
const openidApi_1 = __nccwpck_require__(5381);
tslib_1.__exportStar(__nccwpck_require__(37284), exports);
const policyApi_1 = __nccwpck_require__(37284);
tslib_1.__exportStar(__nccwpck_require__(87307), exports);
const policyV1Api_1 = __nccwpck_require__(87307);
tslib_1.__exportStar(__nccwpck_require__(80228), exports);
const policyV1beta1Api_1 = __nccwpck_require__(80228);
tslib_1.__exportStar(__nccwpck_require__(73316), exports);
const rbacAuthorizationApi_1 = __nccwpck_require__(73316);
tslib_1.__exportStar(__nccwpck_require__(93149), exports);
const rbacAuthorizationV1Api_1 = __nccwpck_require__(93149);
tslib_1.__exportStar(__nccwpck_require__(44056), exports);
const rbacAuthorizationV1alpha1Api_1 = __nccwpck_require__(44056);
tslib_1.__exportStar(__nccwpck_require__(29389), exports);
const schedulingApi_1 = __nccwpck_require__(29389);
tslib_1.__exportStar(__nccwpck_require__(26757), exports);
const schedulingV1Api_1 = __nccwpck_require__(26757);
tslib_1.__exportStar(__nccwpck_require__(91655), exports);
const schedulingV1alpha1Api_1 = __nccwpck_require__(91655);
tslib_1.__exportStar(__nccwpck_require__(91143), exports);
const storageApi_1 = __nccwpck_require__(91143);
tslib_1.__exportStar(__nccwpck_require__(922), exports);
const storageV1Api_1 = __nccwpck_require__(922);
tslib_1.__exportStar(__nccwpck_require__(30769), exports);
const storageV1alpha1Api_1 = __nccwpck_require__(30769);
tslib_1.__exportStar(__nccwpck_require__(73491), exports);
const storageV1beta1Api_1 = __nccwpck_require__(73491);
tslib_1.__exportStar(__nccwpck_require__(4441), exports);
const versionApi_1 = __nccwpck_require__(4441);
tslib_1.__exportStar(__nccwpck_require__(19868), exports);
const wellKnownApi_1 = __nccwpck_require__(19868);
class HttpError extends Error {
constructor(response, body, statusCode) {
super('HTTP request failed');
this.response = response;
this.body = body;
this.statusCode = statusCode;
this.name = 'HttpError';
}
}
exports.HttpError = HttpError;
exports.APIS = [admissionregistrationApi_1.AdmissionregistrationApi, admissionregistrationV1Api_1.AdmissionregistrationV1Api, apiextensionsApi_1.ApiextensionsApi, apiextensionsV1Api_1.ApiextensionsV1Api, apiregistrationApi_1.ApiregistrationApi, apiregistrationV1Api_1.ApiregistrationV1Api, apisApi_1.ApisApi, appsApi_1.AppsApi, appsV1Api_1.AppsV1Api, authenticationApi_1.AuthenticationApi, authenticationV1Api_1.AuthenticationV1Api, authorizationApi_1.AuthorizationApi, authorizationV1Api_1.AuthorizationV1Api, autoscalingApi_1.AutoscalingApi, autoscalingV1Api_1.AutoscalingV1Api, autoscalingV2beta1Api_1.AutoscalingV2beta1Api, autoscalingV2beta2Api_1.AutoscalingV2beta2Api, batchApi_1.BatchApi, batchV1Api_1.BatchV1Api, batchV1beta1Api_1.BatchV1beta1Api, certificatesApi_1.CertificatesApi, certificatesV1Api_1.CertificatesV1Api, coordinationApi_1.CoordinationApi, coordinationV1Api_1.CoordinationV1Api, coreApi_1.CoreApi, coreV1Api_1.CoreV1Api, customObjectsApi_1.CustomObjectsApi, discoveryApi_1.DiscoveryApi, discoveryV1Api_1.DiscoveryV1Api, discoveryV1beta1Api_1.DiscoveryV1beta1Api, eventsApi_1.EventsApi, eventsV1Api_1.EventsV1Api, eventsV1beta1Api_1.EventsV1beta1Api, flowcontrolApiserverApi_1.FlowcontrolApiserverApi, flowcontrolApiserverV1beta1Api_1.FlowcontrolApiserverV1beta1Api, internalApiserverApi_1.InternalApiserverApi, internalApiserverV1alpha1Api_1.InternalApiserverV1alpha1Api, logsApi_1.LogsApi, networkingApi_1.NetworkingApi, networkingV1Api_1.NetworkingV1Api, nodeApi_1.NodeApi, nodeV1Api_1.NodeV1Api, nodeV1alpha1Api_1.NodeV1alpha1Api, nodeV1beta1Api_1.NodeV1beta1Api, openidApi_1.OpenidApi, policyApi_1.PolicyApi, policyV1Api_1.PolicyV1Api, policyV1beta1Api_1.PolicyV1beta1Api, rbacAuthorizationApi_1.RbacAuthorizationApi, rbacAuthorizationV1Api_1.RbacAuthorizationV1Api, rbacAuthorizationV1alpha1Api_1.RbacAuthorizationV1alpha1Api, schedulingApi_1.SchedulingApi, schedulingV1Api_1.SchedulingV1Api, schedulingV1alpha1Api_1.SchedulingV1alpha1Api, storageApi_1.StorageApi, storageV1Api_1.StorageV1Api, storageV1alpha1Api_1.StorageV1alpha1Api, storageV1beta1Api_1.StorageV1beta1Api, versionApi_1.VersionApi, wellKnownApi_1.WellKnownApi];
//# sourceMappingURL=apis.js.map
/***/ }),
/***/ 59536:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApisApi = exports.ApisApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApisApiApiKeys;
(function (ApisApiApiKeys) {
ApisApiApiKeys[ApisApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApisApiApiKeys = exports.ApisApiApiKeys || (exports.ApisApiApiKeys = {}));
class ApisApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApisApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get available API versions
*/
async getAPIVersions(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroupList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApisApi = ApisApi;
//# sourceMappingURL=apisApi.js.map
/***/ }),
/***/ 99869:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AppsApi = exports.AppsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AppsApiApiKeys;
(function (AppsApiApiKeys) {
AppsApiApiKeys[AppsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AppsApiApiKeys = exports.AppsApiApiKeys || (exports.AppsApiApiKeys = {}));
class AppsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AppsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AppsApi = AppsApi;
//# sourceMappingURL=appsApi.js.map
/***/ }),
/***/ 10588:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AppsV1Api = exports.AppsV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AppsV1ApiApiKeys;
(function (AppsV1ApiApiKeys) {
AppsV1ApiApiKeys[AppsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AppsV1ApiApiKeys = exports.AppsV1ApiApiKeys || (exports.AppsV1ApiApiKeys = {}));
class AppsV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AppsV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedControllerRevision(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedControllerRevision.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ControllerRevision")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedDaemonSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDaemonSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedDeployment(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeployment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Deployment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedReplicaSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicaSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedStatefulSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedStatefulSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedControllerRevision(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedDaemonSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedDeployment(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedReplicaSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedStatefulSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ControllerRevision
* @param name name of the ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedControllerRevision(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedControllerRevision.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedDaemonSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDaemonSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedDeployment(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDeployment.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedReplicaSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicaSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedStatefulSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedStatefulSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ControllerRevision
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listControllerRevisionForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/controllerrevisions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevisionList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind DaemonSet
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listDaemonSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/daemonsets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Deployment
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listDeploymentForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/deployments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DeploymentList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedControllerRevision(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevisionList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedDaemonSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedDeployment(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DeploymentList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedReplicaSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedStatefulSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ReplicaSet
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listReplicaSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/replicasets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind StatefulSet
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listStatefulSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/statefulsets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ControllerRevision
* @param name name of the ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedControllerRevision.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedControllerRevision.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeployment.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeployment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified Deployment
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified ReplicaSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified StatefulSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ControllerRevision
* @param name name of the ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedControllerRevision(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedControllerRevision.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDaemonSet(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDaemonSetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDeployment(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDeployment.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified Deployment
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDeploymentScale(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDeploymentStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicaSet(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified ReplicaSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicaSetScale(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicaSetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedStatefulSet(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified StatefulSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedStatefulSetScale(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedStatefulSetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ControllerRevision
* @param name name of the ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedControllerRevision.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedControllerRevision.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ControllerRevision")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeployment.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Deployment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified Deployment
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Scale")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Deployment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified ReplicaSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Scale")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified StatefulSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Scale")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AppsV1Api = AppsV1Api;
//# sourceMappingURL=appsV1Api.js.map
/***/ }),
/***/ 61226:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthenticationApi = exports.AuthenticationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AuthenticationApiApiKeys;
(function (AuthenticationApiApiKeys) {
AuthenticationApiApiKeys[AuthenticationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AuthenticationApiApiKeys = exports.AuthenticationApiApiKeys || (exports.AuthenticationApiApiKeys = {}));
class AuthenticationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AuthenticationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authentication.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AuthenticationApi = AuthenticationApi;
//# sourceMappingURL=authenticationApi.js.map
/***/ }),
/***/ 17421:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthenticationV1Api = exports.AuthenticationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AuthenticationV1ApiApiKeys;
(function (AuthenticationV1ApiApiKeys) {
AuthenticationV1ApiApiKeys[AuthenticationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AuthenticationV1ApiApiKeys = exports.AuthenticationV1ApiApiKeys || (exports.AuthenticationV1ApiApiKeys = {}));
class AuthenticationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AuthenticationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a TokenReview
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createTokenReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/tokenreviews';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createTokenReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1TokenReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1TokenReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AuthenticationV1Api = AuthenticationV1Api;
//# sourceMappingURL=authenticationV1Api.js.map
/***/ }),
/***/ 75154:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthorizationApi = exports.AuthorizationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AuthorizationApiApiKeys;
(function (AuthorizationApiApiKeys) {
AuthorizationApiApiKeys[AuthorizationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AuthorizationApiApiKeys = exports.AuthorizationApiApiKeys || (exports.AuthorizationApiApiKeys = {}));
class AuthorizationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AuthorizationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AuthorizationApi = AuthorizationApi;
//# sourceMappingURL=authorizationApi.js.map
/***/ }),
/***/ 97999:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthorizationV1Api = exports.AuthorizationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AuthorizationV1ApiApiKeys;
(function (AuthorizationV1ApiApiKeys) {
AuthorizationV1ApiApiKeys[AuthorizationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AuthorizationV1ApiApiKeys = exports.AuthorizationV1ApiApiKeys || (exports.AuthorizationV1ApiApiKeys = {}));
class AuthorizationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AuthorizationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a LocalSubjectAccessReview
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1LocalSubjectAccessReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LocalSubjectAccessReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a SelfSubjectAccessReview
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createSelfSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createSelfSubjectAccessReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1SelfSubjectAccessReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SelfSubjectAccessReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a SelfSubjectRulesReview
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createSelfSubjectRulesReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectrulesreviews';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createSelfSubjectRulesReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1SelfSubjectRulesReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SelfSubjectRulesReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a SubjectAccessReview
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/subjectaccessreviews';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createSubjectAccessReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1SubjectAccessReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SubjectAccessReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AuthorizationV1Api = AuthorizationV1Api;
//# sourceMappingURL=authorizationV1Api.js.map
/***/ }),
/***/ 94692:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AutoscalingApi = exports.AutoscalingApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AutoscalingApiApiKeys;
(function (AutoscalingApiApiKeys) {
AutoscalingApiApiKeys[AutoscalingApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AutoscalingApiApiKeys = exports.AutoscalingApiApiKeys || (exports.AutoscalingApiApiKeys = {}));
class AutoscalingApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AutoscalingApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AutoscalingApi = AutoscalingApi;
//# sourceMappingURL=autoscalingApi.js.map
/***/ }),
/***/ 47098:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AutoscalingV1Api = exports.AutoscalingV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AutoscalingV1ApiApiKeys;
(function (AutoscalingV1ApiApiKeys) {
AutoscalingV1ApiApiKeys[AutoscalingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AutoscalingV1ApiApiKeys = exports.AutoscalingV1ApiApiKeys || (exports.AutoscalingV1ApiApiKeys = {}));
class AutoscalingV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AutoscalingV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/horizontalpodautoscalers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AutoscalingV1Api = AutoscalingV1Api;
//# sourceMappingURL=autoscalingV1Api.js.map
/***/ }),
/***/ 15872:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AutoscalingV2beta1Api = exports.AutoscalingV2beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AutoscalingV2beta1ApiApiKeys;
(function (AutoscalingV2beta1ApiApiKeys) {
AutoscalingV2beta1ApiApiKeys[AutoscalingV2beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AutoscalingV2beta1ApiApiKeys = exports.AutoscalingV2beta1ApiApiKeys || (exports.AutoscalingV2beta1ApiApiKeys = {}));
class AutoscalingV2beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AutoscalingV2beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/horizontalpodautoscalers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AutoscalingV2beta1Api = AutoscalingV2beta1Api;
//# sourceMappingURL=autoscalingV2beta1Api.js.map
/***/ }),
/***/ 76982:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AutoscalingV2beta2Api = exports.AutoscalingV2beta2ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AutoscalingV2beta2ApiApiKeys;
(function (AutoscalingV2beta2ApiApiKeys) {
AutoscalingV2beta2ApiApiKeys[AutoscalingV2beta2ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AutoscalingV2beta2ApiApiKeys = exports.AutoscalingV2beta2ApiApiKeys || (exports.AutoscalingV2beta2ApiApiKeys = {}));
class AutoscalingV2beta2Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AutoscalingV2beta2ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/horizontalpodautoscalers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AutoscalingV2beta2Api = AutoscalingV2beta2Api;
//# sourceMappingURL=autoscalingV2beta2Api.js.map
/***/ }),
/***/ 91445:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchApi = exports.BatchApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var BatchApiApiKeys;
(function (BatchApiApiKeys) {
BatchApiApiKeys[BatchApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(BatchApiApiKeys = exports.BatchApiApiKeys || (exports.BatchApiApiKeys = {}));
class BatchApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[BatchApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.BatchApi = BatchApi;
//# sourceMappingURL=batchApi.js.map
/***/ }),
/***/ 78246:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchV1Api = exports.BatchV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var BatchV1ApiApiKeys;
(function (BatchV1ApiApiKeys) {
BatchV1ApiApiKeys[BatchV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(BatchV1ApiApiKeys = exports.BatchV1ApiApiKeys || (exports.BatchV1ApiApiKeys = {}));
class BatchV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[BatchV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Job")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CronJob
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/cronjobs';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Job
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/jobs';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1JobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1JobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedJob(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedJobStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Job")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Job")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.BatchV1Api = BatchV1Api;
//# sourceMappingURL=batchV1Api.js.map
/***/ }),
/***/ 71101:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchV1beta1Api = exports.BatchV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var BatchV1beta1ApiApiKeys;
(function (BatchV1beta1ApiApiKeys) {
BatchV1beta1ApiApiKeys[BatchV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(BatchV1beta1ApiApiKeys = exports.BatchV1beta1ApiApiKeys || (exports.BatchV1beta1ApiApiKeys = {}));
class BatchV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[BatchV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CronJob
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/cronjobs';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.BatchV1beta1Api = BatchV1beta1Api;
//# sourceMappingURL=batchV1beta1Api.js.map
/***/ }),
/***/ 92076:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CertificatesApi = exports.CertificatesApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CertificatesApiApiKeys;
(function (CertificatesApiApiKeys) {
CertificatesApiApiKeys[CertificatesApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CertificatesApiApiKeys = exports.CertificatesApiApiKeys || (exports.CertificatesApiApiKeys = {}));
class CertificatesApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CertificatesApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CertificatesApi = CertificatesApi;
//# sourceMappingURL=certificatesApi.js.map
/***/ }),
/***/ 32593:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CertificatesV1Api = exports.CertificatesV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CertificatesV1ApiApiKeys;
(function (CertificatesV1ApiApiKeys) {
CertificatesV1ApiApiKeys[CertificatesV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CertificatesV1ApiApiKeys = exports.CertificatesV1ApiApiKeys || (exports.CertificatesV1ApiApiKeys = {}));
class CertificatesV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CertificatesV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createCertificateSigningRequest(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequestList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequest.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update approval of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestApproval.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestApproval.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCertificateSigningRequest(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read approval of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCertificateSigningRequestApproval(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestApproval.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCertificateSigningRequestStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequest.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace approval of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestApproval.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestApproval.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CertificatesV1Api = CertificatesV1Api;
//# sourceMappingURL=certificatesV1Api.js.map
/***/ }),
/***/ 69209:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoordinationApi = exports.CoordinationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CoordinationApiApiKeys;
(function (CoordinationApiApiKeys) {
CoordinationApiApiKeys[CoordinationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CoordinationApiApiKeys = exports.CoordinationApiApiKeys || (exports.CoordinationApiApiKeys = {}));
class CoordinationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CoordinationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CoordinationApi = CoordinationApi;
//# sourceMappingURL=coordinationApi.js.map
/***/ }),
/***/ 52653:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoordinationV1Api = exports.CoordinationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CoordinationV1ApiApiKeys;
(function (CoordinationV1ApiApiKeys) {
CoordinationV1ApiApiKeys[CoordinationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CoordinationV1ApiApiKeys = exports.CoordinationV1ApiApiKeys || (exports.CoordinationV1ApiApiKeys = {}));
class CoordinationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CoordinationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLease.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Lease")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Lease");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Lease
* @param name name of the Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLease.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Lease
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/leases';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LeaseList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LeaseList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Lease
* @param name name of the Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedLease.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLease.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Lease");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Lease
* @param name name of the Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedLease(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedLease.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Lease");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Lease
* @param name name of the Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLease.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLease.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Lease")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Lease");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CoordinationV1Api = CoordinationV1Api;
//# sourceMappingURL=coordinationV1Api.js.map
/***/ }),
/***/ 51489:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreApi = exports.CoreApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CoreApiApiKeys;
(function (CoreApiApiKeys) {
CoreApiApiKeys[CoreApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CoreApiApiKeys = exports.CoreApiApiKeys || (exports.CoreApiApiKeys = {}));
class CoreApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CoreApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get available API versions
*/
async getAPIVersions(options = { headers: {} }) {
const localVarPath = this.basePath + '/api/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIVersions");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CoreApi = CoreApi;
//# sourceMappingURL=coreApi.js.map
/***/ }),
/***/ 4738:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1Api = exports.CoreV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CoreV1ApiApiKeys;
(function (CoreV1ApiApiKeys) {
CoreV1ApiApiKeys[CoreV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CoreV1ApiApiKeys = exports.CoreV1ApiApiKeys || (exports.CoreV1ApiApiKeys = {}));
class CoreV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CoreV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* connect DELETE requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectDeleteNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @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.
*/
async connectDeleteNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @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.
*/
async connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectDeleteNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectDeleteNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectDeleteNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to attach of Pod
* @param name name of the PodAttachOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod.
* @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
* @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
* @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
* @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.
*/
async connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodAttach.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodAttach.');
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (stderr !== undefined) {
localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean");
}
if (stdin !== undefined) {
localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean");
}
if (stdout !== undefined) {
localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean");
}
if (tty !== undefined) {
localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to exec of Pod
* @param name name of the PodExecOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param command Command is the remote command to execute. argv array. Not executed within a shell.
* @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod.
* @param stderr Redirect the standard error stream of the pod for this call. Defaults to true.
* @param stdin Redirect the standard input stream of the pod for this call. Defaults to false.
* @param stdout Redirect the standard output stream of the pod for this call. Defaults to true.
* @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
*/
async connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodExec.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodExec.');
}
if (command !== undefined) {
localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, "string");
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (stderr !== undefined) {
localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean");
}
if (stdin !== undefined) {
localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean");
}
if (stdout !== undefined) {
localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean");
}
if (tty !== undefined) {
localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to portforward of Pod
* @param name name of the PodPortForwardOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param ports List of ports to forward Required when using WebSockets
*/
async connectGetNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodPortforward.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodPortforward.');
}
if (ports !== undefined) {
localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectGetNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @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.
*/
async connectGetNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @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.
*/
async connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectGetNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectGetNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectGetNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectHeadNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @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.
*/
async connectHeadNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @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.
*/
async connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectHeadNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectHeadNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectHeadNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectOptionsNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @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.
*/
async connectOptionsNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @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.
*/
async connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectOptionsNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectOptionsNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectOptionsNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectPatchNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @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.
*/
async connectPatchNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @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.
*/
async connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectPatchNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectPatchNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPatchNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to attach of Pod
* @param name name of the PodAttachOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod.
* @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
* @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
* @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
* @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.
*/
async connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodAttach.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodAttach.');
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (stderr !== undefined) {
localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean");
}
if (stdin !== undefined) {
localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean");
}
if (stdout !== undefined) {
localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean");
}
if (tty !== undefined) {
localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to exec of Pod
* @param name name of the PodExecOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param command Command is the remote command to execute. argv array. Not executed within a shell.
* @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod.
* @param stderr Redirect the standard error stream of the pod for this call. Defaults to true.
* @param stdin Redirect the standard input stream of the pod for this call. Defaults to false.
* @param stdout Redirect the standard output stream of the pod for this call. Defaults to true.
* @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
*/
async connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodExec.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodExec.');
}
if (command !== undefined) {
localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, "string");
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (stderr !== undefined) {
localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean");
}
if (stdin !== undefined) {
localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean");
}
if (stdout !== undefined) {
localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean");
}
if (tty !== undefined) {
localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to portforward of Pod
* @param name name of the PodPortForwardOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param ports List of ports to forward Required when using WebSockets
*/
async connectPostNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodPortforward.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodPortforward.');
}
if (ports !== undefined) {
localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectPostNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @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.
*/
async connectPostNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @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.
*/
async connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectPostNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectPostNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPostNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectPutNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @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.
*/
async connectPutNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @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.
*/
async connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectPutNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectPutNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPutNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespace(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Namespace")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Binding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedBinding(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/bindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedBinding.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Binding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Binding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedConfigMap(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedConfigMap.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ConfigMap")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEndpoints(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpoints.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Endpoints")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create an Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "CoreV1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedLimitRange(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLimitRange.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1LimitRange")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPersistentVolumeClaim(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPod(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPod.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Pod")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create binding of a Pod
* @param name name of the Binding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedPodBinding(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/binding'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling createNamespacedPodBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodBinding.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Binding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Binding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create eviction of a Pod
* @param name name of the Eviction
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedPodEviction(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/eviction'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling createNamespacedPodEviction.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodEviction.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodEviction.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Eviction")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Eviction");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPodTemplate(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodTemplate.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodTemplate")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedReplicationController(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicationController.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedResourceQuota(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceQuota.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedSecret(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedSecret.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Secret")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Secret");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedService(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Service")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedServiceAccount(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccount.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ServiceAccount")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create token of a ServiceAccount
* @param name name of the TokenRequest
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedServiceAccountToken(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling createNamespacedServiceAccountToken.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccountToken.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccountToken.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "AuthenticationV1TokenRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "AuthenticationV1TokenRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNode(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Node")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPersistentVolume(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedConfigMap(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEndpoints(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedLimitRange(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPersistentVolumeClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPod(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPodTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedReplicationController(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedResourceQuota(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedSecret(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedServiceAccount(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Node
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPersistentVolume(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Namespace
* @param name name of the Namespace
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespace(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ConfigMap
* @param name name of the ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedConfigMap(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedConfigMap.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete Endpoints
* @param name name of the Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedEndpoints(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpoints.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a LimitRange
* @param name name of the LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedLimitRange(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLimitRange.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedPod(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPod.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PodTemplate
* @param name name of the PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedPodTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodTemplate.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedReplicationController(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicationController.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedResourceQuota(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceQuota.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Secret
* @param name name of the Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedSecret(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedSecret.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedService(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedService.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ServiceAccount
* @param name name of the ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedServiceAccount(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedServiceAccount.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Node
* @param name name of the Node
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PersistentVolume
* @param name name of the PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deletePersistentVolume(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list objects of kind ComponentStatus
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listComponentStatus(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/componentstatuses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ComponentStatusList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ConfigMap
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listConfigMapForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/configmaps';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMapList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Endpoints
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEndpointsForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/endpoints';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointsList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/events';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind LimitRange
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listLimitRangeForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/limitranges';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRangeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Namespace
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespace(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NamespaceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedConfigMap(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMapList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEndpoints(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointsList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedLimitRange(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRangeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPersistentVolumeClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPod(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPodTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplateList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedReplicationController(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationControllerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedResourceQuota(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuotaList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedSecret(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SecretList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Service
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedService(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedServiceAccount(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccountList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Node
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NodeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPersistentVolume(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PersistentVolumeClaim
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPersistentVolumeClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumeclaims';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Pod
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/pods';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodTemplate
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/podtemplates';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplateList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ReplicationController
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listReplicationControllerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/replicationcontrollers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationControllerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ResourceQuota
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listResourceQuotaForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/resourcequotas';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuotaList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Secret
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listSecretForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/secrets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SecretList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ServiceAccount
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listServiceAccountForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/serviceaccounts';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccountList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Service
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listServiceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/services';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Namespace
* @param name name of the Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespace(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespace.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Namespace
* @param name name of the Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespaceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespaceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespaceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ConfigMap
* @param name name of the ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedConfigMap.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedConfigMap.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Endpoints
* @param name name of the Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpoints.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpoints.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified LimitRange
* @param name name of the LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedLimitRange.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLimitRange.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPod.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPod.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update ephemeralcontainers of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodEphemeralcontainers.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PodTemplate
* @param name name of the PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodTemplate.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodTemplate.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationController.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationController.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified ReplicationController
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuota.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuota.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuotaStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuotaStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuotaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Secret
* @param name name of the Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedSecret.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedSecret.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Secret");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedService.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ServiceAccount
* @param name name of the ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceAccount.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceAccount.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Node
* @param name name of the Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNode.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Node
* @param name name of the Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNodeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNodeStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNodeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PersistentVolume
* @param name name of the PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPersistentVolume(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPersistentVolume.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PersistentVolume
* @param name name of the PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPersistentVolumeStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPersistentVolumeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ComponentStatus
* @param name name of the ComponentStatus
* @param pretty If \'true\', then the output is pretty printed.
*/
async readComponentStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/componentstatuses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readComponentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ComponentStatus");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Namespace
* @param name name of the Namespace
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespace(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Namespace
* @param name name of the Namespace
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespaceStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespaceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ConfigMap
* @param name name of the ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedConfigMap(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedConfigMap.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Endpoints
* @param name name of the Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEndpoints(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpoints.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified LimitRange
* @param name name of the LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedLimitRange(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedLimitRange.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPersistentVolumeClaim(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPod(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPod.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read ephemeralcontainers of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodEphemeralcontainers(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodEphemeralcontainers.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read log of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param container The container for which to stream logs. Defaults to only container if there is one container in the pod.
* @param follow Follow the log stream of the pod. Defaults to false.
* @param insecureSkipTLSVerifyBackend insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver\'s TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param previous Return previous terminated container logs. Defaults to false.
* @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.
* @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
* @param timestamps If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
*/
async readNamespacedPodLog(name, namespace, container, follow, insecureSkipTLSVerifyBackend, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/log'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodLog.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodLog.');
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (follow !== undefined) {
localVarQueryParameters['follow'] = models_1.ObjectSerializer.serialize(follow, "boolean");
}
if (insecureSkipTLSVerifyBackend !== undefined) {
localVarQueryParameters['insecureSkipTLSVerifyBackend'] = models_1.ObjectSerializer.serialize(insecureSkipTLSVerifyBackend, "boolean");
}
if (limitBytes !== undefined) {
localVarQueryParameters['limitBytes'] = models_1.ObjectSerializer.serialize(limitBytes, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (previous !== undefined) {
localVarQueryParameters['previous'] = models_1.ObjectSerializer.serialize(previous, "boolean");
}
if (sinceSeconds !== undefined) {
localVarQueryParameters['sinceSeconds'] = models_1.ObjectSerializer.serialize(sinceSeconds, "number");
}
if (tailLines !== undefined) {
localVarQueryParameters['tailLines'] = models_1.ObjectSerializer.serialize(tailLines, "number");
}
if (timestamps !== undefined) {
localVarQueryParameters['timestamps'] = models_1.ObjectSerializer.serialize(timestamps, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PodTemplate
* @param name name of the PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodTemplate(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodTemplate.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicationController(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationController.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified ReplicationController
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicationControllerScale(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicationControllerStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedResourceQuota(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuota.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedResourceQuotaStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuotaStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuotaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Secret
* @param name name of the Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedSecret(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedSecret.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Secret");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedService(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedService.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ServiceAccount
* @param name name of the ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedServiceAccount(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceAccount.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedServiceStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Node
* @param name name of the Node
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNode(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Node
* @param name name of the Node
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNodeStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNodeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PersistentVolume
* @param name name of the PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPersistentVolume(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PersistentVolume
* @param name name of the PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPersistentVolumeStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPersistentVolumeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Namespace
* @param name name of the Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespace(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespace.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Namespace")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace finalize of the specified Namespace
* @param name name of the Namespace
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async replaceNamespaceFinalize(name, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}/finalize'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespaceFinalize.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespaceFinalize.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Namespace")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Namespace
* @param name name of the Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespaceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespaceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespaceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Namespace")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ConfigMap
* @param name name of the ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedConfigMap.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedConfigMap.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ConfigMap")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Endpoints
* @param name name of the Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpoints.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpoints.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Endpoints")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "CoreV1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified LimitRange
* @param name name of the LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLimitRange.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLimitRange.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1LimitRange")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPod.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPod.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Pod")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace ephemeralcontainers of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodEphemeralcontainers.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Pod")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Pod")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PodTemplate
* @param name name of the PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodTemplate.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodTemplate.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodTemplate")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationController.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationController.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified ReplicationController
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Scale")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuota.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuota.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuotaStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuotaStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuotaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Secret
* @param name name of the Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedSecret.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedSecret.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Secret")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Secret");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedService.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Service")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ServiceAccount
* @param name name of the ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceAccount.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceAccount.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ServiceAccount")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Service")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Node
* @param name name of the Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNode.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Node")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Node
* @param name name of the Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNodeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNodeStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNodeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Node")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PersistentVolume
* @param name name of the PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePersistentVolume(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePersistentVolume.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PersistentVolume
* @param name name of the PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePersistentVolumeStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePersistentVolumeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CoreV1Api = CoreV1Api;
//# sourceMappingURL=coreV1Api.js.map
/***/ }),
/***/ 36522:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CustomObjectsApi = exports.CustomObjectsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CustomObjectsApiApiKeys;
(function (CustomObjectsApiApiKeys) {
CustomObjectsApiApiKeys[CustomObjectsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CustomObjectsApiApiKeys = exports.CustomObjectsApiApiKeys || (exports.CustomObjectsApiApiKeys = {}));
class CustomObjectsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CustomObjectsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* Creates a cluster scoped Custom object
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param body The JSON schema of the Resource to create.
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
*/
async createClusterCustomObject(group, version, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling createClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling createClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling createClusterCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Creates a namespace scoped Custom object
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param body The JSON schema of the Resource to create.
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCustomObject(group, version, namespace, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling createNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling createNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling createNamespacedCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Deletes the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @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.
* @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.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param body
*/
async deleteClusterCustomObject(group, version, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling deleteClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling deleteClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling deleteClusterCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterCustomObject.');
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Delete collection of cluster scoped custom objects
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @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.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param body
*/
async deleteCollectionClusterCustomObject(group, version, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling deleteCollectionClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling deleteCollectionClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling deleteCollectionClusterCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Delete collection of namespace scoped custom objects
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @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.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param body
*/
async deleteCollectionNamespacedCustomObject(group, version, namespace, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling deleteCollectionNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling deleteCollectionNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling deleteCollectionNamespacedCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Deletes the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @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.
* @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.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param body
*/
async deleteNamespacedCustomObject(group, version, namespace, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling deleteNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling deleteNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling deleteNamespacedCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCustomObject.');
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Returns a cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getClusterCustomObject(group, version, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getClusterCustomObject.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getClusterCustomObjectScale(group, version, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectScale.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getClusterCustomObjectStatus(group, version, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectStatus.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Returns a namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getNamespacedCustomObject(group, version, namespace, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObject.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getNamespacedCustomObjectScale(group, version, namespace, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectScale.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getNamespacedCustomObjectStatus(group, version, namespace, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectStatus.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch cluster scoped custom objects
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
*/
async listClusterCustomObject(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/json;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling listClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling listClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling listClusterCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch namespace scoped custom objects
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
*/
async listNamespacedCustomObject(group, version, namespace, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/json;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling listNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling listNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling listNamespacedCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* patch the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body The JSON schema of the Resource to patch.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObject.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectScale.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectStatus.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* patch the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body The JSON schema of the Resource to patch.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObject.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectScale.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body The JSON schema of the Resource to replace.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObject.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectScale.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the cluster scoped specified custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectStatus.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body The JSON schema of the Resource to replace.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObject.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CustomObjectsApi = CustomObjectsApi;
//# sourceMappingURL=customObjectsApi.js.map
/***/ }),
/***/ 44310:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DiscoveryApi = exports.DiscoveryApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var DiscoveryApiApiKeys;
(function (DiscoveryApiApiKeys) {
DiscoveryApiApiKeys[DiscoveryApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(DiscoveryApiApiKeys = exports.DiscoveryApiApiKeys || (exports.DiscoveryApiApiKeys = {}));
class DiscoveryApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[DiscoveryApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.DiscoveryApi = DiscoveryApi;
//# sourceMappingURL=discoveryApi.js.map
/***/ }),
/***/ 9089:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DiscoveryV1Api = exports.DiscoveryV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var DiscoveryV1ApiApiKeys;
(function (DiscoveryV1ApiApiKeys) {
DiscoveryV1ApiApiKeys[DiscoveryV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(DiscoveryV1ApiApiKeys = exports.DiscoveryV1ApiApiKeys || (exports.DiscoveryV1ApiApiKeys = {}));
class DiscoveryV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[DiscoveryV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1EndpointSlice")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind EndpointSlice
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/endpointslices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSliceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSliceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1EndpointSlice")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.DiscoveryV1Api = DiscoveryV1Api;
//# sourceMappingURL=discoveryV1Api.js.map
/***/ }),
/***/ 10420:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DiscoveryV1beta1Api = exports.DiscoveryV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var DiscoveryV1beta1ApiApiKeys;
(function (DiscoveryV1beta1ApiApiKeys) {
DiscoveryV1beta1ApiApiKeys[DiscoveryV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(DiscoveryV1beta1ApiApiKeys = exports.DiscoveryV1beta1ApiApiKeys || (exports.DiscoveryV1beta1ApiApiKeys = {}));
class DiscoveryV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[DiscoveryV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1EndpointSlice")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind EndpointSlice
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/endpointslices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSliceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSliceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1EndpointSlice")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.DiscoveryV1beta1Api = DiscoveryV1beta1Api;
//# sourceMappingURL=discoveryV1beta1Api.js.map
/***/ }),
/***/ 89829:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsApi = exports.EventsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var EventsApiApiKeys;
(function (EventsApiApiKeys) {
EventsApiApiKeys[EventsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(EventsApiApiKeys = exports.EventsApiApiKeys || (exports.EventsApiApiKeys = {}));
class EventsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[EventsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.EventsApi = EventsApi;
//# sourceMappingURL=eventsApi.js.map
/***/ }),
/***/ 15621:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1Api = exports.EventsV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var EventsV1ApiApiKeys;
(function (EventsV1ApiApiKeys) {
EventsV1ApiApiKeys[EventsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(EventsV1ApiApiKeys = exports.EventsV1ApiApiKeys || (exports.EventsV1ApiApiKeys = {}));
class EventsV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[EventsV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "EventsV1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/events';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "EventsV1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.EventsV1Api = EventsV1Api;
//# sourceMappingURL=eventsV1Api.js.map
/***/ }),
/***/ 5821:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1beta1Api = exports.EventsV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var EventsV1beta1ApiApiKeys;
(function (EventsV1beta1ApiApiKeys) {
EventsV1beta1ApiApiKeys[EventsV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(EventsV1beta1ApiApiKeys = exports.EventsV1beta1ApiApiKeys || (exports.EventsV1beta1ApiApiKeys = {}));
class EventsV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[EventsV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/events';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.EventsV1beta1Api = EventsV1beta1Api;
//# sourceMappingURL=eventsV1beta1Api.js.map
/***/ }),
/***/ 16001:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.FlowcontrolApiserverApi = exports.FlowcontrolApiserverApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var FlowcontrolApiserverApiApiKeys;
(function (FlowcontrolApiserverApiApiKeys) {
FlowcontrolApiserverApiApiKeys[FlowcontrolApiserverApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(FlowcontrolApiserverApiApiKeys = exports.FlowcontrolApiserverApiApiKeys || (exports.FlowcontrolApiserverApiApiKeys = {}));
class FlowcontrolApiserverApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[FlowcontrolApiserverApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.FlowcontrolApiserverApi = FlowcontrolApiserverApi;
//# sourceMappingURL=flowcontrolApiserverApi.js.map
/***/ }),
/***/ 58365:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.FlowcontrolApiserverV1beta1Api = exports.FlowcontrolApiserverV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var FlowcontrolApiserverV1beta1ApiApiKeys;
(function (FlowcontrolApiserverV1beta1ApiApiKeys) {
FlowcontrolApiserverV1beta1ApiApiKeys[FlowcontrolApiserverV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(FlowcontrolApiserverV1beta1ApiApiKeys = exports.FlowcontrolApiserverV1beta1ApiApiKeys || (exports.FlowcontrolApiserverV1beta1ApiApiKeys = {}));
class FlowcontrolApiserverV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[FlowcontrolApiserverV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createFlowSchema(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionFlowSchema(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPriorityLevelConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a FlowSchema
* @param name name of the FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteFlowSchema(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deletePriorityLevelConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listFlowSchema(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchemaList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPriorityLevelConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfigurationList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified FlowSchema
* @param name name of the FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchFlowSchema(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchFlowSchema.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified FlowSchema
* @param name name of the FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchFlowSchemaStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchFlowSchemaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfigurationStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfigurationStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified FlowSchema
* @param name name of the FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
*/
async readFlowSchema(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified FlowSchema
* @param name name of the FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
*/
async readFlowSchemaStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readFlowSchemaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPriorityLevelConfiguration(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPriorityLevelConfigurationStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfigurationStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified FlowSchema
* @param name name of the FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceFlowSchema(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceFlowSchema.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified FlowSchema
* @param name name of the FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceFlowSchemaStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceFlowSchemaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfigurationStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfigurationStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.FlowcontrolApiserverV1beta1Api = FlowcontrolApiserverV1beta1Api;
//# sourceMappingURL=flowcontrolApiserverV1beta1Api.js.map
/***/ }),
/***/ 31857:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.InternalApiserverApi = exports.InternalApiserverApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var InternalApiserverApiApiKeys;
(function (InternalApiserverApiApiKeys) {
InternalApiserverApiApiKeys[InternalApiserverApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(InternalApiserverApiApiKeys = exports.InternalApiserverApiApiKeys || (exports.InternalApiserverApiApiKeys = {}));
class InternalApiserverApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[InternalApiserverApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.InternalApiserverApi = InternalApiserverApi;
//# sourceMappingURL=internalApiserverApi.js.map
/***/ }),
/***/ 76012:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.InternalApiserverV1alpha1Api = exports.InternalApiserverV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var InternalApiserverV1alpha1ApiApiKeys;
(function (InternalApiserverV1alpha1ApiApiKeys) {
InternalApiserverV1alpha1ApiApiKeys[InternalApiserverV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(InternalApiserverV1alpha1ApiApiKeys = exports.InternalApiserverV1alpha1ApiApiKeys || (exports.InternalApiserverV1alpha1ApiApiKeys = {}));
class InternalApiserverV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[InternalApiserverV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createStorageVersion(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionStorageVersion(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a StorageVersion
* @param name name of the StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteStorageVersion(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listStorageVersion(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified StorageVersion
* @param name name of the StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchStorageVersion(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchStorageVersion.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified StorageVersion
* @param name name of the StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchStorageVersionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchStorageVersionStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchStorageVersionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified StorageVersion
* @param name name of the StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
*/
async readStorageVersion(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified StorageVersion
* @param name name of the StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
*/
async readStorageVersionStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readStorageVersionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified StorageVersion
* @param name name of the StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceStorageVersion(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceStorageVersion.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified StorageVersion
* @param name name of the StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceStorageVersionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceStorageVersionStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceStorageVersionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.InternalApiserverV1alpha1Api = InternalApiserverV1alpha1Api;
//# sourceMappingURL=internalApiserverV1alpha1Api.js.map
/***/ }),
/***/ 88382:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.LogsApi = exports.LogsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
/* tslint:disable:no-unused-locals */
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var LogsApiApiKeys;
(function (LogsApiApiKeys) {
LogsApiApiKeys[LogsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(LogsApiApiKeys = exports.LogsApiApiKeys || (exports.LogsApiApiKeys = {}));
class LogsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[LogsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @param logpath path to the log
*/
async logFileHandler(logpath, options = { headers: {} }) {
const localVarPath = this.basePath + '/logs/{logpath}'
.replace('{' + 'logpath' + '}', encodeURIComponent(String(logpath)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
let localVarFormParams = {};
// verify required parameter 'logpath' is not null or undefined
if (logpath === null || logpath === undefined) {
throw new Error('Required parameter logpath was null or undefined when calling logFileHandler.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
*/
async logFileListHandler(options = { headers: {} }) {
const localVarPath = this.basePath + '/logs/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.LogsApi = LogsApi;
//# sourceMappingURL=logsApi.js.map
/***/ }),
/***/ 48169:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NetworkingApi = exports.NetworkingApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NetworkingApiApiKeys;
(function (NetworkingApiApiKeys) {
NetworkingApiApiKeys[NetworkingApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NetworkingApiApiKeys = exports.NetworkingApiApiKeys || (exports.NetworkingApiApiKeys = {}));
class NetworkingApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NetworkingApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NetworkingApi = NetworkingApi;
//# sourceMappingURL=networkingApi.js.map
/***/ }),
/***/ 97534:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NetworkingV1Api = exports.NetworkingV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NetworkingV1ApiApiKeys;
(function (NetworkingV1ApiApiKeys) {
NetworkingV1ApiApiKeys[NetworkingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NetworkingV1ApiApiKeys = exports.NetworkingV1ApiApiKeys || (exports.NetworkingV1ApiApiKeys = {}));
class NetworkingV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NetworkingV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an IngressClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createIngressClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1IngressClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create an Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedIngress.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Ingress")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedNetworkPolicy(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedNetworkPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1NetworkPolicy")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of IngressClass
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedNetworkPolicy(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an IngressClass
* @param name name of the IngressClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedIngress.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a NetworkPolicy
* @param name name of the NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedNetworkPolicy(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedNetworkPolicy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind IngressClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Ingress
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingresses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedNetworkPolicy(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicyList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind NetworkPolicy
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNetworkPolicyForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/networkpolicies';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicyList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified IngressClass
* @param name name of the IngressClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchIngressClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchIngressClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngress.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngress.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngressStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngressStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngressStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified NetworkPolicy
* @param name name of the NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedNetworkPolicy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedNetworkPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified IngressClass
* @param name name of the IngressClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readIngressClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedIngress(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedIngress.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedIngressStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngressStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified NetworkPolicy
* @param name name of the NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedNetworkPolicy(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedNetworkPolicy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified IngressClass
* @param name name of the IngressClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceIngressClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceIngressClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1IngressClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngress.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngress.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Ingress")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngressStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngressStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngressStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Ingress")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified NetworkPolicy
* @param name name of the NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedNetworkPolicy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedNetworkPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1NetworkPolicy")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NetworkingV1Api = NetworkingV1Api;
//# sourceMappingURL=networkingV1Api.js.map
/***/ }),
/***/ 31466:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeApi = exports.NodeApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NodeApiApiKeys;
(function (NodeApiApiKeys) {
NodeApiApiKeys[NodeApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NodeApiApiKeys = exports.NodeApiApiKeys || (exports.NodeApiApiKeys = {}));
class NodeApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NodeApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NodeApi = NodeApi;
//# sourceMappingURL=nodeApi.js.map
/***/ }),
/***/ 9090:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeV1Api = exports.NodeV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NodeV1ApiApiKeys;
(function (NodeV1ApiApiKeys) {
NodeV1ApiApiKeys[NodeV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NodeV1ApiApiKeys = exports.NodeV1ApiApiKeys || (exports.NodeV1ApiApiKeys = {}));
class NodeV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NodeV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readRuntimeClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NodeV1Api = NodeV1Api;
//# sourceMappingURL=nodeV1Api.js.map
/***/ }),
/***/ 17374:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeV1alpha1Api = exports.NodeV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NodeV1alpha1ApiApiKeys;
(function (NodeV1alpha1ApiApiKeys) {
NodeV1alpha1ApiApiKeys[NodeV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NodeV1alpha1ApiApiKeys = exports.NodeV1alpha1ApiApiKeys || (exports.NodeV1alpha1ApiApiKeys = {}));
class NodeV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NodeV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readRuntimeClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NodeV1alpha1Api = NodeV1alpha1Api;
//# sourceMappingURL=nodeV1alpha1Api.js.map
/***/ }),
/***/ 78504:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeV1beta1Api = exports.NodeV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NodeV1beta1ApiApiKeys;
(function (NodeV1beta1ApiApiKeys) {
NodeV1beta1ApiApiKeys[NodeV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NodeV1beta1ApiApiKeys = exports.NodeV1beta1ApiApiKeys || (exports.NodeV1beta1ApiApiKeys = {}));
class NodeV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NodeV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readRuntimeClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NodeV1beta1Api = NodeV1beta1Api;
//# sourceMappingURL=nodeV1beta1Api.js.map
/***/ }),
/***/ 5381:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OpenidApi = exports.OpenidApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
/* tslint:disable:no-unused-locals */
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var OpenidApiApiKeys;
(function (OpenidApiApiKeys) {
OpenidApiApiKeys[OpenidApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(OpenidApiApiKeys = exports.OpenidApiApiKeys || (exports.OpenidApiApiKeys = {}));
class OpenidApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[OpenidApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get service account issuer OpenID JSON Web Key Set (contains public token verification keys)
*/
async getServiceAccountIssuerOpenIDKeyset(options = { headers: {} }) {
const localVarPath = this.basePath + '/openid/v1/jwks/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/jwk-set+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.OpenidApi = OpenidApi;
//# sourceMappingURL=openidApi.js.map
/***/ }),
/***/ 37284:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PolicyApi = exports.PolicyApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var PolicyApiApiKeys;
(function (PolicyApiApiKeys) {
PolicyApiApiKeys[PolicyApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(PolicyApiApiKeys = exports.PolicyApiApiKeys || (exports.PolicyApiApiKeys = {}));
class PolicyApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[PolicyApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.PolicyApi = PolicyApi;
//# sourceMappingURL=policyApi.js.map
/***/ }),
/***/ 87307:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PolicyV1Api = exports.PolicyV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var PolicyV1ApiApiKeys;
(function (PolicyV1ApiApiKeys) {
PolicyV1ApiApiKeys[PolicyV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(PolicyV1ApiApiKeys = exports.PolicyV1ApiApiKeys || (exports.PolicyV1ApiApiKeys = {}));
class PolicyV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[PolicyV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudgetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodDisruptionBudget
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/poddisruptionbudgets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudgetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.PolicyV1Api = PolicyV1Api;
//# sourceMappingURL=policyV1Api.js.map
/***/ }),
/***/ 80228:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PolicyV1beta1Api = exports.PolicyV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var PolicyV1beta1ApiApiKeys;
(function (PolicyV1beta1ApiApiKeys) {
PolicyV1beta1ApiApiKeys[PolicyV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(PolicyV1beta1ApiApiKeys = exports.PolicyV1beta1ApiApiKeys || (exports.PolicyV1beta1ApiApiKeys = {}));
class PolicyV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[PolicyV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PodSecurityPolicy
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPodSecurityPolicy(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodSecurityPolicy")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PodSecurityPolicy
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPodSecurityPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PodSecurityPolicy
* @param name name of the PodSecurityPolicy
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deletePodSecurityPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodDisruptionBudget
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/poddisruptionbudgets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodSecurityPolicy
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodSecurityPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicyList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PodSecurityPolicy
* @param name name of the PodSecurityPolicy
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPodSecurityPolicy(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPodSecurityPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PodSecurityPolicy
* @param name name of the PodSecurityPolicy
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPodSecurityPolicy(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PodSecurityPolicy
* @param name name of the PodSecurityPolicy
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePodSecurityPolicy(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePodSecurityPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodSecurityPolicy")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.PolicyV1beta1Api = PolicyV1beta1Api;
//# sourceMappingURL=policyV1beta1Api.js.map
/***/ }),
/***/ 73316:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RbacAuthorizationApi = exports.RbacAuthorizationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var RbacAuthorizationApiApiKeys;
(function (RbacAuthorizationApiApiKeys) {
RbacAuthorizationApiApiKeys[RbacAuthorizationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(RbacAuthorizationApiApiKeys = exports.RbacAuthorizationApiApiKeys || (exports.RbacAuthorizationApiApiKeys = {}));
class RbacAuthorizationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[RbacAuthorizationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.RbacAuthorizationApi = RbacAuthorizationApi;
//# sourceMappingURL=rbacAuthorizationApi.js.map
/***/ }),
/***/ 93149:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RbacAuthorizationV1Api = exports.RbacAuthorizationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var RbacAuthorizationV1ApiApiKeys;
(function (RbacAuthorizationV1ApiApiKeys) {
RbacAuthorizationV1ApiApiKeys[RbacAuthorizationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(RbacAuthorizationV1ApiApiKeys = exports.RbacAuthorizationV1ApiApiKeys || (exports.RbacAuthorizationV1ApiApiKeys = {}));
class RbacAuthorizationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[RbacAuthorizationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ClusterRole")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ClusterRoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Role")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1RoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ClusterRole
* @param name name of the ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RoleBinding
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/rolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Role
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/roles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ClusterRole
* @param name name of the ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ClusterRole
* @param name name of the ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
*/
async readClusterRole(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
*/
async readClusterRoleBinding(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ClusterRole
* @param name name of the ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ClusterRole")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ClusterRoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Role")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1RoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.RbacAuthorizationV1Api = RbacAuthorizationV1Api;
//# sourceMappingURL=rbacAuthorizationV1Api.js.map
/***/ }),
/***/ 44056:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RbacAuthorizationV1alpha1Api = exports.RbacAuthorizationV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var RbacAuthorizationV1alpha1ApiApiKeys;
(function (RbacAuthorizationV1alpha1ApiApiKeys) {
RbacAuthorizationV1alpha1ApiApiKeys[RbacAuthorizationV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(RbacAuthorizationV1alpha1ApiApiKeys = exports.RbacAuthorizationV1alpha1ApiApiKeys || (exports.RbacAuthorizationV1alpha1ApiApiKeys = {}));
class RbacAuthorizationV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[RbacAuthorizationV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRole")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1Role")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1RoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ClusterRole
* @param name name of the ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RoleBinding
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Role
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/roles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ClusterRole
* @param name name of the ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ClusterRole
* @param name name of the ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
*/
async readClusterRole(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
*/
async readClusterRoleBinding(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ClusterRole
* @param name name of the ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRole")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1Role")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1RoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.RbacAuthorizationV1alpha1Api = RbacAuthorizationV1alpha1Api;
//# sourceMappingURL=rbacAuthorizationV1alpha1Api.js.map
/***/ }),
/***/ 29389:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SchedulingApi = exports.SchedulingApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var SchedulingApiApiKeys;
(function (SchedulingApiApiKeys) {
SchedulingApiApiKeys[SchedulingApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(SchedulingApiApiKeys = exports.SchedulingApiApiKeys || (exports.SchedulingApiApiKeys = {}));
class SchedulingApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[SchedulingApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.SchedulingApi = SchedulingApi;
//# sourceMappingURL=schedulingApi.js.map
/***/ }),
/***/ 26757:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SchedulingV1Api = exports.SchedulingV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var SchedulingV1ApiApiKeys;
(function (SchedulingV1ApiApiKeys) {
SchedulingV1ApiApiKeys[SchedulingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(SchedulingV1ApiApiKeys = exports.SchedulingV1ApiApiKeys || (exports.SchedulingV1ApiApiKeys = {}));
class SchedulingV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[SchedulingV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PriorityClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PriorityClass
* @param name name of the PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PriorityClass
* @param name name of the PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PriorityClass
* @param name name of the PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPriorityClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PriorityClass
* @param name name of the PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PriorityClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.SchedulingV1Api = SchedulingV1Api;
//# sourceMappingURL=schedulingV1Api.js.map
/***/ }),
/***/ 91655:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SchedulingV1alpha1Api = exports.SchedulingV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var SchedulingV1alpha1ApiApiKeys;
(function (SchedulingV1alpha1ApiApiKeys) {
SchedulingV1alpha1ApiApiKeys[SchedulingV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(SchedulingV1alpha1ApiApiKeys = exports.SchedulingV1alpha1ApiApiKeys || (exports.SchedulingV1alpha1ApiApiKeys = {}));
class SchedulingV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[SchedulingV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1PriorityClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PriorityClass
* @param name name of the PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PriorityClass
* @param name name of the PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PriorityClass
* @param name name of the PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPriorityClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PriorityClass
* @param name name of the PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1PriorityClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.SchedulingV1alpha1Api = SchedulingV1alpha1Api;
//# sourceMappingURL=schedulingV1alpha1Api.js.map
/***/ }),
/***/ 91143:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageApi = exports.StorageApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var StorageApiApiKeys;
(function (StorageApiApiKeys) {
StorageApiApiKeys[StorageApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(StorageApiApiKeys = exports.StorageApiApiKeys || (exports.StorageApiApiKeys = {}));
class StorageApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[StorageApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.StorageApi = StorageApi;
//# sourceMappingURL=storageApi.js.map
/***/ }),
/***/ 922:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageV1Api = exports.StorageV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var StorageV1ApiApiKeys;
(function (StorageV1ApiApiKeys) {
StorageV1ApiApiKeys[StorageV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(StorageV1ApiApiKeys = exports.StorageV1ApiApiKeys || (exports.StorageV1ApiApiKeys = {}));
class StorageV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[StorageV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CSIDriver
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createCSIDriver(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CSIDriver")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a CSINode
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createCSINode(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CSINode")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a StorageClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createStorageClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StorageClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CSIDriver
* @param name name of the CSIDriver
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CSINode
* @param name name of the CSINode
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CSIDriver
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CSINode
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of StorageClass
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a StorageClass
* @param name name of the StorageClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIDriver
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriverList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSINode
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINodeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind StorageClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachmentList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CSIDriver
* @param name name of the CSIDriver
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCSIDriver(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCSIDriver.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CSINode
* @param name name of the CSINode
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCSINode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCSINode.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified StorageClass
* @param name name of the StorageClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchStorageClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchStorageClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachmentStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachmentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CSIDriver
* @param name name of the CSIDriver
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCSIDriver(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CSINode
* @param name name of the CSINode
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCSINode(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified StorageClass
* @param name name of the StorageClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readStorageClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
*/
async readVolumeAttachment(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
*/
async readVolumeAttachmentStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readVolumeAttachmentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CSIDriver
* @param name name of the CSIDriver
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCSIDriver(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCSIDriver.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CSIDriver")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CSINode
* @param name name of the CSINode
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCSINode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCSINode.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CSINode")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified StorageClass
* @param name name of the StorageClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceStorageClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceStorageClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StorageClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachmentStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachmentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.StorageV1Api = StorageV1Api;
//# sourceMappingURL=storageV1Api.js.map
/***/ }),
/***/ 30769:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageV1alpha1Api = exports.StorageV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var StorageV1alpha1ApiApiKeys;
(function (StorageV1alpha1ApiApiKeys) {
StorageV1alpha1ApiApiKeys[StorageV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(StorageV1alpha1ApiApiKeys = exports.StorageV1alpha1ApiApiKeys || (exports.StorageV1alpha1ApiApiKeys = {}));
class StorageV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[StorageV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1CSIStorageCapacity")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIStorageCapacity
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/csistoragecapacities';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacityList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacityList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachmentList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
*/
async readVolumeAttachment(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1CSIStorageCapacity")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.StorageV1alpha1Api = StorageV1alpha1Api;
//# sourceMappingURL=storageV1alpha1Api.js.map
/***/ }),
/***/ 73491:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageV1beta1Api = exports.StorageV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var StorageV1beta1ApiApiKeys;
(function (StorageV1beta1ApiApiKeys) {
StorageV1beta1ApiApiKeys[StorageV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(StorageV1beta1ApiApiKeys = exports.StorageV1beta1ApiApiKeys || (exports.StorageV1beta1ApiApiKeys = {}));
class StorageV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[StorageV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIStorageCapacity")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @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.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @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.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @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.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param 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.
* @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.
* @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.
* @param body
*/
async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIStorageCapacity
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csistoragecapacities';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacityList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @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.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @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.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacityList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIStorageCapacity")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.StorageV1beta1Api = StorageV1beta1Api;
//# sourceMappingURL=storageV1beta1Api.js.map
/***/ }),
/***/ 4441:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.VersionApi = exports.VersionApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var VersionApiApiKeys;
(function (VersionApiApiKeys) {
VersionApiApiKeys[VersionApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(VersionApiApiKeys = exports.VersionApiApiKeys || (exports.VersionApiApiKeys = {}));
class VersionApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[VersionApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get the code version
*/
async getCode(options = { headers: {} }) {
const localVarPath = this.basePath + '/version/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "VersionInfo");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.VersionApi = VersionApi;
//# sourceMappingURL=versionApi.js.map
/***/ }),
/***/ 19868:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.WellKnownApi = exports.WellKnownApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(67551);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
/* tslint:disable:no-unused-locals */
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var WellKnownApiApiKeys;
(function (WellKnownApiApiKeys) {
WellKnownApiApiKeys[WellKnownApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(WellKnownApiApiKeys = exports.WellKnownApiApiKeys || (exports.WellKnownApiApiKeys = {}));
class WellKnownApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[WellKnownApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get service account issuer OpenID configuration, also known as the \'OIDC discovery doc\'
*/
async getServiceAccountIssuerOpenIDConfiguration(options = { headers: {} }) {
const localVarPath = this.basePath + '/.well-known/openid-configuration/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.WellKnownApi = WellKnownApi;
//# sourceMappingURL=wellKnownApi.js.map
/***/ }),
/***/ 21616:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AdmissionregistrationV1ServiceReference = void 0;
/**
* ServiceReference holds a reference to Service.legacy.k8s.io
*/
class AdmissionregistrationV1ServiceReference {
static getAttributeTypeMap() {
return AdmissionregistrationV1ServiceReference.attributeTypeMap;
}
}
exports.AdmissionregistrationV1ServiceReference = AdmissionregistrationV1ServiceReference;
AdmissionregistrationV1ServiceReference.discriminator = undefined;
AdmissionregistrationV1ServiceReference.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
}
];
//# sourceMappingURL=admissionregistrationV1ServiceReference.js.map
/***/ }),
/***/ 7818:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AdmissionregistrationV1WebhookClientConfig = void 0;
/**
* WebhookClientConfig contains the information to make a TLS connection with the webhook
*/
class AdmissionregistrationV1WebhookClientConfig {
static getAttributeTypeMap() {
return AdmissionregistrationV1WebhookClientConfig.attributeTypeMap;
}
}
exports.AdmissionregistrationV1WebhookClientConfig = AdmissionregistrationV1WebhookClientConfig;
AdmissionregistrationV1WebhookClientConfig.discriminator = undefined;
AdmissionregistrationV1WebhookClientConfig.attributeTypeMap = [
{
"name": "caBundle",
"baseName": "caBundle",
"type": "string"
},
{
"name": "service",
"baseName": "service",
"type": "AdmissionregistrationV1ServiceReference"
},
{
"name": "url",
"baseName": "url",
"type": "string"
}
];
//# sourceMappingURL=admissionregistrationV1WebhookClientConfig.js.map
/***/ }),
/***/ 63536:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiextensionsV1ServiceReference = void 0;
/**
* ServiceReference holds a reference to Service.legacy.k8s.io
*/
class ApiextensionsV1ServiceReference {
static getAttributeTypeMap() {
return ApiextensionsV1ServiceReference.attributeTypeMap;
}
}
exports.ApiextensionsV1ServiceReference = ApiextensionsV1ServiceReference;
ApiextensionsV1ServiceReference.discriminator = undefined;
ApiextensionsV1ServiceReference.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
}
];
//# sourceMappingURL=apiextensionsV1ServiceReference.js.map
/***/ }),
/***/ 22775:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiextensionsV1WebhookClientConfig = void 0;
/**
* WebhookClientConfig contains the information to make a TLS connection with the webhook.
*/
class ApiextensionsV1WebhookClientConfig {
static getAttributeTypeMap() {
return ApiextensionsV1WebhookClientConfig.attributeTypeMap;
}
}
exports.ApiextensionsV1WebhookClientConfig = ApiextensionsV1WebhookClientConfig;
ApiextensionsV1WebhookClientConfig.discriminator = undefined;
ApiextensionsV1WebhookClientConfig.attributeTypeMap = [
{
"name": "caBundle",
"baseName": "caBundle",
"type": "string"
},
{
"name": "service",
"baseName": "service",
"type": "ApiextensionsV1ServiceReference"
},
{
"name": "url",
"baseName": "url",
"type": "string"
}
];
//# sourceMappingURL=apiextensionsV1WebhookClientConfig.js.map
/***/ }),
/***/ 37492:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiregistrationV1ServiceReference = void 0;
/**
* ServiceReference holds a reference to Service.legacy.k8s.io
*/
class ApiregistrationV1ServiceReference {
static getAttributeTypeMap() {
return ApiregistrationV1ServiceReference.attributeTypeMap;
}
}
exports.ApiregistrationV1ServiceReference = ApiregistrationV1ServiceReference;
ApiregistrationV1ServiceReference.discriminator = undefined;
ApiregistrationV1ServiceReference.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
}
];
//# sourceMappingURL=apiregistrationV1ServiceReference.js.map
/***/ }),
/***/ 25429:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthenticationV1TokenRequest = void 0;
/**
* TokenRequest requests a token for a given service account.
*/
class AuthenticationV1TokenRequest {
static getAttributeTypeMap() {
return AuthenticationV1TokenRequest.attributeTypeMap;
}
}
exports.AuthenticationV1TokenRequest = AuthenticationV1TokenRequest;
AuthenticationV1TokenRequest.discriminator = undefined;
AuthenticationV1TokenRequest.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1TokenRequestSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1TokenRequestStatus"
}
];
//# sourceMappingURL=authenticationV1TokenRequest.js.map
/***/ }),
/***/ 81950:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1EndpointPort = void 0;
/**
* EndpointPort is a tuple that describes a single port.
*/
class CoreV1EndpointPort {
static getAttributeTypeMap() {
return CoreV1EndpointPort.attributeTypeMap;
}
}
exports.CoreV1EndpointPort = CoreV1EndpointPort;
CoreV1EndpointPort.discriminator = undefined;
CoreV1EndpointPort.attributeTypeMap = [
{
"name": "appProtocol",
"baseName": "appProtocol",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
},
{
"name": "protocol",
"baseName": "protocol",
"type": "string"
}
];
//# sourceMappingURL=coreV1EndpointPort.js.map
/***/ }),
/***/ 42735:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1Event = void 0;
/**
* Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
*/
class CoreV1Event {
static getAttributeTypeMap() {
return CoreV1Event.attributeTypeMap;
}
}
exports.CoreV1Event = CoreV1Event;
CoreV1Event.discriminator = undefined;
CoreV1Event.attributeTypeMap = [
{
"name": "action",
"baseName": "action",
"type": "string"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "count",
"baseName": "count",
"type": "number"
},
{
"name": "eventTime",
"baseName": "eventTime",
"type": "Date"
},
{
"name": "firstTimestamp",
"baseName": "firstTimestamp",
"type": "Date"
},
{
"name": "involvedObject",
"baseName": "involvedObject",
"type": "V1ObjectReference"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "lastTimestamp",
"baseName": "lastTimestamp",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "related",
"baseName": "related",
"type": "V1ObjectReference"
},
{
"name": "reportingComponent",
"baseName": "reportingComponent",
"type": "string"
},
{
"name": "reportingInstance",
"baseName": "reportingInstance",
"type": "string"
},
{
"name": "series",
"baseName": "series",
"type": "CoreV1EventSeries"
},
{
"name": "source",
"baseName": "source",
"type": "V1EventSource"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=coreV1Event.js.map
/***/ }),
/***/ 12368:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1EventList = void 0;
/**
* EventList is a list of events.
*/
class CoreV1EventList {
static getAttributeTypeMap() {
return CoreV1EventList.attributeTypeMap;
}
}
exports.CoreV1EventList = CoreV1EventList;
CoreV1EventList.discriminator = undefined;
CoreV1EventList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=coreV1EventList.js.map
/***/ }),
/***/ 70438:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1EventSeries = void 0;
/**
* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.
*/
class CoreV1EventSeries {
static getAttributeTypeMap() {
return CoreV1EventSeries.attributeTypeMap;
}
}
exports.CoreV1EventSeries = CoreV1EventSeries;
CoreV1EventSeries.discriminator = undefined;
CoreV1EventSeries.attributeTypeMap = [
{
"name": "count",
"baseName": "count",
"type": "number"
},
{
"name": "lastObservedTime",
"baseName": "lastObservedTime",
"type": "Date"
}
];
//# sourceMappingURL=coreV1EventSeries.js.map
/***/ }),
/***/ 75853:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DiscoveryV1EndpointPort = void 0;
/**
* EndpointPort represents a Port used by an EndpointSlice
*/
class DiscoveryV1EndpointPort {
static getAttributeTypeMap() {
return DiscoveryV1EndpointPort.attributeTypeMap;
}
}
exports.DiscoveryV1EndpointPort = DiscoveryV1EndpointPort;
DiscoveryV1EndpointPort.discriminator = undefined;
DiscoveryV1EndpointPort.attributeTypeMap = [
{
"name": "appProtocol",
"baseName": "appProtocol",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
},
{
"name": "protocol",
"baseName": "protocol",
"type": "string"
}
];
//# sourceMappingURL=discoveryV1EndpointPort.js.map
/***/ }),
/***/ 52191:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1Event = void 0;
/**
* Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
*/
class EventsV1Event {
static getAttributeTypeMap() {
return EventsV1Event.attributeTypeMap;
}
}
exports.EventsV1Event = EventsV1Event;
EventsV1Event.discriminator = undefined;
EventsV1Event.attributeTypeMap = [
{
"name": "action",
"baseName": "action",
"type": "string"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "deprecatedCount",
"baseName": "deprecatedCount",
"type": "number"
},
{
"name": "deprecatedFirstTimestamp",
"baseName": "deprecatedFirstTimestamp",
"type": "Date"
},
{
"name": "deprecatedLastTimestamp",
"baseName": "deprecatedLastTimestamp",
"type": "Date"
},
{
"name": "deprecatedSource",
"baseName": "deprecatedSource",
"type": "V1EventSource"
},
{
"name": "eventTime",
"baseName": "eventTime",
"type": "Date"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "note",
"baseName": "note",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "regarding",
"baseName": "regarding",
"type": "V1ObjectReference"
},
{
"name": "related",
"baseName": "related",
"type": "V1ObjectReference"
},
{
"name": "reportingController",
"baseName": "reportingController",
"type": "string"
},
{
"name": "reportingInstance",
"baseName": "reportingInstance",
"type": "string"
},
{
"name": "series",
"baseName": "series",
"type": "EventsV1EventSeries"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=eventsV1Event.js.map
/***/ }),
/***/ 1051:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1EventList = void 0;
/**
* EventList is a list of Event objects.
*/
class EventsV1EventList {
static getAttributeTypeMap() {
return EventsV1EventList.attributeTypeMap;
}
}
exports.EventsV1EventList = EventsV1EventList;
EventsV1EventList.discriminator = undefined;
EventsV1EventList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=eventsV1EventList.js.map
/***/ }),
/***/ 10000:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1EventSeries = void 0;
/**
* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations.
*/
class EventsV1EventSeries {
static getAttributeTypeMap() {
return EventsV1EventSeries.attributeTypeMap;
}
}
exports.EventsV1EventSeries = EventsV1EventSeries;
EventsV1EventSeries.discriminator = undefined;
EventsV1EventSeries.attributeTypeMap = [
{
"name": "count",
"baseName": "count",
"type": "number"
},
{
"name": "lastObservedTime",
"baseName": "lastObservedTime",
"type": "Date"
}
];
//# sourceMappingURL=eventsV1EventSeries.js.map
/***/ }),
/***/ 15158:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.VoidAuth = exports.OAuth = exports.ApiKeyAuth = exports.HttpBearerAuth = exports.HttpBasicAuth = exports.ObjectSerializer = void 0;
const tslib_1 = __nccwpck_require__(67551);
tslib_1.__exportStar(__nccwpck_require__(21616), exports);
tslib_1.__exportStar(__nccwpck_require__(7818), exports);
tslib_1.__exportStar(__nccwpck_require__(63536), exports);
tslib_1.__exportStar(__nccwpck_require__(22775), exports);
tslib_1.__exportStar(__nccwpck_require__(37492), exports);
tslib_1.__exportStar(__nccwpck_require__(25429), exports);
tslib_1.__exportStar(__nccwpck_require__(81950), exports);
tslib_1.__exportStar(__nccwpck_require__(42735), exports);
tslib_1.__exportStar(__nccwpck_require__(12368), exports);
tslib_1.__exportStar(__nccwpck_require__(70438), exports);
tslib_1.__exportStar(__nccwpck_require__(75853), exports);
tslib_1.__exportStar(__nccwpck_require__(52191), exports);
tslib_1.__exportStar(__nccwpck_require__(1051), exports);
tslib_1.__exportStar(__nccwpck_require__(10000), exports);
tslib_1.__exportStar(__nccwpck_require__(25958), exports);
tslib_1.__exportStar(__nccwpck_require__(44481), exports);
tslib_1.__exportStar(__nccwpck_require__(52906), exports);
tslib_1.__exportStar(__nccwpck_require__(89033), exports);
tslib_1.__exportStar(__nccwpck_require__(5454), exports);
tslib_1.__exportStar(__nccwpck_require__(99042), exports);
tslib_1.__exportStar(__nccwpck_require__(58352), exports);
tslib_1.__exportStar(__nccwpck_require__(87198), exports);
tslib_1.__exportStar(__nccwpck_require__(61496), exports);
tslib_1.__exportStar(__nccwpck_require__(17883), exports);
tslib_1.__exportStar(__nccwpck_require__(93135), exports);
tslib_1.__exportStar(__nccwpck_require__(39808), exports);
tslib_1.__exportStar(__nccwpck_require__(61957), exports);
tslib_1.__exportStar(__nccwpck_require__(90312), exports);
tslib_1.__exportStar(__nccwpck_require__(97069), exports);
tslib_1.__exportStar(__nccwpck_require__(91312), exports);
tslib_1.__exportStar(__nccwpck_require__(23694), exports);
tslib_1.__exportStar(__nccwpck_require__(95073), exports);
tslib_1.__exportStar(__nccwpck_require__(48551), exports);
tslib_1.__exportStar(__nccwpck_require__(68849), exports);
tslib_1.__exportStar(__nccwpck_require__(34144), exports);
tslib_1.__exportStar(__nccwpck_require__(84881), exports);
tslib_1.__exportStar(__nccwpck_require__(11582), exports);
tslib_1.__exportStar(__nccwpck_require__(74315), exports);
tslib_1.__exportStar(__nccwpck_require__(90288), exports);
tslib_1.__exportStar(__nccwpck_require__(24000), exports);
tslib_1.__exportStar(__nccwpck_require__(75636), exports);
tslib_1.__exportStar(__nccwpck_require__(98367), exports);
tslib_1.__exportStar(__nccwpck_require__(87598), exports);
tslib_1.__exportStar(__nccwpck_require__(82975), exports);
tslib_1.__exportStar(__nccwpck_require__(14268), exports);
tslib_1.__exportStar(__nccwpck_require__(84957), exports);
tslib_1.__exportStar(__nccwpck_require__(99084), exports);
tslib_1.__exportStar(__nccwpck_require__(92932), exports);
tslib_1.__exportStar(__nccwpck_require__(31530), exports);
tslib_1.__exportStar(__nccwpck_require__(37759), exports);
tslib_1.__exportStar(__nccwpck_require__(38285), exports);
tslib_1.__exportStar(__nccwpck_require__(41888), exports);
tslib_1.__exportStar(__nccwpck_require__(19111), exports);
tslib_1.__exportStar(__nccwpck_require__(33913), exports);
tslib_1.__exportStar(__nccwpck_require__(61458), exports);
tslib_1.__exportStar(__nccwpck_require__(32315), exports);
tslib_1.__exportStar(__nccwpck_require__(21181), exports);
tslib_1.__exportStar(__nccwpck_require__(95532), exports);
tslib_1.__exportStar(__nccwpck_require__(30578), exports);
tslib_1.__exportStar(__nccwpck_require__(2047), exports);
tslib_1.__exportStar(__nccwpck_require__(38596), exports);
tslib_1.__exportStar(__nccwpck_require__(34990), exports);
tslib_1.__exportStar(__nccwpck_require__(42874), exports);
tslib_1.__exportStar(__nccwpck_require__(99685), exports);
tslib_1.__exportStar(__nccwpck_require__(62892), exports);
tslib_1.__exportStar(__nccwpck_require__(80512), exports);
tslib_1.__exportStar(__nccwpck_require__(56709), exports);
tslib_1.__exportStar(__nccwpck_require__(61682), exports);
tslib_1.__exportStar(__nccwpck_require__(59708), exports);
tslib_1.__exportStar(__nccwpck_require__(52865), exports);
tslib_1.__exportStar(__nccwpck_require__(13501), exports);
tslib_1.__exportStar(__nccwpck_require__(50217), exports);
tslib_1.__exportStar(__nccwpck_require__(83765), exports);
tslib_1.__exportStar(__nccwpck_require__(89767), exports);
tslib_1.__exportStar(__nccwpck_require__(27892), exports);
tslib_1.__exportStar(__nccwpck_require__(19716), exports);
tslib_1.__exportStar(__nccwpck_require__(35980), exports);
tslib_1.__exportStar(__nccwpck_require__(78405), exports);
tslib_1.__exportStar(__nccwpck_require__(66304), exports);
tslib_1.__exportStar(__nccwpck_require__(54382), exports);
tslib_1.__exportStar(__nccwpck_require__(72565), exports);
tslib_1.__exportStar(__nccwpck_require__(7011), exports);
tslib_1.__exportStar(__nccwpck_require__(24600), exports);
tslib_1.__exportStar(__nccwpck_require__(34233), exports);
tslib_1.__exportStar(__nccwpck_require__(94346), exports);
tslib_1.__exportStar(__nccwpck_require__(9731), exports);
tslib_1.__exportStar(__nccwpck_require__(40325), exports);
tslib_1.__exportStar(__nccwpck_require__(32791), exports);
tslib_1.__exportStar(__nccwpck_require__(10486), exports);
tslib_1.__exportStar(__nccwpck_require__(69798), exports);
tslib_1.__exportStar(__nccwpck_require__(20486), exports);
tslib_1.__exportStar(__nccwpck_require__(25713), exports);
tslib_1.__exportStar(__nccwpck_require__(82283), exports);
tslib_1.__exportStar(__nccwpck_require__(98087), exports);
tslib_1.__exportStar(__nccwpck_require__(94579), exports);
tslib_1.__exportStar(__nccwpck_require__(25408), exports);
tslib_1.__exportStar(__nccwpck_require__(37060), exports);
tslib_1.__exportStar(__nccwpck_require__(32699), exports);
tslib_1.__exportStar(__nccwpck_require__(77063), exports);
tslib_1.__exportStar(__nccwpck_require__(173), exports);
tslib_1.__exportStar(__nccwpck_require__(44560), exports);
tslib_1.__exportStar(__nccwpck_require__(87510), exports);
tslib_1.__exportStar(__nccwpck_require__(48451), exports);
tslib_1.__exportStar(__nccwpck_require__(18029), exports);
tslib_1.__exportStar(__nccwpck_require__(65310), exports);
tslib_1.__exportStar(__nccwpck_require__(95602), exports);
tslib_1.__exportStar(__nccwpck_require__(81364), exports);
tslib_1.__exportStar(__nccwpck_require__(41298), exports);
tslib_1.__exportStar(__nccwpck_require__(55398), exports);
tslib_1.__exportStar(__nccwpck_require__(34981), exports);
tslib_1.__exportStar(__nccwpck_require__(38099), exports);
tslib_1.__exportStar(__nccwpck_require__(78901), exports);
tslib_1.__exportStar(__nccwpck_require__(19562), exports);
tslib_1.__exportStar(__nccwpck_require__(11672), exports);
tslib_1.__exportStar(__nccwpck_require__(17252), exports);
tslib_1.__exportStar(__nccwpck_require__(57151), exports);
tslib_1.__exportStar(__nccwpck_require__(70435), exports);
tslib_1.__exportStar(__nccwpck_require__(97000), exports);
tslib_1.__exportStar(__nccwpck_require__(53708), exports);
tslib_1.__exportStar(__nccwpck_require__(6223), exports);
tslib_1.__exportStar(__nccwpck_require__(31925), exports);
tslib_1.__exportStar(__nccwpck_require__(13449), exports);
tslib_1.__exportStar(__nccwpck_require__(69906), exports);
tslib_1.__exportStar(__nccwpck_require__(23074), exports);
tslib_1.__exportStar(__nccwpck_require__(36874), exports);
tslib_1.__exportStar(__nccwpck_require__(17205), exports);
tslib_1.__exportStar(__nccwpck_require__(32671), exports);
tslib_1.__exportStar(__nccwpck_require__(90017), exports);
tslib_1.__exportStar(__nccwpck_require__(97764), exports);
tslib_1.__exportStar(__nccwpck_require__(87969), exports);
tslib_1.__exportStar(__nccwpck_require__(13313), exports);
tslib_1.__exportStar(__nccwpck_require__(77213), exports);
tslib_1.__exportStar(__nccwpck_require__(35093), exports);
tslib_1.__exportStar(__nccwpck_require__(91874), exports);
tslib_1.__exportStar(__nccwpck_require__(16690), exports);
tslib_1.__exportStar(__nccwpck_require__(10414), exports);
tslib_1.__exportStar(__nccwpck_require__(3439), exports);
tslib_1.__exportStar(__nccwpck_require__(1016), exports);
tslib_1.__exportStar(__nccwpck_require__(27584), exports);
tslib_1.__exportStar(__nccwpck_require__(97617), exports);
tslib_1.__exportStar(__nccwpck_require__(37426), exports);
tslib_1.__exportStar(__nccwpck_require__(87855), exports);
tslib_1.__exportStar(__nccwpck_require__(16636), exports);
tslib_1.__exportStar(__nccwpck_require__(3437), exports);
tslib_1.__exportStar(__nccwpck_require__(86769), exports);
tslib_1.__exportStar(__nccwpck_require__(56219), exports);
tslib_1.__exportStar(__nccwpck_require__(95179), exports);
tslib_1.__exportStar(__nccwpck_require__(93652), exports);
tslib_1.__exportStar(__nccwpck_require__(17024), exports);
tslib_1.__exportStar(__nccwpck_require__(49823), exports);
tslib_1.__exportStar(__nccwpck_require__(50910), exports);
tslib_1.__exportStar(__nccwpck_require__(72796), exports);
tslib_1.__exportStar(__nccwpck_require__(69225), exports);
tslib_1.__exportStar(__nccwpck_require__(49202), exports);
tslib_1.__exportStar(__nccwpck_require__(83570), exports);
tslib_1.__exportStar(__nccwpck_require__(68021), exports);
tslib_1.__exportStar(__nccwpck_require__(32492), exports);
tslib_1.__exportStar(__nccwpck_require__(44340), exports);
tslib_1.__exportStar(__nccwpck_require__(93865), exports);
tslib_1.__exportStar(__nccwpck_require__(76125), exports);
tslib_1.__exportStar(__nccwpck_require__(76672), exports);
tslib_1.__exportStar(__nccwpck_require__(92069), exports);
tslib_1.__exportStar(__nccwpck_require__(43693), exports);
tslib_1.__exportStar(__nccwpck_require__(89541), exports);
tslib_1.__exportStar(__nccwpck_require__(62476), exports);
tslib_1.__exportStar(__nccwpck_require__(59689), exports);
tslib_1.__exportStar(__nccwpck_require__(45830), exports);
tslib_1.__exportStar(__nccwpck_require__(23037), exports);
tslib_1.__exportStar(__nccwpck_require__(63580), exports);
tslib_1.__exportStar(__nccwpck_require__(91260), exports);
tslib_1.__exportStar(__nccwpck_require__(94069), exports);
tslib_1.__exportStar(__nccwpck_require__(13366), exports);
tslib_1.__exportStar(__nccwpck_require__(32400), exports);
tslib_1.__exportStar(__nccwpck_require__(57345), exports);
tslib_1.__exportStar(__nccwpck_require__(96227), exports);
tslib_1.__exportStar(__nccwpck_require__(23549), exports);
tslib_1.__exportStar(__nccwpck_require__(22567), exports);
tslib_1.__exportStar(__nccwpck_require__(50993), exports);
tslib_1.__exportStar(__nccwpck_require__(98844), exports);
tslib_1.__exportStar(__nccwpck_require__(76838), exports);
tslib_1.__exportStar(__nccwpck_require__(44603), exports);
tslib_1.__exportStar(__nccwpck_require__(41500), exports);
tslib_1.__exportStar(__nccwpck_require__(86280), exports);
tslib_1.__exportStar(__nccwpck_require__(91128), exports);
tslib_1.__exportStar(__nccwpck_require__(82578), exports);
tslib_1.__exportStar(__nccwpck_require__(83039), exports);
tslib_1.__exportStar(__nccwpck_require__(88593), exports);
tslib_1.__exportStar(__nccwpck_require__(25667), exports);
tslib_1.__exportStar(__nccwpck_require__(46630), exports);
tslib_1.__exportStar(__nccwpck_require__(12229), exports);
tslib_1.__exportStar(__nccwpck_require__(31674), exports);
tslib_1.__exportStar(__nccwpck_require__(72729), exports);
tslib_1.__exportStar(__nccwpck_require__(82187), exports);
tslib_1.__exportStar(__nccwpck_require__(95354), exports);
tslib_1.__exportStar(__nccwpck_require__(2006), exports);
tslib_1.__exportStar(__nccwpck_require__(22665), exports);
tslib_1.__exportStar(__nccwpck_require__(35432), exports);
tslib_1.__exportStar(__nccwpck_require__(95469), exports);
tslib_1.__exportStar(__nccwpck_require__(314), exports);
tslib_1.__exportStar(__nccwpck_require__(22366), exports);
tslib_1.__exportStar(__nccwpck_require__(49076), exports);
tslib_1.__exportStar(__nccwpck_require__(8833), exports);
tslib_1.__exportStar(__nccwpck_require__(47995), exports);
tslib_1.__exportStar(__nccwpck_require__(60886), exports);
tslib_1.__exportStar(__nccwpck_require__(89952), exports);
tslib_1.__exportStar(__nccwpck_require__(74436), exports);
tslib_1.__exportStar(__nccwpck_require__(22173), exports);
tslib_1.__exportStar(__nccwpck_require__(71056), exports);
tslib_1.__exportStar(__nccwpck_require__(63061), exports);
tslib_1.__exportStar(__nccwpck_require__(3667), exports);
tslib_1.__exportStar(__nccwpck_require__(84893), exports);
tslib_1.__exportStar(__nccwpck_require__(10627), exports);
tslib_1.__exportStar(__nccwpck_require__(11740), exports);
tslib_1.__exportStar(__nccwpck_require__(4272), exports);
tslib_1.__exportStar(__nccwpck_require__(10912), exports);
tslib_1.__exportStar(__nccwpck_require__(24894), exports);
tslib_1.__exportStar(__nccwpck_require__(42762), exports);
tslib_1.__exportStar(__nccwpck_require__(32293), exports);
tslib_1.__exportStar(__nccwpck_require__(85161), exports);
tslib_1.__exportStar(__nccwpck_require__(51128), exports);
tslib_1.__exportStar(__nccwpck_require__(41752), exports);
tslib_1.__exportStar(__nccwpck_require__(21656), exports);
tslib_1.__exportStar(__nccwpck_require__(33645), exports);
tslib_1.__exportStar(__nccwpck_require__(70019), exports);
tslib_1.__exportStar(__nccwpck_require__(99191), exports);
tslib_1.__exportStar(__nccwpck_require__(86171), exports);
tslib_1.__exportStar(__nccwpck_require__(44696), exports);
tslib_1.__exportStar(__nccwpck_require__(19051), exports);
tslib_1.__exportStar(__nccwpck_require__(90114), exports);
tslib_1.__exportStar(__nccwpck_require__(7924), exports);
tslib_1.__exportStar(__nccwpck_require__(25570), exports);
tslib_1.__exportStar(__nccwpck_require__(17657), exports);
tslib_1.__exportStar(__nccwpck_require__(32966), exports);
tslib_1.__exportStar(__nccwpck_require__(78594), exports);
tslib_1.__exportStar(__nccwpck_require__(99911), exports);
tslib_1.__exportStar(__nccwpck_require__(42951), exports);
tslib_1.__exportStar(__nccwpck_require__(8762), exports);
tslib_1.__exportStar(__nccwpck_require__(69811), exports);
tslib_1.__exportStar(__nccwpck_require__(86312), exports);
tslib_1.__exportStar(__nccwpck_require__(86628), exports);
tslib_1.__exportStar(__nccwpck_require__(19839), exports);
tslib_1.__exportStar(__nccwpck_require__(51817), exports);
tslib_1.__exportStar(__nccwpck_require__(99975), exports);
tslib_1.__exportStar(__nccwpck_require__(509), exports);
tslib_1.__exportStar(__nccwpck_require__(65970), exports);
tslib_1.__exportStar(__nccwpck_require__(19574), exports);
tslib_1.__exportStar(__nccwpck_require__(78045), exports);
tslib_1.__exportStar(__nccwpck_require__(67831), exports);
tslib_1.__exportStar(__nccwpck_require__(74548), exports);
tslib_1.__exportStar(__nccwpck_require__(61215), exports);
tslib_1.__exportStar(__nccwpck_require__(67829), exports);
tslib_1.__exportStar(__nccwpck_require__(39899), exports);
tslib_1.__exportStar(__nccwpck_require__(22547), exports);
tslib_1.__exportStar(__nccwpck_require__(76774), exports);
tslib_1.__exportStar(__nccwpck_require__(71948), exports);
tslib_1.__exportStar(__nccwpck_require__(84135), exports);
tslib_1.__exportStar(__nccwpck_require__(79850), exports);
tslib_1.__exportStar(__nccwpck_require__(58881), exports);
tslib_1.__exportStar(__nccwpck_require__(42892), exports);
tslib_1.__exportStar(__nccwpck_require__(39894), exports);
tslib_1.__exportStar(__nccwpck_require__(88279), exports);
tslib_1.__exportStar(__nccwpck_require__(97621), exports);
tslib_1.__exportStar(__nccwpck_require__(74625), exports);
tslib_1.__exportStar(__nccwpck_require__(85571), exports);
tslib_1.__exportStar(__nccwpck_require__(3317), exports);
tslib_1.__exportStar(__nccwpck_require__(85751), exports);
tslib_1.__exportStar(__nccwpck_require__(50837), exports);
tslib_1.__exportStar(__nccwpck_require__(35698), exports);
tslib_1.__exportStar(__nccwpck_require__(80966), exports);
tslib_1.__exportStar(__nccwpck_require__(43933), exports);
tslib_1.__exportStar(__nccwpck_require__(54662), exports);
tslib_1.__exportStar(__nccwpck_require__(16954), exports);
tslib_1.__exportStar(__nccwpck_require__(70634), exports);
tslib_1.__exportStar(__nccwpck_require__(26573), exports);
tslib_1.__exportStar(__nccwpck_require__(69009), exports);
tslib_1.__exportStar(__nccwpck_require__(14870), exports);
tslib_1.__exportStar(__nccwpck_require__(40475), exports);
tslib_1.__exportStar(__nccwpck_require__(90975), exports);
tslib_1.__exportStar(__nccwpck_require__(66859), exports);
tslib_1.__exportStar(__nccwpck_require__(64888), exports);
tslib_1.__exportStar(__nccwpck_require__(36376), exports);
tslib_1.__exportStar(__nccwpck_require__(8350), exports);
tslib_1.__exportStar(__nccwpck_require__(21782), exports);
tslib_1.__exportStar(__nccwpck_require__(19870), exports);
tslib_1.__exportStar(__nccwpck_require__(94221), exports);
tslib_1.__exportStar(__nccwpck_require__(10936), exports);
tslib_1.__exportStar(__nccwpck_require__(5827), exports);
tslib_1.__exportStar(__nccwpck_require__(48994), exports);
tslib_1.__exportStar(__nccwpck_require__(55397), exports);
tslib_1.__exportStar(__nccwpck_require__(91686), exports);
tslib_1.__exportStar(__nccwpck_require__(22421), exports);
tslib_1.__exportStar(__nccwpck_require__(1581), exports);
tslib_1.__exportStar(__nccwpck_require__(61114), exports);
tslib_1.__exportStar(__nccwpck_require__(77568), exports);
tslib_1.__exportStar(__nccwpck_require__(55014), exports);
tslib_1.__exportStar(__nccwpck_require__(67214), exports);
tslib_1.__exportStar(__nccwpck_require__(56149), exports);
tslib_1.__exportStar(__nccwpck_require__(46136), exports);
tslib_1.__exportStar(__nccwpck_require__(70215), exports);
tslib_1.__exportStar(__nccwpck_require__(37088), exports);
tslib_1.__exportStar(__nccwpck_require__(1824), exports);
tslib_1.__exportStar(__nccwpck_require__(31828), exports);
tslib_1.__exportStar(__nccwpck_require__(96736), exports);
tslib_1.__exportStar(__nccwpck_require__(99411), exports);
tslib_1.__exportStar(__nccwpck_require__(9764), exports);
tslib_1.__exportStar(__nccwpck_require__(21058), exports);
tslib_1.__exportStar(__nccwpck_require__(31382), exports);
tslib_1.__exportStar(__nccwpck_require__(15895), exports);
tslib_1.__exportStar(__nccwpck_require__(56891), exports);
tslib_1.__exportStar(__nccwpck_require__(79991), exports);
tslib_1.__exportStar(__nccwpck_require__(60711), exports);
tslib_1.__exportStar(__nccwpck_require__(25888), exports);
tslib_1.__exportStar(__nccwpck_require__(845), exports);
tslib_1.__exportStar(__nccwpck_require__(49696), exports);
tslib_1.__exportStar(__nccwpck_require__(7056), exports);
tslib_1.__exportStar(__nccwpck_require__(3884), exports);
tslib_1.__exportStar(__nccwpck_require__(4248), exports);
tslib_1.__exportStar(__nccwpck_require__(39203), exports);
tslib_1.__exportStar(__nccwpck_require__(33725), exports);
tslib_1.__exportStar(__nccwpck_require__(19078), exports);
tslib_1.__exportStar(__nccwpck_require__(98113), exports);
tslib_1.__exportStar(__nccwpck_require__(15598), exports);
tslib_1.__exportStar(__nccwpck_require__(39191), exports);
tslib_1.__exportStar(__nccwpck_require__(84279), exports);
tslib_1.__exportStar(__nccwpck_require__(56581), exports);
tslib_1.__exportStar(__nccwpck_require__(30254), exports);
tslib_1.__exportStar(__nccwpck_require__(87928), exports);
tslib_1.__exportStar(__nccwpck_require__(9350), exports);
tslib_1.__exportStar(__nccwpck_require__(38169), exports);
tslib_1.__exportStar(__nccwpck_require__(18640), exports);
tslib_1.__exportStar(__nccwpck_require__(25927), exports);
tslib_1.__exportStar(__nccwpck_require__(26839), exports);
tslib_1.__exportStar(__nccwpck_require__(46881), exports);
tslib_1.__exportStar(__nccwpck_require__(96339), exports);
tslib_1.__exportStar(__nccwpck_require__(62890), exports);
tslib_1.__exportStar(__nccwpck_require__(69127), exports);
tslib_1.__exportStar(__nccwpck_require__(76275), exports);
tslib_1.__exportStar(__nccwpck_require__(49545), exports);
tslib_1.__exportStar(__nccwpck_require__(9927), exports);
tslib_1.__exportStar(__nccwpck_require__(18622), exports);
tslib_1.__exportStar(__nccwpck_require__(95926), exports);
tslib_1.__exportStar(__nccwpck_require__(48971), exports);
tslib_1.__exportStar(__nccwpck_require__(31592), exports);
tslib_1.__exportStar(__nccwpck_require__(83459), exports);
tslib_1.__exportStar(__nccwpck_require__(9077), exports);
tslib_1.__exportStar(__nccwpck_require__(70127), exports);
tslib_1.__exportStar(__nccwpck_require__(53615), exports);
tslib_1.__exportStar(__nccwpck_require__(14610), exports);
tslib_1.__exportStar(__nccwpck_require__(60878), exports);
tslib_1.__exportStar(__nccwpck_require__(1655), exports);
tslib_1.__exportStar(__nccwpck_require__(87717), exports);
tslib_1.__exportStar(__nccwpck_require__(34417), exports);
tslib_1.__exportStar(__nccwpck_require__(62967), exports);
tslib_1.__exportStar(__nccwpck_require__(41434), exports);
tslib_1.__exportStar(__nccwpck_require__(55885), exports);
tslib_1.__exportStar(__nccwpck_require__(20317), exports);
tslib_1.__exportStar(__nccwpck_require__(65055), exports);
tslib_1.__exportStar(__nccwpck_require__(46022), exports);
tslib_1.__exportStar(__nccwpck_require__(38664), exports);
tslib_1.__exportStar(__nccwpck_require__(93238), exports);
tslib_1.__exportStar(__nccwpck_require__(6538), exports);
tslib_1.__exportStar(__nccwpck_require__(94719), exports);
tslib_1.__exportStar(__nccwpck_require__(26379), exports);
tslib_1.__exportStar(__nccwpck_require__(14361), exports);
tslib_1.__exportStar(__nccwpck_require__(86872), exports);
tslib_1.__exportStar(__nccwpck_require__(89521), exports);
tslib_1.__exportStar(__nccwpck_require__(6602), exports);
tslib_1.__exportStar(__nccwpck_require__(95702), exports);
tslib_1.__exportStar(__nccwpck_require__(75476), exports);
tslib_1.__exportStar(__nccwpck_require__(67027), exports);
tslib_1.__exportStar(__nccwpck_require__(98205), exports);
tslib_1.__exportStar(__nccwpck_require__(3099), exports);
tslib_1.__exportStar(__nccwpck_require__(61999), exports);
tslib_1.__exportStar(__nccwpck_require__(96086), exports);
tslib_1.__exportStar(__nccwpck_require__(50793), exports);
tslib_1.__exportStar(__nccwpck_require__(81906), exports);
tslib_1.__exportStar(__nccwpck_require__(92848), exports);
tslib_1.__exportStar(__nccwpck_require__(69489), exports);
tslib_1.__exportStar(__nccwpck_require__(12040), exports);
tslib_1.__exportStar(__nccwpck_require__(67225), exports);
tslib_1.__exportStar(__nccwpck_require__(6290), exports);
tslib_1.__exportStar(__nccwpck_require__(33698), exports);
tslib_1.__exportStar(__nccwpck_require__(3991), exports);
tslib_1.__exportStar(__nccwpck_require__(59985), exports);
tslib_1.__exportStar(__nccwpck_require__(52589), exports);
tslib_1.__exportStar(__nccwpck_require__(67377), exports);
tslib_1.__exportStar(__nccwpck_require__(5757), exports);
tslib_1.__exportStar(__nccwpck_require__(49592), exports);
tslib_1.__exportStar(__nccwpck_require__(35568), exports);
tslib_1.__exportStar(__nccwpck_require__(5287), exports);
tslib_1.__exportStar(__nccwpck_require__(76193), exports);
tslib_1.__exportStar(__nccwpck_require__(29380), exports);
tslib_1.__exportStar(__nccwpck_require__(33927), exports);
tslib_1.__exportStar(__nccwpck_require__(65276), exports);
tslib_1.__exportStar(__nccwpck_require__(83787), exports);
tslib_1.__exportStar(__nccwpck_require__(90989), exports);
tslib_1.__exportStar(__nccwpck_require__(8070), exports);
tslib_1.__exportStar(__nccwpck_require__(61014), exports);
tslib_1.__exportStar(__nccwpck_require__(89642), exports);
tslib_1.__exportStar(__nccwpck_require__(15220), exports);
tslib_1.__exportStar(__nccwpck_require__(45910), exports);
tslib_1.__exportStar(__nccwpck_require__(32036), exports);
tslib_1.__exportStar(__nccwpck_require__(53079), exports);
tslib_1.__exportStar(__nccwpck_require__(39479), exports);
tslib_1.__exportStar(__nccwpck_require__(56871), exports);
tslib_1.__exportStar(__nccwpck_require__(66602), exports);
tslib_1.__exportStar(__nccwpck_require__(41934), exports);
tslib_1.__exportStar(__nccwpck_require__(3593), exports);
tslib_1.__exportStar(__nccwpck_require__(12511), exports);
tslib_1.__exportStar(__nccwpck_require__(47647), exports);
tslib_1.__exportStar(__nccwpck_require__(54349), exports);
tslib_1.__exportStar(__nccwpck_require__(20058), exports);
tslib_1.__exportStar(__nccwpck_require__(53792), exports);
tslib_1.__exportStar(__nccwpck_require__(20970), exports);
tslib_1.__exportStar(__nccwpck_require__(69903), exports);
tslib_1.__exportStar(__nccwpck_require__(88392), exports);
tslib_1.__exportStar(__nccwpck_require__(49929), exports);
tslib_1.__exportStar(__nccwpck_require__(23402), exports);
tslib_1.__exportStar(__nccwpck_require__(49584), exports);
tslib_1.__exportStar(__nccwpck_require__(94030), exports);
tslib_1.__exportStar(__nccwpck_require__(39991), exports);
tslib_1.__exportStar(__nccwpck_require__(7724), exports);
tslib_1.__exportStar(__nccwpck_require__(66666), exports);
tslib_1.__exportStar(__nccwpck_require__(29863), exports);
tslib_1.__exportStar(__nccwpck_require__(30594), exports);
tslib_1.__exportStar(__nccwpck_require__(1496), exports);
tslib_1.__exportStar(__nccwpck_require__(21270), exports);
tslib_1.__exportStar(__nccwpck_require__(9165), exports);
tslib_1.__exportStar(__nccwpck_require__(64672), exports);
tslib_1.__exportStar(__nccwpck_require__(60049), exports);
tslib_1.__exportStar(__nccwpck_require__(61730), exports);
tslib_1.__exportStar(__nccwpck_require__(37085), exports);
tslib_1.__exportStar(__nccwpck_require__(35081), exports);
tslib_1.__exportStar(__nccwpck_require__(7423), exports);
tslib_1.__exportStar(__nccwpck_require__(26777), exports);
tslib_1.__exportStar(__nccwpck_require__(98830), exports);
tslib_1.__exportStar(__nccwpck_require__(93967), exports);
tslib_1.__exportStar(__nccwpck_require__(64484), exports);
tslib_1.__exportStar(__nccwpck_require__(63533), exports);
tslib_1.__exportStar(__nccwpck_require__(57091), exports);
tslib_1.__exportStar(__nccwpck_require__(98441), exports);
tslib_1.__exportStar(__nccwpck_require__(30089), exports);
tslib_1.__exportStar(__nccwpck_require__(43801), exports);
tslib_1.__exportStar(__nccwpck_require__(58382), exports);
tslib_1.__exportStar(__nccwpck_require__(84478), exports);
tslib_1.__exportStar(__nccwpck_require__(8076), exports);
tslib_1.__exportStar(__nccwpck_require__(53942), exports);
tslib_1.__exportStar(__nccwpck_require__(51807), exports);
tslib_1.__exportStar(__nccwpck_require__(59514), exports);
tslib_1.__exportStar(__nccwpck_require__(96831), exports);
tslib_1.__exportStar(__nccwpck_require__(75855), exports);
tslib_1.__exportStar(__nccwpck_require__(8326), exports);
tslib_1.__exportStar(__nccwpck_require__(40541), exports);
tslib_1.__exportStar(__nccwpck_require__(81655), exports);
tslib_1.__exportStar(__nccwpck_require__(34396), exports);
tslib_1.__exportStar(__nccwpck_require__(43485), exports);
tslib_1.__exportStar(__nccwpck_require__(63931), exports);
tslib_1.__exportStar(__nccwpck_require__(23257), exports);
tslib_1.__exportStar(__nccwpck_require__(84404), exports);
tslib_1.__exportStar(__nccwpck_require__(44289), exports);
tslib_1.__exportStar(__nccwpck_require__(90147), exports);
tslib_1.__exportStar(__nccwpck_require__(72683), exports);
tslib_1.__exportStar(__nccwpck_require__(75714), exports);
tslib_1.__exportStar(__nccwpck_require__(67813), exports);
tslib_1.__exportStar(__nccwpck_require__(60270), exports);
tslib_1.__exportStar(__nccwpck_require__(90435), exports);
tslib_1.__exportStar(__nccwpck_require__(42319), exports);
tslib_1.__exportStar(__nccwpck_require__(10530), exports);
tslib_1.__exportStar(__nccwpck_require__(22546), exports);
tslib_1.__exportStar(__nccwpck_require__(62252), exports);
tslib_1.__exportStar(__nccwpck_require__(5461), exports);
tslib_1.__exportStar(__nccwpck_require__(65831), exports);
tslib_1.__exportStar(__nccwpck_require__(31079), exports);
tslib_1.__exportStar(__nccwpck_require__(75281), exports);
tslib_1.__exportStar(__nccwpck_require__(47306), exports);
tslib_1.__exportStar(__nccwpck_require__(50769), exports);
tslib_1.__exportStar(__nccwpck_require__(49098), exports);
tslib_1.__exportStar(__nccwpck_require__(34651), exports);
tslib_1.__exportStar(__nccwpck_require__(473), exports);
tslib_1.__exportStar(__nccwpck_require__(44509), exports);
tslib_1.__exportStar(__nccwpck_require__(12802), exports);
tslib_1.__exportStar(__nccwpck_require__(11202), exports);
tslib_1.__exportStar(__nccwpck_require__(37196), exports);
tslib_1.__exportStar(__nccwpck_require__(27287), exports);
tslib_1.__exportStar(__nccwpck_require__(36502), exports);
tslib_1.__exportStar(__nccwpck_require__(43128), exports);
tslib_1.__exportStar(__nccwpck_require__(96606), exports);
tslib_1.__exportStar(__nccwpck_require__(74687), exports);
tslib_1.__exportStar(__nccwpck_require__(89728), exports);
tslib_1.__exportStar(__nccwpck_require__(89151), exports);
tslib_1.__exportStar(__nccwpck_require__(8786), exports);
tslib_1.__exportStar(__nccwpck_require__(66258), exports);
tslib_1.__exportStar(__nccwpck_require__(98064), exports);
tslib_1.__exportStar(__nccwpck_require__(25083), exports);
tslib_1.__exportStar(__nccwpck_require__(30639), exports);
tslib_1.__exportStar(__nccwpck_require__(5950), exports);
tslib_1.__exportStar(__nccwpck_require__(18291), exports);
tslib_1.__exportStar(__nccwpck_require__(83162), exports);
tslib_1.__exportStar(__nccwpck_require__(10150), exports);
tslib_1.__exportStar(__nccwpck_require__(29521), exports);
tslib_1.__exportStar(__nccwpck_require__(53209), exports);
tslib_1.__exportStar(__nccwpck_require__(69602), exports);
tslib_1.__exportStar(__nccwpck_require__(85029), exports);
tslib_1.__exportStar(__nccwpck_require__(75145), exports);
tslib_1.__exportStar(__nccwpck_require__(12390), exports);
tslib_1.__exportStar(__nccwpck_require__(34096), exports);
tslib_1.__exportStar(__nccwpck_require__(33665), exports);
tslib_1.__exportStar(__nccwpck_require__(96952), exports);
tslib_1.__exportStar(__nccwpck_require__(41473), exports);
tslib_1.__exportStar(__nccwpck_require__(67231), exports);
tslib_1.__exportStar(__nccwpck_require__(46788), exports);
tslib_1.__exportStar(__nccwpck_require__(17298), exports);
tslib_1.__exportStar(__nccwpck_require__(60715), exports);
tslib_1.__exportStar(__nccwpck_require__(73280), exports);
tslib_1.__exportStar(__nccwpck_require__(54941), exports);
tslib_1.__exportStar(__nccwpck_require__(5415), exports);
tslib_1.__exportStar(__nccwpck_require__(17383), exports);
tslib_1.__exportStar(__nccwpck_require__(61416), exports);
tslib_1.__exportStar(__nccwpck_require__(56126), exports);
tslib_1.__exportStar(__nccwpck_require__(60958), exports);
tslib_1.__exportStar(__nccwpck_require__(46865), exports);
tslib_1.__exportStar(__nccwpck_require__(78411), exports);
tslib_1.__exportStar(__nccwpck_require__(23137), exports);
tslib_1.__exportStar(__nccwpck_require__(849), exports);
tslib_1.__exportStar(__nccwpck_require__(17451), exports);
const admissionregistrationV1ServiceReference_1 = __nccwpck_require__(21616);
const admissionregistrationV1WebhookClientConfig_1 = __nccwpck_require__(7818);
const apiextensionsV1ServiceReference_1 = __nccwpck_require__(63536);
const apiextensionsV1WebhookClientConfig_1 = __nccwpck_require__(22775);
const apiregistrationV1ServiceReference_1 = __nccwpck_require__(37492);
const authenticationV1TokenRequest_1 = __nccwpck_require__(25429);
const coreV1EndpointPort_1 = __nccwpck_require__(81950);
const coreV1Event_1 = __nccwpck_require__(42735);
const coreV1EventList_1 = __nccwpck_require__(12368);
const coreV1EventSeries_1 = __nccwpck_require__(70438);
const discoveryV1EndpointPort_1 = __nccwpck_require__(75853);
const eventsV1Event_1 = __nccwpck_require__(52191);
const eventsV1EventList_1 = __nccwpck_require__(1051);
const eventsV1EventSeries_1 = __nccwpck_require__(10000);
const storageV1TokenRequest_1 = __nccwpck_require__(25958);
const v1APIGroup_1 = __nccwpck_require__(44481);
const v1APIGroupList_1 = __nccwpck_require__(52906);
const v1APIResource_1 = __nccwpck_require__(89033);
const v1APIResourceList_1 = __nccwpck_require__(5454);
const v1APIService_1 = __nccwpck_require__(99042);
const v1APIServiceCondition_1 = __nccwpck_require__(58352);
const v1APIServiceList_1 = __nccwpck_require__(87198);
const v1APIServiceSpec_1 = __nccwpck_require__(61496);
const v1APIServiceStatus_1 = __nccwpck_require__(17883);
const v1APIVersions_1 = __nccwpck_require__(93135);
const v1AWSElasticBlockStoreVolumeSource_1 = __nccwpck_require__(39808);
const v1Affinity_1 = __nccwpck_require__(61957);
const v1AggregationRule_1 = __nccwpck_require__(90312);
const v1AttachedVolume_1 = __nccwpck_require__(97069);
const v1AzureDiskVolumeSource_1 = __nccwpck_require__(91312);
const v1AzureFilePersistentVolumeSource_1 = __nccwpck_require__(23694);
const v1AzureFileVolumeSource_1 = __nccwpck_require__(95073);
const v1Binding_1 = __nccwpck_require__(48551);
const v1BoundObjectReference_1 = __nccwpck_require__(68849);
const v1CSIDriver_1 = __nccwpck_require__(34144);
const v1CSIDriverList_1 = __nccwpck_require__(84881);
const v1CSIDriverSpec_1 = __nccwpck_require__(11582);
const v1CSINode_1 = __nccwpck_require__(74315);
const v1CSINodeDriver_1 = __nccwpck_require__(90288);
const v1CSINodeList_1 = __nccwpck_require__(24000);
const v1CSINodeSpec_1 = __nccwpck_require__(75636);
const v1CSIPersistentVolumeSource_1 = __nccwpck_require__(98367);
const v1CSIVolumeSource_1 = __nccwpck_require__(87598);
const v1Capabilities_1 = __nccwpck_require__(82975);
const v1CephFSPersistentVolumeSource_1 = __nccwpck_require__(14268);
const v1CephFSVolumeSource_1 = __nccwpck_require__(84957);
const v1CertificateSigningRequest_1 = __nccwpck_require__(99084);
const v1CertificateSigningRequestCondition_1 = __nccwpck_require__(92932);
const v1CertificateSigningRequestList_1 = __nccwpck_require__(31530);
const v1CertificateSigningRequestSpec_1 = __nccwpck_require__(37759);
const v1CertificateSigningRequestStatus_1 = __nccwpck_require__(38285);
const v1CinderPersistentVolumeSource_1 = __nccwpck_require__(41888);
const v1CinderVolumeSource_1 = __nccwpck_require__(19111);
const v1ClientIPConfig_1 = __nccwpck_require__(33913);
const v1ClusterRole_1 = __nccwpck_require__(61458);
const v1ClusterRoleBinding_1 = __nccwpck_require__(32315);
const v1ClusterRoleBindingList_1 = __nccwpck_require__(21181);
const v1ClusterRoleList_1 = __nccwpck_require__(95532);
const v1ComponentCondition_1 = __nccwpck_require__(30578);
const v1ComponentStatus_1 = __nccwpck_require__(2047);
const v1ComponentStatusList_1 = __nccwpck_require__(38596);
const v1Condition_1 = __nccwpck_require__(34990);
const v1ConfigMap_1 = __nccwpck_require__(42874);
const v1ConfigMapEnvSource_1 = __nccwpck_require__(99685);
const v1ConfigMapKeySelector_1 = __nccwpck_require__(62892);
const v1ConfigMapList_1 = __nccwpck_require__(80512);
const v1ConfigMapNodeConfigSource_1 = __nccwpck_require__(56709);
const v1ConfigMapProjection_1 = __nccwpck_require__(61682);
const v1ConfigMapVolumeSource_1 = __nccwpck_require__(59708);
const v1Container_1 = __nccwpck_require__(52865);
const v1ContainerImage_1 = __nccwpck_require__(13501);
const v1ContainerPort_1 = __nccwpck_require__(50217);
const v1ContainerState_1 = __nccwpck_require__(83765);
const v1ContainerStateRunning_1 = __nccwpck_require__(89767);
const v1ContainerStateTerminated_1 = __nccwpck_require__(27892);
const v1ContainerStateWaiting_1 = __nccwpck_require__(19716);
const v1ContainerStatus_1 = __nccwpck_require__(35980);
const v1ControllerRevision_1 = __nccwpck_require__(78405);
const v1ControllerRevisionList_1 = __nccwpck_require__(66304);
const v1CronJob_1 = __nccwpck_require__(54382);
const v1CronJobList_1 = __nccwpck_require__(72565);
const v1CronJobSpec_1 = __nccwpck_require__(7011);
const v1CronJobStatus_1 = __nccwpck_require__(24600);
const v1CrossVersionObjectReference_1 = __nccwpck_require__(34233);
const v1CustomResourceColumnDefinition_1 = __nccwpck_require__(94346);
const v1CustomResourceConversion_1 = __nccwpck_require__(9731);
const v1CustomResourceDefinition_1 = __nccwpck_require__(40325);
const v1CustomResourceDefinitionCondition_1 = __nccwpck_require__(32791);
const v1CustomResourceDefinitionList_1 = __nccwpck_require__(10486);
const v1CustomResourceDefinitionNames_1 = __nccwpck_require__(69798);
const v1CustomResourceDefinitionSpec_1 = __nccwpck_require__(20486);
const v1CustomResourceDefinitionStatus_1 = __nccwpck_require__(25713);
const v1CustomResourceDefinitionVersion_1 = __nccwpck_require__(82283);
const v1CustomResourceSubresourceScale_1 = __nccwpck_require__(98087);
const v1CustomResourceSubresources_1 = __nccwpck_require__(94579);
const v1CustomResourceValidation_1 = __nccwpck_require__(25408);
const v1DaemonEndpoint_1 = __nccwpck_require__(37060);
const v1DaemonSet_1 = __nccwpck_require__(32699);
const v1DaemonSetCondition_1 = __nccwpck_require__(77063);
const v1DaemonSetList_1 = __nccwpck_require__(173);
const v1DaemonSetSpec_1 = __nccwpck_require__(44560);
const v1DaemonSetStatus_1 = __nccwpck_require__(87510);
const v1DaemonSetUpdateStrategy_1 = __nccwpck_require__(48451);
const v1DeleteOptions_1 = __nccwpck_require__(18029);
const v1Deployment_1 = __nccwpck_require__(65310);
const v1DeploymentCondition_1 = __nccwpck_require__(95602);
const v1DeploymentList_1 = __nccwpck_require__(81364);
const v1DeploymentSpec_1 = __nccwpck_require__(41298);
const v1DeploymentStatus_1 = __nccwpck_require__(55398);
const v1DeploymentStrategy_1 = __nccwpck_require__(34981);
const v1DownwardAPIProjection_1 = __nccwpck_require__(38099);
const v1DownwardAPIVolumeFile_1 = __nccwpck_require__(78901);
const v1DownwardAPIVolumeSource_1 = __nccwpck_require__(19562);
const v1EmptyDirVolumeSource_1 = __nccwpck_require__(11672);
const v1Endpoint_1 = __nccwpck_require__(17252);
const v1EndpointAddress_1 = __nccwpck_require__(57151);
const v1EndpointConditions_1 = __nccwpck_require__(70435);
const v1EndpointHints_1 = __nccwpck_require__(97000);
const v1EndpointSlice_1 = __nccwpck_require__(53708);
const v1EndpointSliceList_1 = __nccwpck_require__(6223);
const v1EndpointSubset_1 = __nccwpck_require__(31925);
const v1Endpoints_1 = __nccwpck_require__(13449);
const v1EndpointsList_1 = __nccwpck_require__(69906);
const v1EnvFromSource_1 = __nccwpck_require__(23074);
const v1EnvVar_1 = __nccwpck_require__(36874);
const v1EnvVarSource_1 = __nccwpck_require__(17205);
const v1EphemeralContainer_1 = __nccwpck_require__(32671);
const v1EphemeralVolumeSource_1 = __nccwpck_require__(90017);
const v1EventSource_1 = __nccwpck_require__(97764);
const v1Eviction_1 = __nccwpck_require__(87969);
const v1ExecAction_1 = __nccwpck_require__(13313);
const v1ExternalDocumentation_1 = __nccwpck_require__(77213);
const v1FCVolumeSource_1 = __nccwpck_require__(35093);
const v1FlexPersistentVolumeSource_1 = __nccwpck_require__(91874);
const v1FlexVolumeSource_1 = __nccwpck_require__(16690);
const v1FlockerVolumeSource_1 = __nccwpck_require__(10414);
const v1ForZone_1 = __nccwpck_require__(3439);
const v1GCEPersistentDiskVolumeSource_1 = __nccwpck_require__(1016);
const v1GitRepoVolumeSource_1 = __nccwpck_require__(27584);
const v1GlusterfsPersistentVolumeSource_1 = __nccwpck_require__(97617);
const v1GlusterfsVolumeSource_1 = __nccwpck_require__(37426);
const v1GroupVersionForDiscovery_1 = __nccwpck_require__(87855);
const v1HTTPGetAction_1 = __nccwpck_require__(16636);
const v1HTTPHeader_1 = __nccwpck_require__(3437);
const v1HTTPIngressPath_1 = __nccwpck_require__(86769);
const v1HTTPIngressRuleValue_1 = __nccwpck_require__(56219);
const v1Handler_1 = __nccwpck_require__(95179);
const v1HorizontalPodAutoscaler_1 = __nccwpck_require__(93652);
const v1HorizontalPodAutoscalerList_1 = __nccwpck_require__(17024);
const v1HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(49823);
const v1HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(50910);
const v1HostAlias_1 = __nccwpck_require__(72796);
const v1HostPathVolumeSource_1 = __nccwpck_require__(69225);
const v1IPBlock_1 = __nccwpck_require__(49202);
const v1ISCSIPersistentVolumeSource_1 = __nccwpck_require__(83570);
const v1ISCSIVolumeSource_1 = __nccwpck_require__(68021);
const v1Ingress_1 = __nccwpck_require__(32492);
const v1IngressBackend_1 = __nccwpck_require__(44340);
const v1IngressClass_1 = __nccwpck_require__(93865);
const v1IngressClassList_1 = __nccwpck_require__(76125);
const v1IngressClassParametersReference_1 = __nccwpck_require__(76672);
const v1IngressClassSpec_1 = __nccwpck_require__(92069);
const v1IngressList_1 = __nccwpck_require__(43693);
const v1IngressRule_1 = __nccwpck_require__(89541);
const v1IngressServiceBackend_1 = __nccwpck_require__(62476);
const v1IngressSpec_1 = __nccwpck_require__(59689);
const v1IngressStatus_1 = __nccwpck_require__(45830);
const v1IngressTLS_1 = __nccwpck_require__(23037);
const v1JSONSchemaProps_1 = __nccwpck_require__(63580);
const v1Job_1 = __nccwpck_require__(91260);
const v1JobCondition_1 = __nccwpck_require__(94069);
const v1JobList_1 = __nccwpck_require__(13366);
const v1JobSpec_1 = __nccwpck_require__(32400);
const v1JobStatus_1 = __nccwpck_require__(57345);
const v1JobTemplateSpec_1 = __nccwpck_require__(96227);
const v1KeyToPath_1 = __nccwpck_require__(23549);
const v1LabelSelector_1 = __nccwpck_require__(22567);
const v1LabelSelectorRequirement_1 = __nccwpck_require__(50993);
const v1Lease_1 = __nccwpck_require__(98844);
const v1LeaseList_1 = __nccwpck_require__(76838);
const v1LeaseSpec_1 = __nccwpck_require__(44603);
const v1Lifecycle_1 = __nccwpck_require__(41500);
const v1LimitRange_1 = __nccwpck_require__(86280);
const v1LimitRangeItem_1 = __nccwpck_require__(91128);
const v1LimitRangeList_1 = __nccwpck_require__(82578);
const v1LimitRangeSpec_1 = __nccwpck_require__(83039);
const v1ListMeta_1 = __nccwpck_require__(88593);
const v1LoadBalancerIngress_1 = __nccwpck_require__(25667);
const v1LoadBalancerStatus_1 = __nccwpck_require__(46630);
const v1LocalObjectReference_1 = __nccwpck_require__(12229);
const v1LocalSubjectAccessReview_1 = __nccwpck_require__(31674);
const v1LocalVolumeSource_1 = __nccwpck_require__(72729);
const v1ManagedFieldsEntry_1 = __nccwpck_require__(82187);
const v1MutatingWebhook_1 = __nccwpck_require__(95354);
const v1MutatingWebhookConfiguration_1 = __nccwpck_require__(2006);
const v1MutatingWebhookConfigurationList_1 = __nccwpck_require__(22665);
const v1NFSVolumeSource_1 = __nccwpck_require__(35432);
const v1Namespace_1 = __nccwpck_require__(95469);
const v1NamespaceCondition_1 = __nccwpck_require__(314);
const v1NamespaceList_1 = __nccwpck_require__(22366);
const v1NamespaceSpec_1 = __nccwpck_require__(49076);
const v1NamespaceStatus_1 = __nccwpck_require__(8833);
const v1NetworkPolicy_1 = __nccwpck_require__(47995);
const v1NetworkPolicyEgressRule_1 = __nccwpck_require__(60886);
const v1NetworkPolicyIngressRule_1 = __nccwpck_require__(89952);
const v1NetworkPolicyList_1 = __nccwpck_require__(74436);
const v1NetworkPolicyPeer_1 = __nccwpck_require__(22173);
const v1NetworkPolicyPort_1 = __nccwpck_require__(71056);
const v1NetworkPolicySpec_1 = __nccwpck_require__(63061);
const v1Node_1 = __nccwpck_require__(3667);
const v1NodeAddress_1 = __nccwpck_require__(84893);
const v1NodeAffinity_1 = __nccwpck_require__(10627);
const v1NodeCondition_1 = __nccwpck_require__(11740);
const v1NodeConfigSource_1 = __nccwpck_require__(4272);
const v1NodeConfigStatus_1 = __nccwpck_require__(10912);
const v1NodeDaemonEndpoints_1 = __nccwpck_require__(24894);
const v1NodeList_1 = __nccwpck_require__(42762);
const v1NodeSelector_1 = __nccwpck_require__(32293);
const v1NodeSelectorRequirement_1 = __nccwpck_require__(85161);
const v1NodeSelectorTerm_1 = __nccwpck_require__(51128);
const v1NodeSpec_1 = __nccwpck_require__(41752);
const v1NodeStatus_1 = __nccwpck_require__(21656);
const v1NodeSystemInfo_1 = __nccwpck_require__(33645);
const v1NonResourceAttributes_1 = __nccwpck_require__(70019);
const v1NonResourceRule_1 = __nccwpck_require__(99191);
const v1ObjectFieldSelector_1 = __nccwpck_require__(86171);
const v1ObjectMeta_1 = __nccwpck_require__(44696);
const v1ObjectReference_1 = __nccwpck_require__(19051);
const v1Overhead_1 = __nccwpck_require__(90114);
const v1OwnerReference_1 = __nccwpck_require__(7924);
const v1PersistentVolume_1 = __nccwpck_require__(25570);
const v1PersistentVolumeClaim_1 = __nccwpck_require__(17657);
const v1PersistentVolumeClaimCondition_1 = __nccwpck_require__(32966);
const v1PersistentVolumeClaimList_1 = __nccwpck_require__(78594);
const v1PersistentVolumeClaimSpec_1 = __nccwpck_require__(99911);
const v1PersistentVolumeClaimStatus_1 = __nccwpck_require__(42951);
const v1PersistentVolumeClaimTemplate_1 = __nccwpck_require__(8762);
const v1PersistentVolumeClaimVolumeSource_1 = __nccwpck_require__(69811);
const v1PersistentVolumeList_1 = __nccwpck_require__(86312);
const v1PersistentVolumeSpec_1 = __nccwpck_require__(86628);
const v1PersistentVolumeStatus_1 = __nccwpck_require__(19839);
const v1PhotonPersistentDiskVolumeSource_1 = __nccwpck_require__(51817);
const v1Pod_1 = __nccwpck_require__(99975);
const v1PodAffinity_1 = __nccwpck_require__(509);
const v1PodAffinityTerm_1 = __nccwpck_require__(65970);
const v1PodAntiAffinity_1 = __nccwpck_require__(19574);
const v1PodCondition_1 = __nccwpck_require__(78045);
const v1PodDNSConfig_1 = __nccwpck_require__(67831);
const v1PodDNSConfigOption_1 = __nccwpck_require__(74548);
const v1PodDisruptionBudget_1 = __nccwpck_require__(61215);
const v1PodDisruptionBudgetList_1 = __nccwpck_require__(67829);
const v1PodDisruptionBudgetSpec_1 = __nccwpck_require__(39899);
const v1PodDisruptionBudgetStatus_1 = __nccwpck_require__(22547);
const v1PodIP_1 = __nccwpck_require__(76774);
const v1PodList_1 = __nccwpck_require__(71948);
const v1PodReadinessGate_1 = __nccwpck_require__(84135);
const v1PodSecurityContext_1 = __nccwpck_require__(79850);
const v1PodSpec_1 = __nccwpck_require__(58881);
const v1PodStatus_1 = __nccwpck_require__(42892);
const v1PodTemplate_1 = __nccwpck_require__(39894);
const v1PodTemplateList_1 = __nccwpck_require__(88279);
const v1PodTemplateSpec_1 = __nccwpck_require__(97621);
const v1PolicyRule_1 = __nccwpck_require__(74625);
const v1PortStatus_1 = __nccwpck_require__(85571);
const v1PortworxVolumeSource_1 = __nccwpck_require__(3317);
const v1Preconditions_1 = __nccwpck_require__(85751);
const v1PreferredSchedulingTerm_1 = __nccwpck_require__(50837);
const v1PriorityClass_1 = __nccwpck_require__(35698);
const v1PriorityClassList_1 = __nccwpck_require__(80966);
const v1Probe_1 = __nccwpck_require__(43933);
const v1ProjectedVolumeSource_1 = __nccwpck_require__(54662);
const v1QuobyteVolumeSource_1 = __nccwpck_require__(16954);
const v1RBDPersistentVolumeSource_1 = __nccwpck_require__(70634);
const v1RBDVolumeSource_1 = __nccwpck_require__(26573);
const v1ReplicaSet_1 = __nccwpck_require__(69009);
const v1ReplicaSetCondition_1 = __nccwpck_require__(14870);
const v1ReplicaSetList_1 = __nccwpck_require__(40475);
const v1ReplicaSetSpec_1 = __nccwpck_require__(90975);
const v1ReplicaSetStatus_1 = __nccwpck_require__(66859);
const v1ReplicationController_1 = __nccwpck_require__(64888);
const v1ReplicationControllerCondition_1 = __nccwpck_require__(36376);
const v1ReplicationControllerList_1 = __nccwpck_require__(8350);
const v1ReplicationControllerSpec_1 = __nccwpck_require__(21782);
const v1ReplicationControllerStatus_1 = __nccwpck_require__(19870);
const v1ResourceAttributes_1 = __nccwpck_require__(94221);
const v1ResourceFieldSelector_1 = __nccwpck_require__(10936);
const v1ResourceQuota_1 = __nccwpck_require__(5827);
const v1ResourceQuotaList_1 = __nccwpck_require__(48994);
const v1ResourceQuotaSpec_1 = __nccwpck_require__(55397);
const v1ResourceQuotaStatus_1 = __nccwpck_require__(91686);
const v1ResourceRequirements_1 = __nccwpck_require__(22421);
const v1ResourceRule_1 = __nccwpck_require__(1581);
const v1Role_1 = __nccwpck_require__(61114);
const v1RoleBinding_1 = __nccwpck_require__(77568);
const v1RoleBindingList_1 = __nccwpck_require__(55014);
const v1RoleList_1 = __nccwpck_require__(67214);
const v1RoleRef_1 = __nccwpck_require__(56149);
const v1RollingUpdateDaemonSet_1 = __nccwpck_require__(46136);
const v1RollingUpdateDeployment_1 = __nccwpck_require__(70215);
const v1RollingUpdateStatefulSetStrategy_1 = __nccwpck_require__(37088);
const v1RuleWithOperations_1 = __nccwpck_require__(1824);
const v1RuntimeClass_1 = __nccwpck_require__(31828);
const v1RuntimeClassList_1 = __nccwpck_require__(96736);
const v1SELinuxOptions_1 = __nccwpck_require__(99411);
const v1Scale_1 = __nccwpck_require__(9764);
const v1ScaleIOPersistentVolumeSource_1 = __nccwpck_require__(21058);
const v1ScaleIOVolumeSource_1 = __nccwpck_require__(31382);
const v1ScaleSpec_1 = __nccwpck_require__(15895);
const v1ScaleStatus_1 = __nccwpck_require__(56891);
const v1Scheduling_1 = __nccwpck_require__(79991);
const v1ScopeSelector_1 = __nccwpck_require__(60711);
const v1ScopedResourceSelectorRequirement_1 = __nccwpck_require__(25888);
const v1SeccompProfile_1 = __nccwpck_require__(845);
const v1Secret_1 = __nccwpck_require__(49696);
const v1SecretEnvSource_1 = __nccwpck_require__(7056);
const v1SecretKeySelector_1 = __nccwpck_require__(3884);
const v1SecretList_1 = __nccwpck_require__(4248);
const v1SecretProjection_1 = __nccwpck_require__(39203);
const v1SecretReference_1 = __nccwpck_require__(33725);
const v1SecretVolumeSource_1 = __nccwpck_require__(19078);
const v1SecurityContext_1 = __nccwpck_require__(98113);
const v1SelfSubjectAccessReview_1 = __nccwpck_require__(15598);
const v1SelfSubjectAccessReviewSpec_1 = __nccwpck_require__(39191);
const v1SelfSubjectRulesReview_1 = __nccwpck_require__(84279);
const v1SelfSubjectRulesReviewSpec_1 = __nccwpck_require__(56581);
const v1ServerAddressByClientCIDR_1 = __nccwpck_require__(30254);
const v1Service_1 = __nccwpck_require__(87928);
const v1ServiceAccount_1 = __nccwpck_require__(9350);
const v1ServiceAccountList_1 = __nccwpck_require__(38169);
const v1ServiceAccountTokenProjection_1 = __nccwpck_require__(18640);
const v1ServiceBackendPort_1 = __nccwpck_require__(25927);
const v1ServiceList_1 = __nccwpck_require__(26839);
const v1ServicePort_1 = __nccwpck_require__(46881);
const v1ServiceSpec_1 = __nccwpck_require__(96339);
const v1ServiceStatus_1 = __nccwpck_require__(62890);
const v1SessionAffinityConfig_1 = __nccwpck_require__(69127);
const v1StatefulSet_1 = __nccwpck_require__(76275);
const v1StatefulSetCondition_1 = __nccwpck_require__(49545);
const v1StatefulSetList_1 = __nccwpck_require__(9927);
const v1StatefulSetSpec_1 = __nccwpck_require__(18622);
const v1StatefulSetStatus_1 = __nccwpck_require__(95926);
const v1StatefulSetUpdateStrategy_1 = __nccwpck_require__(48971);
const v1Status_1 = __nccwpck_require__(31592);
const v1StatusCause_1 = __nccwpck_require__(83459);
const v1StatusDetails_1 = __nccwpck_require__(9077);
const v1StorageClass_1 = __nccwpck_require__(70127);
const v1StorageClassList_1 = __nccwpck_require__(53615);
const v1StorageOSPersistentVolumeSource_1 = __nccwpck_require__(14610);
const v1StorageOSVolumeSource_1 = __nccwpck_require__(60878);
const v1Subject_1 = __nccwpck_require__(1655);
const v1SubjectAccessReview_1 = __nccwpck_require__(87717);
const v1SubjectAccessReviewSpec_1 = __nccwpck_require__(34417);
const v1SubjectAccessReviewStatus_1 = __nccwpck_require__(62967);
const v1SubjectRulesReviewStatus_1 = __nccwpck_require__(41434);
const v1Sysctl_1 = __nccwpck_require__(55885);
const v1TCPSocketAction_1 = __nccwpck_require__(20317);
const v1Taint_1 = __nccwpck_require__(65055);
const v1TokenRequestSpec_1 = __nccwpck_require__(46022);
const v1TokenRequestStatus_1 = __nccwpck_require__(38664);
const v1TokenReview_1 = __nccwpck_require__(93238);
const v1TokenReviewSpec_1 = __nccwpck_require__(6538);
const v1TokenReviewStatus_1 = __nccwpck_require__(94719);
const v1Toleration_1 = __nccwpck_require__(26379);
const v1TopologySelectorLabelRequirement_1 = __nccwpck_require__(14361);
const v1TopologySelectorTerm_1 = __nccwpck_require__(86872);
const v1TopologySpreadConstraint_1 = __nccwpck_require__(89521);
const v1TypedLocalObjectReference_1 = __nccwpck_require__(6602);
const v1UncountedTerminatedPods_1 = __nccwpck_require__(95702);
const v1UserInfo_1 = __nccwpck_require__(75476);
const v1ValidatingWebhook_1 = __nccwpck_require__(67027);
const v1ValidatingWebhookConfiguration_1 = __nccwpck_require__(98205);
const v1ValidatingWebhookConfigurationList_1 = __nccwpck_require__(3099);
const v1Volume_1 = __nccwpck_require__(61999);
const v1VolumeAttachment_1 = __nccwpck_require__(96086);
const v1VolumeAttachmentList_1 = __nccwpck_require__(50793);
const v1VolumeAttachmentSource_1 = __nccwpck_require__(81906);
const v1VolumeAttachmentSpec_1 = __nccwpck_require__(92848);
const v1VolumeAttachmentStatus_1 = __nccwpck_require__(69489);
const v1VolumeDevice_1 = __nccwpck_require__(12040);
const v1VolumeError_1 = __nccwpck_require__(67225);
const v1VolumeMount_1 = __nccwpck_require__(6290);
const v1VolumeNodeAffinity_1 = __nccwpck_require__(33698);
const v1VolumeNodeResources_1 = __nccwpck_require__(3991);
const v1VolumeProjection_1 = __nccwpck_require__(59985);
const v1VsphereVirtualDiskVolumeSource_1 = __nccwpck_require__(52589);
const v1WatchEvent_1 = __nccwpck_require__(67377);
const v1WebhookConversion_1 = __nccwpck_require__(5757);
const v1WeightedPodAffinityTerm_1 = __nccwpck_require__(49592);
const v1WindowsSecurityContextOptions_1 = __nccwpck_require__(35568);
const v1alpha1AggregationRule_1 = __nccwpck_require__(5287);
const v1alpha1CSIStorageCapacity_1 = __nccwpck_require__(76193);
const v1alpha1CSIStorageCapacityList_1 = __nccwpck_require__(29380);
const v1alpha1ClusterRole_1 = __nccwpck_require__(33927);
const v1alpha1ClusterRoleBinding_1 = __nccwpck_require__(65276);
const v1alpha1ClusterRoleBindingList_1 = __nccwpck_require__(83787);
const v1alpha1ClusterRoleList_1 = __nccwpck_require__(90989);
const v1alpha1Overhead_1 = __nccwpck_require__(8070);
const v1alpha1PolicyRule_1 = __nccwpck_require__(61014);
const v1alpha1PriorityClass_1 = __nccwpck_require__(89642);
const v1alpha1PriorityClassList_1 = __nccwpck_require__(15220);
const v1alpha1Role_1 = __nccwpck_require__(45910);
const v1alpha1RoleBinding_1 = __nccwpck_require__(32036);
const v1alpha1RoleBindingList_1 = __nccwpck_require__(53079);
const v1alpha1RoleList_1 = __nccwpck_require__(39479);
const v1alpha1RoleRef_1 = __nccwpck_require__(56871);
const v1alpha1RuntimeClass_1 = __nccwpck_require__(66602);
const v1alpha1RuntimeClassList_1 = __nccwpck_require__(41934);
const v1alpha1RuntimeClassSpec_1 = __nccwpck_require__(3593);
const v1alpha1Scheduling_1 = __nccwpck_require__(12511);
const v1alpha1ServerStorageVersion_1 = __nccwpck_require__(47647);
const v1alpha1StorageVersion_1 = __nccwpck_require__(54349);
const v1alpha1StorageVersionCondition_1 = __nccwpck_require__(20058);
const v1alpha1StorageVersionList_1 = __nccwpck_require__(53792);
const v1alpha1StorageVersionStatus_1 = __nccwpck_require__(20970);
const v1alpha1Subject_1 = __nccwpck_require__(69903);
const v1alpha1VolumeAttachment_1 = __nccwpck_require__(88392);
const v1alpha1VolumeAttachmentList_1 = __nccwpck_require__(49929);
const v1alpha1VolumeAttachmentSource_1 = __nccwpck_require__(23402);
const v1alpha1VolumeAttachmentSpec_1 = __nccwpck_require__(49584);
const v1alpha1VolumeAttachmentStatus_1 = __nccwpck_require__(94030);
const v1alpha1VolumeError_1 = __nccwpck_require__(39991);
const v1beta1AllowedCSIDriver_1 = __nccwpck_require__(7724);
const v1beta1AllowedFlexVolume_1 = __nccwpck_require__(66666);
const v1beta1AllowedHostPath_1 = __nccwpck_require__(29863);
const v1beta1CSIStorageCapacity_1 = __nccwpck_require__(30594);
const v1beta1CSIStorageCapacityList_1 = __nccwpck_require__(1496);
const v1beta1CronJob_1 = __nccwpck_require__(21270);
const v1beta1CronJobList_1 = __nccwpck_require__(9165);
const v1beta1CronJobSpec_1 = __nccwpck_require__(64672);
const v1beta1CronJobStatus_1 = __nccwpck_require__(60049);
const v1beta1Endpoint_1 = __nccwpck_require__(61730);
const v1beta1EndpointConditions_1 = __nccwpck_require__(37085);
const v1beta1EndpointHints_1 = __nccwpck_require__(35081);
const v1beta1EndpointPort_1 = __nccwpck_require__(7423);
const v1beta1EndpointSlice_1 = __nccwpck_require__(26777);
const v1beta1EndpointSliceList_1 = __nccwpck_require__(98830);
const v1beta1Event_1 = __nccwpck_require__(93967);
const v1beta1EventList_1 = __nccwpck_require__(64484);
const v1beta1EventSeries_1 = __nccwpck_require__(63533);
const v1beta1FSGroupStrategyOptions_1 = __nccwpck_require__(57091);
const v1beta1FlowDistinguisherMethod_1 = __nccwpck_require__(98441);
const v1beta1FlowSchema_1 = __nccwpck_require__(30089);
const v1beta1FlowSchemaCondition_1 = __nccwpck_require__(43801);
const v1beta1FlowSchemaList_1 = __nccwpck_require__(58382);
const v1beta1FlowSchemaSpec_1 = __nccwpck_require__(84478);
const v1beta1FlowSchemaStatus_1 = __nccwpck_require__(8076);
const v1beta1ForZone_1 = __nccwpck_require__(53942);
const v1beta1GroupSubject_1 = __nccwpck_require__(51807);
const v1beta1HostPortRange_1 = __nccwpck_require__(59514);
const v1beta1IDRange_1 = __nccwpck_require__(96831);
const v1beta1JobTemplateSpec_1 = __nccwpck_require__(75855);
const v1beta1LimitResponse_1 = __nccwpck_require__(8326);
const v1beta1LimitedPriorityLevelConfiguration_1 = __nccwpck_require__(40541);
const v1beta1NonResourcePolicyRule_1 = __nccwpck_require__(81655);
const v1beta1Overhead_1 = __nccwpck_require__(34396);
const v1beta1PodDisruptionBudget_1 = __nccwpck_require__(43485);
const v1beta1PodDisruptionBudgetList_1 = __nccwpck_require__(63931);
const v1beta1PodDisruptionBudgetSpec_1 = __nccwpck_require__(23257);
const v1beta1PodDisruptionBudgetStatus_1 = __nccwpck_require__(84404);
const v1beta1PodSecurityPolicy_1 = __nccwpck_require__(44289);
const v1beta1PodSecurityPolicyList_1 = __nccwpck_require__(90147);
const v1beta1PodSecurityPolicySpec_1 = __nccwpck_require__(72683);
const v1beta1PolicyRulesWithSubjects_1 = __nccwpck_require__(75714);
const v1beta1PriorityLevelConfiguration_1 = __nccwpck_require__(67813);
const v1beta1PriorityLevelConfigurationCondition_1 = __nccwpck_require__(60270);
const v1beta1PriorityLevelConfigurationList_1 = __nccwpck_require__(90435);
const v1beta1PriorityLevelConfigurationReference_1 = __nccwpck_require__(42319);
const v1beta1PriorityLevelConfigurationSpec_1 = __nccwpck_require__(10530);
const v1beta1PriorityLevelConfigurationStatus_1 = __nccwpck_require__(22546);
const v1beta1QueuingConfiguration_1 = __nccwpck_require__(62252);
const v1beta1ResourcePolicyRule_1 = __nccwpck_require__(5461);
const v1beta1RunAsGroupStrategyOptions_1 = __nccwpck_require__(65831);
const v1beta1RunAsUserStrategyOptions_1 = __nccwpck_require__(31079);
const v1beta1RuntimeClass_1 = __nccwpck_require__(75281);
const v1beta1RuntimeClassList_1 = __nccwpck_require__(47306);
const v1beta1RuntimeClassStrategyOptions_1 = __nccwpck_require__(50769);
const v1beta1SELinuxStrategyOptions_1 = __nccwpck_require__(49098);
const v1beta1Scheduling_1 = __nccwpck_require__(34651);
const v1beta1ServiceAccountSubject_1 = __nccwpck_require__(473);
const v1beta1Subject_1 = __nccwpck_require__(44509);
const v1beta1SupplementalGroupsStrategyOptions_1 = __nccwpck_require__(12802);
const v1beta1UserSubject_1 = __nccwpck_require__(11202);
const v2beta1ContainerResourceMetricSource_1 = __nccwpck_require__(37196);
const v2beta1ContainerResourceMetricStatus_1 = __nccwpck_require__(27287);
const v2beta1CrossVersionObjectReference_1 = __nccwpck_require__(36502);
const v2beta1ExternalMetricSource_1 = __nccwpck_require__(43128);
const v2beta1ExternalMetricStatus_1 = __nccwpck_require__(96606);
const v2beta1HorizontalPodAutoscaler_1 = __nccwpck_require__(74687);
const v2beta1HorizontalPodAutoscalerCondition_1 = __nccwpck_require__(89728);
const v2beta1HorizontalPodAutoscalerList_1 = __nccwpck_require__(89151);
const v2beta1HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(8786);
const v2beta1HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(66258);
const v2beta1MetricSpec_1 = __nccwpck_require__(98064);
const v2beta1MetricStatus_1 = __nccwpck_require__(25083);
const v2beta1ObjectMetricSource_1 = __nccwpck_require__(30639);
const v2beta1ObjectMetricStatus_1 = __nccwpck_require__(5950);
const v2beta1PodsMetricSource_1 = __nccwpck_require__(18291);
const v2beta1PodsMetricStatus_1 = __nccwpck_require__(83162);
const v2beta1ResourceMetricSource_1 = __nccwpck_require__(10150);
const v2beta1ResourceMetricStatus_1 = __nccwpck_require__(29521);
const v2beta2ContainerResourceMetricSource_1 = __nccwpck_require__(53209);
const v2beta2ContainerResourceMetricStatus_1 = __nccwpck_require__(69602);
const v2beta2CrossVersionObjectReference_1 = __nccwpck_require__(85029);
const v2beta2ExternalMetricSource_1 = __nccwpck_require__(75145);
const v2beta2ExternalMetricStatus_1 = __nccwpck_require__(12390);
const v2beta2HPAScalingPolicy_1 = __nccwpck_require__(34096);
const v2beta2HPAScalingRules_1 = __nccwpck_require__(33665);
const v2beta2HorizontalPodAutoscaler_1 = __nccwpck_require__(96952);
const v2beta2HorizontalPodAutoscalerBehavior_1 = __nccwpck_require__(41473);
const v2beta2HorizontalPodAutoscalerCondition_1 = __nccwpck_require__(67231);
const v2beta2HorizontalPodAutoscalerList_1 = __nccwpck_require__(46788);
const v2beta2HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(17298);
const v2beta2HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(60715);
const v2beta2MetricIdentifier_1 = __nccwpck_require__(73280);
const v2beta2MetricSpec_1 = __nccwpck_require__(54941);
const v2beta2MetricStatus_1 = __nccwpck_require__(5415);
const v2beta2MetricTarget_1 = __nccwpck_require__(17383);
const v2beta2MetricValueStatus_1 = __nccwpck_require__(61416);
const v2beta2ObjectMetricSource_1 = __nccwpck_require__(56126);
const v2beta2ObjectMetricStatus_1 = __nccwpck_require__(60958);
const v2beta2PodsMetricSource_1 = __nccwpck_require__(46865);
const v2beta2PodsMetricStatus_1 = __nccwpck_require__(78411);
const v2beta2ResourceMetricSource_1 = __nccwpck_require__(23137);
const v2beta2ResourceMetricStatus_1 = __nccwpck_require__(849);
const versionInfo_1 = __nccwpck_require__(17451);
/* tslint:disable:no-unused-variable */
let primitives = [
"string",
"boolean",
"double",
"integer",
"long",
"float",
"number",
"any"
];
let enumsMap = {};
let typeMap = {
"AdmissionregistrationV1ServiceReference": admissionregistrationV1ServiceReference_1.AdmissionregistrationV1ServiceReference,
"AdmissionregistrationV1WebhookClientConfig": admissionregistrationV1WebhookClientConfig_1.AdmissionregistrationV1WebhookClientConfig,
"ApiextensionsV1ServiceReference": apiextensionsV1ServiceReference_1.ApiextensionsV1ServiceReference,
"ApiextensionsV1WebhookClientConfig": apiextensionsV1WebhookClientConfig_1.ApiextensionsV1WebhookClientConfig,
"ApiregistrationV1ServiceReference": apiregistrationV1ServiceReference_1.ApiregistrationV1ServiceReference,
"AuthenticationV1TokenRequest": authenticationV1TokenRequest_1.AuthenticationV1TokenRequest,
"CoreV1EndpointPort": coreV1EndpointPort_1.CoreV1EndpointPort,
"CoreV1Event": coreV1Event_1.CoreV1Event,
"CoreV1EventList": coreV1EventList_1.CoreV1EventList,
"CoreV1EventSeries": coreV1EventSeries_1.CoreV1EventSeries,
"DiscoveryV1EndpointPort": discoveryV1EndpointPort_1.DiscoveryV1EndpointPort,
"EventsV1Event": eventsV1Event_1.EventsV1Event,
"EventsV1EventList": eventsV1EventList_1.EventsV1EventList,
"EventsV1EventSeries": eventsV1EventSeries_1.EventsV1EventSeries,
"StorageV1TokenRequest": storageV1TokenRequest_1.StorageV1TokenRequest,
"V1APIGroup": v1APIGroup_1.V1APIGroup,
"V1APIGroupList": v1APIGroupList_1.V1APIGroupList,
"V1APIResource": v1APIResource_1.V1APIResource,
"V1APIResourceList": v1APIResourceList_1.V1APIResourceList,
"V1APIService": v1APIService_1.V1APIService,
"V1APIServiceCondition": v1APIServiceCondition_1.V1APIServiceCondition,
"V1APIServiceList": v1APIServiceList_1.V1APIServiceList,
"V1APIServiceSpec": v1APIServiceSpec_1.V1APIServiceSpec,
"V1APIServiceStatus": v1APIServiceStatus_1.V1APIServiceStatus,
"V1APIVersions": v1APIVersions_1.V1APIVersions,
"V1AWSElasticBlockStoreVolumeSource": v1AWSElasticBlockStoreVolumeSource_1.V1AWSElasticBlockStoreVolumeSource,
"V1Affinity": v1Affinity_1.V1Affinity,
"V1AggregationRule": v1AggregationRule_1.V1AggregationRule,
"V1AttachedVolume": v1AttachedVolume_1.V1AttachedVolume,
"V1AzureDiskVolumeSource": v1AzureDiskVolumeSource_1.V1AzureDiskVolumeSource,
"V1AzureFilePersistentVolumeSource": v1AzureFilePersistentVolumeSource_1.V1AzureFilePersistentVolumeSource,
"V1AzureFileVolumeSource": v1AzureFileVolumeSource_1.V1AzureFileVolumeSource,
"V1Binding": v1Binding_1.V1Binding,
"V1BoundObjectReference": v1BoundObjectReference_1.V1BoundObjectReference,
"V1CSIDriver": v1CSIDriver_1.V1CSIDriver,
"V1CSIDriverList": v1CSIDriverList_1.V1CSIDriverList,
"V1CSIDriverSpec": v1CSIDriverSpec_1.V1CSIDriverSpec,
"V1CSINode": v1CSINode_1.V1CSINode,
"V1CSINodeDriver": v1CSINodeDriver_1.V1CSINodeDriver,
"V1CSINodeList": v1CSINodeList_1.V1CSINodeList,
"V1CSINodeSpec": v1CSINodeSpec_1.V1CSINodeSpec,
"V1CSIPersistentVolumeSource": v1CSIPersistentVolumeSource_1.V1CSIPersistentVolumeSource,
"V1CSIVolumeSource": v1CSIVolumeSource_1.V1CSIVolumeSource,
"V1Capabilities": v1Capabilities_1.V1Capabilities,
"V1CephFSPersistentVolumeSource": v1CephFSPersistentVolumeSource_1.V1CephFSPersistentVolumeSource,
"V1CephFSVolumeSource": v1CephFSVolumeSource_1.V1CephFSVolumeSource,
"V1CertificateSigningRequest": v1CertificateSigningRequest_1.V1CertificateSigningRequest,
"V1CertificateSigningRequestCondition": v1CertificateSigningRequestCondition_1.V1CertificateSigningRequestCondition,
"V1CertificateSigningRequestList": v1CertificateSigningRequestList_1.V1CertificateSigningRequestList,
"V1CertificateSigningRequestSpec": v1CertificateSigningRequestSpec_1.V1CertificateSigningRequestSpec,
"V1CertificateSigningRequestStatus": v1CertificateSigningRequestStatus_1.V1CertificateSigningRequestStatus,
"V1CinderPersistentVolumeSource": v1CinderPersistentVolumeSource_1.V1CinderPersistentVolumeSource,
"V1CinderVolumeSource": v1CinderVolumeSource_1.V1CinderVolumeSource,
"V1ClientIPConfig": v1ClientIPConfig_1.V1ClientIPConfig,
"V1ClusterRole": v1ClusterRole_1.V1ClusterRole,
"V1ClusterRoleBinding": v1ClusterRoleBinding_1.V1ClusterRoleBinding,
"V1ClusterRoleBindingList": v1ClusterRoleBindingList_1.V1ClusterRoleBindingList,
"V1ClusterRoleList": v1ClusterRoleList_1.V1ClusterRoleList,
"V1ComponentCondition": v1ComponentCondition_1.V1ComponentCondition,
"V1ComponentStatus": v1ComponentStatus_1.V1ComponentStatus,
"V1ComponentStatusList": v1ComponentStatusList_1.V1ComponentStatusList,
"V1Condition": v1Condition_1.V1Condition,
"V1ConfigMap": v1ConfigMap_1.V1ConfigMap,
"V1ConfigMapEnvSource": v1ConfigMapEnvSource_1.V1ConfigMapEnvSource,
"V1ConfigMapKeySelector": v1ConfigMapKeySelector_1.V1ConfigMapKeySelector,
"V1ConfigMapList": v1ConfigMapList_1.V1ConfigMapList,
"V1ConfigMapNodeConfigSource": v1ConfigMapNodeConfigSource_1.V1ConfigMapNodeConfigSource,
"V1ConfigMapProjection": v1ConfigMapProjection_1.V1ConfigMapProjection,
"V1ConfigMapVolumeSource": v1ConfigMapVolumeSource_1.V1ConfigMapVolumeSource,
"V1Container": v1Container_1.V1Container,
"V1ContainerImage": v1ContainerImage_1.V1ContainerImage,
"V1ContainerPort": v1ContainerPort_1.V1ContainerPort,
"V1ContainerState": v1ContainerState_1.V1ContainerState,
"V1ContainerStateRunning": v1ContainerStateRunning_1.V1ContainerStateRunning,
"V1ContainerStateTerminated": v1ContainerStateTerminated_1.V1ContainerStateTerminated,
"V1ContainerStateWaiting": v1ContainerStateWaiting_1.V1ContainerStateWaiting,
"V1ContainerStatus": v1ContainerStatus_1.V1ContainerStatus,
"V1ControllerRevision": v1ControllerRevision_1.V1ControllerRevision,
"V1ControllerRevisionList": v1ControllerRevisionList_1.V1ControllerRevisionList,
"V1CronJob": v1CronJob_1.V1CronJob,
"V1CronJobList": v1CronJobList_1.V1CronJobList,
"V1CronJobSpec": v1CronJobSpec_1.V1CronJobSpec,
"V1CronJobStatus": v1CronJobStatus_1.V1CronJobStatus,
"V1CrossVersionObjectReference": v1CrossVersionObjectReference_1.V1CrossVersionObjectReference,
"V1CustomResourceColumnDefinition": v1CustomResourceColumnDefinition_1.V1CustomResourceColumnDefinition,
"V1CustomResourceConversion": v1CustomResourceConversion_1.V1CustomResourceConversion,
"V1CustomResourceDefinition": v1CustomResourceDefinition_1.V1CustomResourceDefinition,
"V1CustomResourceDefinitionCondition": v1CustomResourceDefinitionCondition_1.V1CustomResourceDefinitionCondition,
"V1CustomResourceDefinitionList": v1CustomResourceDefinitionList_1.V1CustomResourceDefinitionList,
"V1CustomResourceDefinitionNames": v1CustomResourceDefinitionNames_1.V1CustomResourceDefinitionNames,
"V1CustomResourceDefinitionSpec": v1CustomResourceDefinitionSpec_1.V1CustomResourceDefinitionSpec,
"V1CustomResourceDefinitionStatus": v1CustomResourceDefinitionStatus_1.V1CustomResourceDefinitionStatus,
"V1CustomResourceDefinitionVersion": v1CustomResourceDefinitionVersion_1.V1CustomResourceDefinitionVersion,
"V1CustomResourceSubresourceScale": v1CustomResourceSubresourceScale_1.V1CustomResourceSubresourceScale,
"V1CustomResourceSubresources": v1CustomResourceSubresources_1.V1CustomResourceSubresources,
"V1CustomResourceValidation": v1CustomResourceValidation_1.V1CustomResourceValidation,
"V1DaemonEndpoint": v1DaemonEndpoint_1.V1DaemonEndpoint,
"V1DaemonSet": v1DaemonSet_1.V1DaemonSet,
"V1DaemonSetCondition": v1DaemonSetCondition_1.V1DaemonSetCondition,
"V1DaemonSetList": v1DaemonSetList_1.V1DaemonSetList,
"V1DaemonSetSpec": v1DaemonSetSpec_1.V1DaemonSetSpec,
"V1DaemonSetStatus": v1DaemonSetStatus_1.V1DaemonSetStatus,
"V1DaemonSetUpdateStrategy": v1DaemonSetUpdateStrategy_1.V1DaemonSetUpdateStrategy,
"V1DeleteOptions": v1DeleteOptions_1.V1DeleteOptions,
"V1Deployment": v1Deployment_1.V1Deployment,
"V1DeploymentCondition": v1DeploymentCondition_1.V1DeploymentCondition,
"V1DeploymentList": v1DeploymentList_1.V1DeploymentList,
"V1DeploymentSpec": v1DeploymentSpec_1.V1DeploymentSpec,
"V1DeploymentStatus": v1DeploymentStatus_1.V1DeploymentStatus,
"V1DeploymentStrategy": v1DeploymentStrategy_1.V1DeploymentStrategy,
"V1DownwardAPIProjection": v1DownwardAPIProjection_1.V1DownwardAPIProjection,
"V1DownwardAPIVolumeFile": v1DownwardAPIVolumeFile_1.V1DownwardAPIVolumeFile,
"V1DownwardAPIVolumeSource": v1DownwardAPIVolumeSource_1.V1DownwardAPIVolumeSource,
"V1EmptyDirVolumeSource": v1EmptyDirVolumeSource_1.V1EmptyDirVolumeSource,
"V1Endpoint": v1Endpoint_1.V1Endpoint,
"V1EndpointAddress": v1EndpointAddress_1.V1EndpointAddress,
"V1EndpointConditions": v1EndpointConditions_1.V1EndpointConditions,
"V1EndpointHints": v1EndpointHints_1.V1EndpointHints,
"V1EndpointSlice": v1EndpointSlice_1.V1EndpointSlice,
"V1EndpointSliceList": v1EndpointSliceList_1.V1EndpointSliceList,
"V1EndpointSubset": v1EndpointSubset_1.V1EndpointSubset,
"V1Endpoints": v1Endpoints_1.V1Endpoints,
"V1EndpointsList": v1EndpointsList_1.V1EndpointsList,
"V1EnvFromSource": v1EnvFromSource_1.V1EnvFromSource,
"V1EnvVar": v1EnvVar_1.V1EnvVar,
"V1EnvVarSource": v1EnvVarSource_1.V1EnvVarSource,
"V1EphemeralContainer": v1EphemeralContainer_1.V1EphemeralContainer,
"V1EphemeralVolumeSource": v1EphemeralVolumeSource_1.V1EphemeralVolumeSource,
"V1EventSource": v1EventSource_1.V1EventSource,
"V1Eviction": v1Eviction_1.V1Eviction,
"V1ExecAction": v1ExecAction_1.V1ExecAction,
"V1ExternalDocumentation": v1ExternalDocumentation_1.V1ExternalDocumentation,
"V1FCVolumeSource": v1FCVolumeSource_1.V1FCVolumeSource,
"V1FlexPersistentVolumeSource": v1FlexPersistentVolumeSource_1.V1FlexPersistentVolumeSource,
"V1FlexVolumeSource": v1FlexVolumeSource_1.V1FlexVolumeSource,
"V1FlockerVolumeSource": v1FlockerVolumeSource_1.V1FlockerVolumeSource,
"V1ForZone": v1ForZone_1.V1ForZone,
"V1GCEPersistentDiskVolumeSource": v1GCEPersistentDiskVolumeSource_1.V1GCEPersistentDiskVolumeSource,
"V1GitRepoVolumeSource": v1GitRepoVolumeSource_1.V1GitRepoVolumeSource,
"V1GlusterfsPersistentVolumeSource": v1GlusterfsPersistentVolumeSource_1.V1GlusterfsPersistentVolumeSource,
"V1GlusterfsVolumeSource": v1GlusterfsVolumeSource_1.V1GlusterfsVolumeSource,
"V1GroupVersionForDiscovery": v1GroupVersionForDiscovery_1.V1GroupVersionForDiscovery,
"V1HTTPGetAction": v1HTTPGetAction_1.V1HTTPGetAction,
"V1HTTPHeader": v1HTTPHeader_1.V1HTTPHeader,
"V1HTTPIngressPath": v1HTTPIngressPath_1.V1HTTPIngressPath,
"V1HTTPIngressRuleValue": v1HTTPIngressRuleValue_1.V1HTTPIngressRuleValue,
"V1Handler": v1Handler_1.V1Handler,
"V1HorizontalPodAutoscaler": v1HorizontalPodAutoscaler_1.V1HorizontalPodAutoscaler,
"V1HorizontalPodAutoscalerList": v1HorizontalPodAutoscalerList_1.V1HorizontalPodAutoscalerList,
"V1HorizontalPodAutoscalerSpec": v1HorizontalPodAutoscalerSpec_1.V1HorizontalPodAutoscalerSpec,
"V1HorizontalPodAutoscalerStatus": v1HorizontalPodAutoscalerStatus_1.V1HorizontalPodAutoscalerStatus,
"V1HostAlias": v1HostAlias_1.V1HostAlias,
"V1HostPathVolumeSource": v1HostPathVolumeSource_1.V1HostPathVolumeSource,
"V1IPBlock": v1IPBlock_1.V1IPBlock,
"V1ISCSIPersistentVolumeSource": v1ISCSIPersistentVolumeSource_1.V1ISCSIPersistentVolumeSource,
"V1ISCSIVolumeSource": v1ISCSIVolumeSource_1.V1ISCSIVolumeSource,
"V1Ingress": v1Ingress_1.V1Ingress,
"V1IngressBackend": v1IngressBackend_1.V1IngressBackend,
"V1IngressClass": v1IngressClass_1.V1IngressClass,
"V1IngressClassList": v1IngressClassList_1.V1IngressClassList,
"V1IngressClassParametersReference": v1IngressClassParametersReference_1.V1IngressClassParametersReference,
"V1IngressClassSpec": v1IngressClassSpec_1.V1IngressClassSpec,
"V1IngressList": v1IngressList_1.V1IngressList,
"V1IngressRule": v1IngressRule_1.V1IngressRule,
"V1IngressServiceBackend": v1IngressServiceBackend_1.V1IngressServiceBackend,
"V1IngressSpec": v1IngressSpec_1.V1IngressSpec,
"V1IngressStatus": v1IngressStatus_1.V1IngressStatus,
"V1IngressTLS": v1IngressTLS_1.V1IngressTLS,
"V1JSONSchemaProps": v1JSONSchemaProps_1.V1JSONSchemaProps,
"V1Job": v1Job_1.V1Job,
"V1JobCondition": v1JobCondition_1.V1JobCondition,
"V1JobList": v1JobList_1.V1JobList,
"V1JobSpec": v1JobSpec_1.V1JobSpec,
"V1JobStatus": v1JobStatus_1.V1JobStatus,
"V1JobTemplateSpec": v1JobTemplateSpec_1.V1JobTemplateSpec,
"V1KeyToPath": v1KeyToPath_1.V1KeyToPath,
"V1LabelSelector": v1LabelSelector_1.V1LabelSelector,
"V1LabelSelectorRequirement": v1LabelSelectorRequirement_1.V1LabelSelectorRequirement,
"V1Lease": v1Lease_1.V1Lease,
"V1LeaseList": v1LeaseList_1.V1LeaseList,
"V1LeaseSpec": v1LeaseSpec_1.V1LeaseSpec,
"V1Lifecycle": v1Lifecycle_1.V1Lifecycle,
"V1LimitRange": v1LimitRange_1.V1LimitRange,
"V1LimitRangeItem": v1LimitRangeItem_1.V1LimitRangeItem,
"V1LimitRangeList": v1LimitRangeList_1.V1LimitRangeList,
"V1LimitRangeSpec": v1LimitRangeSpec_1.V1LimitRangeSpec,
"V1ListMeta": v1ListMeta_1.V1ListMeta,
"V1LoadBalancerIngress": v1LoadBalancerIngress_1.V1LoadBalancerIngress,
"V1LoadBalancerStatus": v1LoadBalancerStatus_1.V1LoadBalancerStatus,
"V1LocalObjectReference": v1LocalObjectReference_1.V1LocalObjectReference,
"V1LocalSubjectAccessReview": v1LocalSubjectAccessReview_1.V1LocalSubjectAccessReview,
"V1LocalVolumeSource": v1LocalVolumeSource_1.V1LocalVolumeSource,
"V1ManagedFieldsEntry": v1ManagedFieldsEntry_1.V1ManagedFieldsEntry,
"V1MutatingWebhook": v1MutatingWebhook_1.V1MutatingWebhook,
"V1MutatingWebhookConfiguration": v1MutatingWebhookConfiguration_1.V1MutatingWebhookConfiguration,
"V1MutatingWebhookConfigurationList": v1MutatingWebhookConfigurationList_1.V1MutatingWebhookConfigurationList,
"V1NFSVolumeSource": v1NFSVolumeSource_1.V1NFSVolumeSource,
"V1Namespace": v1Namespace_1.V1Namespace,
"V1NamespaceCondition": v1NamespaceCondition_1.V1NamespaceCondition,
"V1NamespaceList": v1NamespaceList_1.V1NamespaceList,
"V1NamespaceSpec": v1NamespaceSpec_1.V1NamespaceSpec,
"V1NamespaceStatus": v1NamespaceStatus_1.V1NamespaceStatus,
"V1NetworkPolicy": v1NetworkPolicy_1.V1NetworkPolicy,
"V1NetworkPolicyEgressRule": v1NetworkPolicyEgressRule_1.V1NetworkPolicyEgressRule,
"V1NetworkPolicyIngressRule": v1NetworkPolicyIngressRule_1.V1NetworkPolicyIngressRule,
"V1NetworkPolicyList": v1NetworkPolicyList_1.V1NetworkPolicyList,
"V1NetworkPolicyPeer": v1NetworkPolicyPeer_1.V1NetworkPolicyPeer,
"V1NetworkPolicyPort": v1NetworkPolicyPort_1.V1NetworkPolicyPort,
"V1NetworkPolicySpec": v1NetworkPolicySpec_1.V1NetworkPolicySpec,
"V1Node": v1Node_1.V1Node,
"V1NodeAddress": v1NodeAddress_1.V1NodeAddress,
"V1NodeAffinity": v1NodeAffinity_1.V1NodeAffinity,
"V1NodeCondition": v1NodeCondition_1.V1NodeCondition,
"V1NodeConfigSource": v1NodeConfigSource_1.V1NodeConfigSource,
"V1NodeConfigStatus": v1NodeConfigStatus_1.V1NodeConfigStatus,
"V1NodeDaemonEndpoints": v1NodeDaemonEndpoints_1.V1NodeDaemonEndpoints,
"V1NodeList": v1NodeList_1.V1NodeList,
"V1NodeSelector": v1NodeSelector_1.V1NodeSelector,
"V1NodeSelectorRequirement": v1NodeSelectorRequirement_1.V1NodeSelectorRequirement,
"V1NodeSelectorTerm": v1NodeSelectorTerm_1.V1NodeSelectorTerm,
"V1NodeSpec": v1NodeSpec_1.V1NodeSpec,
"V1NodeStatus": v1NodeStatus_1.V1NodeStatus,
"V1NodeSystemInfo": v1NodeSystemInfo_1.V1NodeSystemInfo,
"V1NonResourceAttributes": v1NonResourceAttributes_1.V1NonResourceAttributes,
"V1NonResourceRule": v1NonResourceRule_1.V1NonResourceRule,
"V1ObjectFieldSelector": v1ObjectFieldSelector_1.V1ObjectFieldSelector,
"V1ObjectMeta": v1ObjectMeta_1.V1ObjectMeta,
"V1ObjectReference": v1ObjectReference_1.V1ObjectReference,
"V1Overhead": v1Overhead_1.V1Overhead,
"V1OwnerReference": v1OwnerReference_1.V1OwnerReference,
"V1PersistentVolume": v1PersistentVolume_1.V1PersistentVolume,
"V1PersistentVolumeClaim": v1PersistentVolumeClaim_1.V1PersistentVolumeClaim,
"V1PersistentVolumeClaimCondition": v1PersistentVolumeClaimCondition_1.V1PersistentVolumeClaimCondition,
"V1PersistentVolumeClaimList": v1PersistentVolumeClaimList_1.V1PersistentVolumeClaimList,
"V1PersistentVolumeClaimSpec": v1PersistentVolumeClaimSpec_1.V1PersistentVolumeClaimSpec,
"V1PersistentVolumeClaimStatus": v1PersistentVolumeClaimStatus_1.V1PersistentVolumeClaimStatus,
"V1PersistentVolumeClaimTemplate": v1PersistentVolumeClaimTemplate_1.V1PersistentVolumeClaimTemplate,
"V1PersistentVolumeClaimVolumeSource": v1PersistentVolumeClaimVolumeSource_1.V1PersistentVolumeClaimVolumeSource,
"V1PersistentVolumeList": v1PersistentVolumeList_1.V1PersistentVolumeList,
"V1PersistentVolumeSpec": v1PersistentVolumeSpec_1.V1PersistentVolumeSpec,
"V1PersistentVolumeStatus": v1PersistentVolumeStatus_1.V1PersistentVolumeStatus,
"V1PhotonPersistentDiskVolumeSource": v1PhotonPersistentDiskVolumeSource_1.V1PhotonPersistentDiskVolumeSource,
"V1Pod": v1Pod_1.V1Pod,
"V1PodAffinity": v1PodAffinity_1.V1PodAffinity,
"V1PodAffinityTerm": v1PodAffinityTerm_1.V1PodAffinityTerm,
"V1PodAntiAffinity": v1PodAntiAffinity_1.V1PodAntiAffinity,
"V1PodCondition": v1PodCondition_1.V1PodCondition,
"V1PodDNSConfig": v1PodDNSConfig_1.V1PodDNSConfig,
"V1PodDNSConfigOption": v1PodDNSConfigOption_1.V1PodDNSConfigOption,
"V1PodDisruptionBudget": v1PodDisruptionBudget_1.V1PodDisruptionBudget,
"V1PodDisruptionBudgetList": v1PodDisruptionBudgetList_1.V1PodDisruptionBudgetList,
"V1PodDisruptionBudgetSpec": v1PodDisruptionBudgetSpec_1.V1PodDisruptionBudgetSpec,
"V1PodDisruptionBudgetStatus": v1PodDisruptionBudgetStatus_1.V1PodDisruptionBudgetStatus,
"V1PodIP": v1PodIP_1.V1PodIP,
"V1PodList": v1PodList_1.V1PodList,
"V1PodReadinessGate": v1PodReadinessGate_1.V1PodReadinessGate,
"V1PodSecurityContext": v1PodSecurityContext_1.V1PodSecurityContext,
"V1PodSpec": v1PodSpec_1.V1PodSpec,
"V1PodStatus": v1PodStatus_1.V1PodStatus,
"V1PodTemplate": v1PodTemplate_1.V1PodTemplate,
"V1PodTemplateList": v1PodTemplateList_1.V1PodTemplateList,
"V1PodTemplateSpec": v1PodTemplateSpec_1.V1PodTemplateSpec,
"V1PolicyRule": v1PolicyRule_1.V1PolicyRule,
"V1PortStatus": v1PortStatus_1.V1PortStatus,
"V1PortworxVolumeSource": v1PortworxVolumeSource_1.V1PortworxVolumeSource,
"V1Preconditions": v1Preconditions_1.V1Preconditions,
"V1PreferredSchedulingTerm": v1PreferredSchedulingTerm_1.V1PreferredSchedulingTerm,
"V1PriorityClass": v1PriorityClass_1.V1PriorityClass,
"V1PriorityClassList": v1PriorityClassList_1.V1PriorityClassList,
"V1Probe": v1Probe_1.V1Probe,
"V1ProjectedVolumeSource": v1ProjectedVolumeSource_1.V1ProjectedVolumeSource,
"V1QuobyteVolumeSource": v1QuobyteVolumeSource_1.V1QuobyteVolumeSource,
"V1RBDPersistentVolumeSource": v1RBDPersistentVolumeSource_1.V1RBDPersistentVolumeSource,
"V1RBDVolumeSource": v1RBDVolumeSource_1.V1RBDVolumeSource,
"V1ReplicaSet": v1ReplicaSet_1.V1ReplicaSet,
"V1ReplicaSetCondition": v1ReplicaSetCondition_1.V1ReplicaSetCondition,
"V1ReplicaSetList": v1ReplicaSetList_1.V1ReplicaSetList,
"V1ReplicaSetSpec": v1ReplicaSetSpec_1.V1ReplicaSetSpec,
"V1ReplicaSetStatus": v1ReplicaSetStatus_1.V1ReplicaSetStatus,
"V1ReplicationController": v1ReplicationController_1.V1ReplicationController,
"V1ReplicationControllerCondition": v1ReplicationControllerCondition_1.V1ReplicationControllerCondition,
"V1ReplicationControllerList": v1ReplicationControllerList_1.V1ReplicationControllerList,
"V1ReplicationControllerSpec": v1ReplicationControllerSpec_1.V1ReplicationControllerSpec,
"V1ReplicationControllerStatus": v1ReplicationControllerStatus_1.V1ReplicationControllerStatus,
"V1ResourceAttributes": v1ResourceAttributes_1.V1ResourceAttributes,
"V1ResourceFieldSelector": v1ResourceFieldSelector_1.V1ResourceFieldSelector,
"V1ResourceQuota": v1ResourceQuota_1.V1ResourceQuota,
"V1ResourceQuotaList": v1ResourceQuotaList_1.V1ResourceQuotaList,
"V1ResourceQuotaSpec": v1ResourceQuotaSpec_1.V1ResourceQuotaSpec,
"V1ResourceQuotaStatus": v1ResourceQuotaStatus_1.V1ResourceQuotaStatus,
"V1ResourceRequirements": v1ResourceRequirements_1.V1ResourceRequirements,
"V1ResourceRule": v1ResourceRule_1.V1ResourceRule,
"V1Role": v1Role_1.V1Role,
"V1RoleBinding": v1RoleBinding_1.V1RoleBinding,
"V1RoleBindingList": v1RoleBindingList_1.V1RoleBindingList,
"V1RoleList": v1RoleList_1.V1RoleList,
"V1RoleRef": v1RoleRef_1.V1RoleRef,
"V1RollingUpdateDaemonSet": v1RollingUpdateDaemonSet_1.V1RollingUpdateDaemonSet,
"V1RollingUpdateDeployment": v1RollingUpdateDeployment_1.V1RollingUpdateDeployment,
"V1RollingUpdateStatefulSetStrategy": v1RollingUpdateStatefulSetStrategy_1.V1RollingUpdateStatefulSetStrategy,
"V1RuleWithOperations": v1RuleWithOperations_1.V1RuleWithOperations,
"V1RuntimeClass": v1RuntimeClass_1.V1RuntimeClass,
"V1RuntimeClassList": v1RuntimeClassList_1.V1RuntimeClassList,
"V1SELinuxOptions": v1SELinuxOptions_1.V1SELinuxOptions,
"V1Scale": v1Scale_1.V1Scale,
"V1ScaleIOPersistentVolumeSource": v1ScaleIOPersistentVolumeSource_1.V1ScaleIOPersistentVolumeSource,
"V1ScaleIOVolumeSource": v1ScaleIOVolumeSource_1.V1ScaleIOVolumeSource,
"V1ScaleSpec": v1ScaleSpec_1.V1ScaleSpec,
"V1ScaleStatus": v1ScaleStatus_1.V1ScaleStatus,
"V1Scheduling": v1Scheduling_1.V1Scheduling,
"V1ScopeSelector": v1ScopeSelector_1.V1ScopeSelector,
"V1ScopedResourceSelectorRequirement": v1ScopedResourceSelectorRequirement_1.V1ScopedResourceSelectorRequirement,
"V1SeccompProfile": v1SeccompProfile_1.V1SeccompProfile,
"V1Secret": v1Secret_1.V1Secret,
"V1SecretEnvSource": v1SecretEnvSource_1.V1SecretEnvSource,
"V1SecretKeySelector": v1SecretKeySelector_1.V1SecretKeySelector,
"V1SecretList": v1SecretList_1.V1SecretList,
"V1SecretProjection": v1SecretProjection_1.V1SecretProjection,
"V1SecretReference": v1SecretReference_1.V1SecretReference,
"V1SecretVolumeSource": v1SecretVolumeSource_1.V1SecretVolumeSource,
"V1SecurityContext": v1SecurityContext_1.V1SecurityContext,
"V1SelfSubjectAccessReview": v1SelfSubjectAccessReview_1.V1SelfSubjectAccessReview,
"V1SelfSubjectAccessReviewSpec": v1SelfSubjectAccessReviewSpec_1.V1SelfSubjectAccessReviewSpec,
"V1SelfSubjectRulesReview": v1SelfSubjectRulesReview_1.V1SelfSubjectRulesReview,
"V1SelfSubjectRulesReviewSpec": v1SelfSubjectRulesReviewSpec_1.V1SelfSubjectRulesReviewSpec,
"V1ServerAddressByClientCIDR": v1ServerAddressByClientCIDR_1.V1ServerAddressByClientCIDR,
"V1Service": v1Service_1.V1Service,
"V1ServiceAccount": v1ServiceAccount_1.V1ServiceAccount,
"V1ServiceAccountList": v1ServiceAccountList_1.V1ServiceAccountList,
"V1ServiceAccountTokenProjection": v1ServiceAccountTokenProjection_1.V1ServiceAccountTokenProjection,
"V1ServiceBackendPort": v1ServiceBackendPort_1.V1ServiceBackendPort,
"V1ServiceList": v1ServiceList_1.V1ServiceList,
"V1ServicePort": v1ServicePort_1.V1ServicePort,
"V1ServiceSpec": v1ServiceSpec_1.V1ServiceSpec,
"V1ServiceStatus": v1ServiceStatus_1.V1ServiceStatus,
"V1SessionAffinityConfig": v1SessionAffinityConfig_1.V1SessionAffinityConfig,
"V1StatefulSet": v1StatefulSet_1.V1StatefulSet,
"V1StatefulSetCondition": v1StatefulSetCondition_1.V1StatefulSetCondition,
"V1StatefulSetList": v1StatefulSetList_1.V1StatefulSetList,
"V1StatefulSetSpec": v1StatefulSetSpec_1.V1StatefulSetSpec,
"V1StatefulSetStatus": v1StatefulSetStatus_1.V1StatefulSetStatus,
"V1StatefulSetUpdateStrategy": v1StatefulSetUpdateStrategy_1.V1StatefulSetUpdateStrategy,
"V1Status": v1Status_1.V1Status,
"V1StatusCause": v1StatusCause_1.V1StatusCause,
"V1StatusDetails": v1StatusDetails_1.V1StatusDetails,
"V1StorageClass": v1StorageClass_1.V1StorageClass,
"V1StorageClassList": v1StorageClassList_1.V1StorageClassList,
"V1StorageOSPersistentVolumeSource": v1StorageOSPersistentVolumeSource_1.V1StorageOSPersistentVolumeSource,
"V1StorageOSVolumeSource": v1StorageOSVolumeSource_1.V1StorageOSVolumeSource,
"V1Subject": v1Subject_1.V1Subject,
"V1SubjectAccessReview": v1SubjectAccessReview_1.V1SubjectAccessReview,
"V1SubjectAccessReviewSpec": v1SubjectAccessReviewSpec_1.V1SubjectAccessReviewSpec,
"V1SubjectAccessReviewStatus": v1SubjectAccessReviewStatus_1.V1SubjectAccessReviewStatus,
"V1SubjectRulesReviewStatus": v1SubjectRulesReviewStatus_1.V1SubjectRulesReviewStatus,
"V1Sysctl": v1Sysctl_1.V1Sysctl,
"V1TCPSocketAction": v1TCPSocketAction_1.V1TCPSocketAction,
"V1Taint": v1Taint_1.V1Taint,
"V1TokenRequestSpec": v1TokenRequestSpec_1.V1TokenRequestSpec,
"V1TokenRequestStatus": v1TokenRequestStatus_1.V1TokenRequestStatus,
"V1TokenReview": v1TokenReview_1.V1TokenReview,
"V1TokenReviewSpec": v1TokenReviewSpec_1.V1TokenReviewSpec,
"V1TokenReviewStatus": v1TokenReviewStatus_1.V1TokenReviewStatus,
"V1Toleration": v1Toleration_1.V1Toleration,
"V1TopologySelectorLabelRequirement": v1TopologySelectorLabelRequirement_1.V1TopologySelectorLabelRequirement,
"V1TopologySelectorTerm": v1TopologySelectorTerm_1.V1TopologySelectorTerm,
"V1TopologySpreadConstraint": v1TopologySpreadConstraint_1.V1TopologySpreadConstraint,
"V1TypedLocalObjectReference": v1TypedLocalObjectReference_1.V1TypedLocalObjectReference,
"V1UncountedTerminatedPods": v1UncountedTerminatedPods_1.V1UncountedTerminatedPods,
"V1UserInfo": v1UserInfo_1.V1UserInfo,
"V1ValidatingWebhook": v1ValidatingWebhook_1.V1ValidatingWebhook,
"V1ValidatingWebhookConfiguration": v1ValidatingWebhookConfiguration_1.V1ValidatingWebhookConfiguration,
"V1ValidatingWebhookConfigurationList": v1ValidatingWebhookConfigurationList_1.V1ValidatingWebhookConfigurationList,
"V1Volume": v1Volume_1.V1Volume,
"V1VolumeAttachment": v1VolumeAttachment_1.V1VolumeAttachment,
"V1VolumeAttachmentList": v1VolumeAttachmentList_1.V1VolumeAttachmentList,
"V1VolumeAttachmentSource": v1VolumeAttachmentSource_1.V1VolumeAttachmentSource,
"V1VolumeAttachmentSpec": v1VolumeAttachmentSpec_1.V1VolumeAttachmentSpec,
"V1VolumeAttachmentStatus": v1VolumeAttachmentStatus_1.V1VolumeAttachmentStatus,
"V1VolumeDevice": v1VolumeDevice_1.V1VolumeDevice,
"V1VolumeError": v1VolumeError_1.V1VolumeError,
"V1VolumeMount": v1VolumeMount_1.V1VolumeMount,
"V1VolumeNodeAffinity": v1VolumeNodeAffinity_1.V1VolumeNodeAffinity,
"V1VolumeNodeResources": v1VolumeNodeResources_1.V1VolumeNodeResources,
"V1VolumeProjection": v1VolumeProjection_1.V1VolumeProjection,
"V1VsphereVirtualDiskVolumeSource": v1VsphereVirtualDiskVolumeSource_1.V1VsphereVirtualDiskVolumeSource,
"V1WatchEvent": v1WatchEvent_1.V1WatchEvent,
"V1WebhookConversion": v1WebhookConversion_1.V1WebhookConversion,
"V1WeightedPodAffinityTerm": v1WeightedPodAffinityTerm_1.V1WeightedPodAffinityTerm,
"V1WindowsSecurityContextOptions": v1WindowsSecurityContextOptions_1.V1WindowsSecurityContextOptions,
"V1alpha1AggregationRule": v1alpha1AggregationRule_1.V1alpha1AggregationRule,
"V1alpha1CSIStorageCapacity": v1alpha1CSIStorageCapacity_1.V1alpha1CSIStorageCapacity,
"V1alpha1CSIStorageCapacityList": v1alpha1CSIStorageCapacityList_1.V1alpha1CSIStorageCapacityList,
"V1alpha1ClusterRole": v1alpha1ClusterRole_1.V1alpha1ClusterRole,
"V1alpha1ClusterRoleBinding": v1alpha1ClusterRoleBinding_1.V1alpha1ClusterRoleBinding,
"V1alpha1ClusterRoleBindingList": v1alpha1ClusterRoleBindingList_1.V1alpha1ClusterRoleBindingList,
"V1alpha1ClusterRoleList": v1alpha1ClusterRoleList_1.V1alpha1ClusterRoleList,
"V1alpha1Overhead": v1alpha1Overhead_1.V1alpha1Overhead,
"V1alpha1PolicyRule": v1alpha1PolicyRule_1.V1alpha1PolicyRule,
"V1alpha1PriorityClass": v1alpha1PriorityClass_1.V1alpha1PriorityClass,
"V1alpha1PriorityClassList": v1alpha1PriorityClassList_1.V1alpha1PriorityClassList,
"V1alpha1Role": v1alpha1Role_1.V1alpha1Role,
"V1alpha1RoleBinding": v1alpha1RoleBinding_1.V1alpha1RoleBinding,
"V1alpha1RoleBindingList": v1alpha1RoleBindingList_1.V1alpha1RoleBindingList,
"V1alpha1RoleList": v1alpha1RoleList_1.V1alpha1RoleList,
"V1alpha1RoleRef": v1alpha1RoleRef_1.V1alpha1RoleRef,
"V1alpha1RuntimeClass": v1alpha1RuntimeClass_1.V1alpha1RuntimeClass,
"V1alpha1RuntimeClassList": v1alpha1RuntimeClassList_1.V1alpha1RuntimeClassList,
"V1alpha1RuntimeClassSpec": v1alpha1RuntimeClassSpec_1.V1alpha1RuntimeClassSpec,
"V1alpha1Scheduling": v1alpha1Scheduling_1.V1alpha1Scheduling,
"V1alpha1ServerStorageVersion": v1alpha1ServerStorageVersion_1.V1alpha1ServerStorageVersion,
"V1alpha1StorageVersion": v1alpha1StorageVersion_1.V1alpha1StorageVersion,
"V1alpha1StorageVersionCondition": v1alpha1StorageVersionCondition_1.V1alpha1StorageVersionCondition,
"V1alpha1StorageVersionList": v1alpha1StorageVersionList_1.V1alpha1StorageVersionList,
"V1alpha1StorageVersionStatus": v1alpha1StorageVersionStatus_1.V1alpha1StorageVersionStatus,
"V1alpha1Subject": v1alpha1Subject_1.V1alpha1Subject,
"V1alpha1VolumeAttachment": v1alpha1VolumeAttachment_1.V1alpha1VolumeAttachment,
"V1alpha1VolumeAttachmentList": v1alpha1VolumeAttachmentList_1.V1alpha1VolumeAttachmentList,
"V1alpha1VolumeAttachmentSource": v1alpha1VolumeAttachmentSource_1.V1alpha1VolumeAttachmentSource,
"V1alpha1VolumeAttachmentSpec": v1alpha1VolumeAttachmentSpec_1.V1alpha1VolumeAttachmentSpec,
"V1alpha1VolumeAttachmentStatus": v1alpha1VolumeAttachmentStatus_1.V1alpha1VolumeAttachmentStatus,
"V1alpha1VolumeError": v1alpha1VolumeError_1.V1alpha1VolumeError,
"V1beta1AllowedCSIDriver": v1beta1AllowedCSIDriver_1.V1beta1AllowedCSIDriver,
"V1beta1AllowedFlexVolume": v1beta1AllowedFlexVolume_1.V1beta1AllowedFlexVolume,
"V1beta1AllowedHostPath": v1beta1AllowedHostPath_1.V1beta1AllowedHostPath,
"V1beta1CSIStorageCapacity": v1beta1CSIStorageCapacity_1.V1beta1CSIStorageCapacity,
"V1beta1CSIStorageCapacityList": v1beta1CSIStorageCapacityList_1.V1beta1CSIStorageCapacityList,
"V1beta1CronJob": v1beta1CronJob_1.V1beta1CronJob,
"V1beta1CronJobList": v1beta1CronJobList_1.V1beta1CronJobList,
"V1beta1CronJobSpec": v1beta1CronJobSpec_1.V1beta1CronJobSpec,
"V1beta1CronJobStatus": v1beta1CronJobStatus_1.V1beta1CronJobStatus,
"V1beta1Endpoint": v1beta1Endpoint_1.V1beta1Endpoint,
"V1beta1EndpointConditions": v1beta1EndpointConditions_1.V1beta1EndpointConditions,
"V1beta1EndpointHints": v1beta1EndpointHints_1.V1beta1EndpointHints,
"V1beta1EndpointPort": v1beta1EndpointPort_1.V1beta1EndpointPort,
"V1beta1EndpointSlice": v1beta1EndpointSlice_1.V1beta1EndpointSlice,
"V1beta1EndpointSliceList": v1beta1EndpointSliceList_1.V1beta1EndpointSliceList,
"V1beta1Event": v1beta1Event_1.V1beta1Event,
"V1beta1EventList": v1beta1EventList_1.V1beta1EventList,
"V1beta1EventSeries": v1beta1EventSeries_1.V1beta1EventSeries,
"V1beta1FSGroupStrategyOptions": v1beta1FSGroupStrategyOptions_1.V1beta1FSGroupStrategyOptions,
"V1beta1FlowDistinguisherMethod": v1beta1FlowDistinguisherMethod_1.V1beta1FlowDistinguisherMethod,
"V1beta1FlowSchema": v1beta1FlowSchema_1.V1beta1FlowSchema,
"V1beta1FlowSchemaCondition": v1beta1FlowSchemaCondition_1.V1beta1FlowSchemaCondition,
"V1beta1FlowSchemaList": v1beta1FlowSchemaList_1.V1beta1FlowSchemaList,
"V1beta1FlowSchemaSpec": v1beta1FlowSchemaSpec_1.V1beta1FlowSchemaSpec,
"V1beta1FlowSchemaStatus": v1beta1FlowSchemaStatus_1.V1beta1FlowSchemaStatus,
"V1beta1ForZone": v1beta1ForZone_1.V1beta1ForZone,
"V1beta1GroupSubject": v1beta1GroupSubject_1.V1beta1GroupSubject,
"V1beta1HostPortRange": v1beta1HostPortRange_1.V1beta1HostPortRange,
"V1beta1IDRange": v1beta1IDRange_1.V1beta1IDRange,
"V1beta1JobTemplateSpec": v1beta1JobTemplateSpec_1.V1beta1JobTemplateSpec,
"V1beta1LimitResponse": v1beta1LimitResponse_1.V1beta1LimitResponse,
"V1beta1LimitedPriorityLevelConfiguration": v1beta1LimitedPriorityLevelConfiguration_1.V1beta1LimitedPriorityLevelConfiguration,
"V1beta1NonResourcePolicyRule": v1beta1NonResourcePolicyRule_1.V1beta1NonResourcePolicyRule,
"V1beta1Overhead": v1beta1Overhead_1.V1beta1Overhead,
"V1beta1PodDisruptionBudget": v1beta1PodDisruptionBudget_1.V1beta1PodDisruptionBudget,
"V1beta1PodDisruptionBudgetList": v1beta1PodDisruptionBudgetList_1.V1beta1PodDisruptionBudgetList,
"V1beta1PodDisruptionBudgetSpec": v1beta1PodDisruptionBudgetSpec_1.V1beta1PodDisruptionBudgetSpec,
"V1beta1PodDisruptionBudgetStatus": v1beta1PodDisruptionBudgetStatus_1.V1beta1PodDisruptionBudgetStatus,
"V1beta1PodSecurityPolicy": v1beta1PodSecurityPolicy_1.V1beta1PodSecurityPolicy,
"V1beta1PodSecurityPolicyList": v1beta1PodSecurityPolicyList_1.V1beta1PodSecurityPolicyList,
"V1beta1PodSecurityPolicySpec": v1beta1PodSecurityPolicySpec_1.V1beta1PodSecurityPolicySpec,
"V1beta1PolicyRulesWithSubjects": v1beta1PolicyRulesWithSubjects_1.V1beta1PolicyRulesWithSubjects,
"V1beta1PriorityLevelConfiguration": v1beta1PriorityLevelConfiguration_1.V1beta1PriorityLevelConfiguration,
"V1beta1PriorityLevelConfigurationCondition": v1beta1PriorityLevelConfigurationCondition_1.V1beta1PriorityLevelConfigurationCondition,
"V1beta1PriorityLevelConfigurationList": v1beta1PriorityLevelConfigurationList_1.V1beta1PriorityLevelConfigurationList,
"V1beta1PriorityLevelConfigurationReference": v1beta1PriorityLevelConfigurationReference_1.V1beta1PriorityLevelConfigurationReference,
"V1beta1PriorityLevelConfigurationSpec": v1beta1PriorityLevelConfigurationSpec_1.V1beta1PriorityLevelConfigurationSpec,
"V1beta1PriorityLevelConfigurationStatus": v1beta1PriorityLevelConfigurationStatus_1.V1beta1PriorityLevelConfigurationStatus,
"V1beta1QueuingConfiguration": v1beta1QueuingConfiguration_1.V1beta1QueuingConfiguration,
"V1beta1ResourcePolicyRule": v1beta1ResourcePolicyRule_1.V1beta1ResourcePolicyRule,
"V1beta1RunAsGroupStrategyOptions": v1beta1RunAsGroupStrategyOptions_1.V1beta1RunAsGroupStrategyOptions,
"V1beta1RunAsUserStrategyOptions": v1beta1RunAsUserStrategyOptions_1.V1beta1RunAsUserStrategyOptions,
"V1beta1RuntimeClass": v1beta1RuntimeClass_1.V1beta1RuntimeClass,
"V1beta1RuntimeClassList": v1beta1RuntimeClassList_1.V1beta1RuntimeClassList,
"V1beta1RuntimeClassStrategyOptions": v1beta1RuntimeClassStrategyOptions_1.V1beta1RuntimeClassStrategyOptions,
"V1beta1SELinuxStrategyOptions": v1beta1SELinuxStrategyOptions_1.V1beta1SELinuxStrategyOptions,
"V1beta1Scheduling": v1beta1Scheduling_1.V1beta1Scheduling,
"V1beta1ServiceAccountSubject": v1beta1ServiceAccountSubject_1.V1beta1ServiceAccountSubject,
"V1beta1Subject": v1beta1Subject_1.V1beta1Subject,
"V1beta1SupplementalGroupsStrategyOptions": v1beta1SupplementalGroupsStrategyOptions_1.V1beta1SupplementalGroupsStrategyOptions,
"V1beta1UserSubject": v1beta1UserSubject_1.V1beta1UserSubject,
"V2beta1ContainerResourceMetricSource": v2beta1ContainerResourceMetricSource_1.V2beta1ContainerResourceMetricSource,
"V2beta1ContainerResourceMetricStatus": v2beta1ContainerResourceMetricStatus_1.V2beta1ContainerResourceMetricStatus,
"V2beta1CrossVersionObjectReference": v2beta1CrossVersionObjectReference_1.V2beta1CrossVersionObjectReference,
"V2beta1ExternalMetricSource": v2beta1ExternalMetricSource_1.V2beta1ExternalMetricSource,
"V2beta1ExternalMetricStatus": v2beta1ExternalMetricStatus_1.V2beta1ExternalMetricStatus,
"V2beta1HorizontalPodAutoscaler": v2beta1HorizontalPodAutoscaler_1.V2beta1HorizontalPodAutoscaler,
"V2beta1HorizontalPodAutoscalerCondition": v2beta1HorizontalPodAutoscalerCondition_1.V2beta1HorizontalPodAutoscalerCondition,
"V2beta1HorizontalPodAutoscalerList": v2beta1HorizontalPodAutoscalerList_1.V2beta1HorizontalPodAutoscalerList,
"V2beta1HorizontalPodAutoscalerSpec": v2beta1HorizontalPodAutoscalerSpec_1.V2beta1HorizontalPodAutoscalerSpec,
"V2beta1HorizontalPodAutoscalerStatus": v2beta1HorizontalPodAutoscalerStatus_1.V2beta1HorizontalPodAutoscalerStatus,
"V2beta1MetricSpec": v2beta1MetricSpec_1.V2beta1MetricSpec,
"V2beta1MetricStatus": v2beta1MetricStatus_1.V2beta1MetricStatus,
"V2beta1ObjectMetricSource": v2beta1ObjectMetricSource_1.V2beta1ObjectMetricSource,
"V2beta1ObjectMetricStatus": v2beta1ObjectMetricStatus_1.V2beta1ObjectMetricStatus,
"V2beta1PodsMetricSource": v2beta1PodsMetricSource_1.V2beta1PodsMetricSource,
"V2beta1PodsMetricStatus": v2beta1PodsMetricStatus_1.V2beta1PodsMetricStatus,
"V2beta1ResourceMetricSource": v2beta1ResourceMetricSource_1.V2beta1ResourceMetricSource,
"V2beta1ResourceMetricStatus": v2beta1ResourceMetricStatus_1.V2beta1ResourceMetricStatus,
"V2beta2ContainerResourceMetricSource": v2beta2ContainerResourceMetricSource_1.V2beta2ContainerResourceMetricSource,
"V2beta2ContainerResourceMetricStatus": v2beta2ContainerResourceMetricStatus_1.V2beta2ContainerResourceMetricStatus,
"V2beta2CrossVersionObjectReference": v2beta2CrossVersionObjectReference_1.V2beta2CrossVersionObjectReference,
"V2beta2ExternalMetricSource": v2beta2ExternalMetricSource_1.V2beta2ExternalMetricSource,
"V2beta2ExternalMetricStatus": v2beta2ExternalMetricStatus_1.V2beta2ExternalMetricStatus,
"V2beta2HPAScalingPolicy": v2beta2HPAScalingPolicy_1.V2beta2HPAScalingPolicy,
"V2beta2HPAScalingRules": v2beta2HPAScalingRules_1.V2beta2HPAScalingRules,
"V2beta2HorizontalPodAutoscaler": v2beta2HorizontalPodAutoscaler_1.V2beta2HorizontalPodAutoscaler,
"V2beta2HorizontalPodAutoscalerBehavior": v2beta2HorizontalPodAutoscalerBehavior_1.V2beta2HorizontalPodAutoscalerBehavior,
"V2beta2HorizontalPodAutoscalerCondition": v2beta2HorizontalPodAutoscalerCondition_1.V2beta2HorizontalPodAutoscalerCondition,
"V2beta2HorizontalPodAutoscalerList": v2beta2HorizontalPodAutoscalerList_1.V2beta2HorizontalPodAutoscalerList,
"V2beta2HorizontalPodAutoscalerSpec": v2beta2HorizontalPodAutoscalerSpec_1.V2beta2HorizontalPodAutoscalerSpec,
"V2beta2HorizontalPodAutoscalerStatus": v2beta2HorizontalPodAutoscalerStatus_1.V2beta2HorizontalPodAutoscalerStatus,
"V2beta2MetricIdentifier": v2beta2MetricIdentifier_1.V2beta2MetricIdentifier,
"V2beta2MetricSpec": v2beta2MetricSpec_1.V2beta2MetricSpec,
"V2beta2MetricStatus": v2beta2MetricStatus_1.V2beta2MetricStatus,
"V2beta2MetricTarget": v2beta2MetricTarget_1.V2beta2MetricTarget,
"V2beta2MetricValueStatus": v2beta2MetricValueStatus_1.V2beta2MetricValueStatus,
"V2beta2ObjectMetricSource": v2beta2ObjectMetricSource_1.V2beta2ObjectMetricSource,
"V2beta2ObjectMetricStatus": v2beta2ObjectMetricStatus_1.V2beta2ObjectMetricStatus,
"V2beta2PodsMetricSource": v2beta2PodsMetricSource_1.V2beta2PodsMetricSource,
"V2beta2PodsMetricStatus": v2beta2PodsMetricStatus_1.V2beta2PodsMetricStatus,
"V2beta2ResourceMetricSource": v2beta2ResourceMetricSource_1.V2beta2ResourceMetricSource,
"V2beta2ResourceMetricStatus": v2beta2ResourceMetricStatus_1.V2beta2ResourceMetricStatus,
"VersionInfo": versionInfo_1.VersionInfo,
};
class ObjectSerializer {
static findCorrectType(data, expectedType) {
if (data == undefined) {
return expectedType;
}
else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
return expectedType;
}
else if (expectedType === "Date") {
return expectedType;
}
else {
if (enumsMap[expectedType]) {
return expectedType;
}
if (!typeMap[expectedType]) {
return expectedType; // w/e we don't know the type
}
// Check the discriminator
let discriminatorProperty = typeMap[expectedType].discriminator;
if (discriminatorProperty == null) {
return expectedType; // the type does not have a discriminator. use it.
}
else {
if (data[discriminatorProperty]) {
var discriminatorType = data[discriminatorProperty];
if (typeMap[discriminatorType]) {
return discriminatorType; // use the type given in the discriminator
}
else {
return expectedType; // discriminator did not map to a type
}
}
else {
return expectedType; // discriminator was not present (or an empty string)
}
}
}
}
static serialize(data, type) {
if (data == undefined) {
return data;
}
else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
}
else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType = type.replace("Array<", ""); // Array => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData = [];
for (let index = 0; index < data.length; index++) {
let datum = data[index];
transformedData.push(ObjectSerializer.serialize(datum, subType));
}
return transformedData;
}
else if (type === "Date") {
return data.toISOString();
}
else {
if (enumsMap[type]) {
return data;
}
if (!typeMap[type]) { // in case we dont know the type
return data;
}
// Get the actual type of this object
type = this.findCorrectType(data, type);
// get the map for the correct type.
let attributeTypes = typeMap[type].getAttributeTypeMap();
let instance = {};
for (let index = 0; index < attributeTypes.length; index++) {
let attributeType = attributeTypes[index];
instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
}
return instance;
}
}
static deserialize(data, type) {
// polymorphism may change the actual type.
type = ObjectSerializer.findCorrectType(data, type);
if (data == undefined) {
return data;
}
else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
}
else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType = type.replace("Array<", ""); // Array => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData = [];
for (let index = 0; index < data.length; index++) {
let datum = data[index];
transformedData.push(ObjectSerializer.deserialize(datum, subType));
}
return transformedData;
}
else if (type === "Date") {
return new Date(data);
}
else {
if (enumsMap[type]) { // is Enum
return data;
}
if (!typeMap[type]) { // dont know the type
return data;
}
let instance = new typeMap[type]();
let attributeTypes = typeMap[type].getAttributeTypeMap();
for (let index = 0; index < attributeTypes.length; index++) {
let attributeType = attributeTypes[index];
instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
}
return instance;
}
}
}
exports.ObjectSerializer = ObjectSerializer;
class HttpBasicAuth {
constructor() {
this.username = '';
this.password = '';
}
applyToRequest(requestOptions) {
requestOptions.auth = {
username: this.username, password: this.password
};
}
}
exports.HttpBasicAuth = HttpBasicAuth;
class HttpBearerAuth {
constructor() {
this.accessToken = '';
}
applyToRequest(requestOptions) {
if (requestOptions && requestOptions.headers) {
const accessToken = typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
requestOptions.headers["Authorization"] = "Bearer " + accessToken;
}
}
}
exports.HttpBearerAuth = HttpBearerAuth;
class ApiKeyAuth {
constructor(location, paramName) {
this.location = location;
this.paramName = paramName;
this.apiKey = '';
}
applyToRequest(requestOptions) {
if (this.location == "query") {
requestOptions.qs[this.paramName] = this.apiKey;
}
else if (this.location == "header" && requestOptions && requestOptions.headers) {
requestOptions.headers[this.paramName] = this.apiKey;
}
else if (this.location == 'cookie' && requestOptions && requestOptions.headers) {
if (requestOptions.headers['Cookie']) {
requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey);
}
else {
requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey);
}
}
}
}
exports.ApiKeyAuth = ApiKeyAuth;
class OAuth {
constructor() {
this.accessToken = '';
}
applyToRequest(requestOptions) {
if (requestOptions && requestOptions.headers) {
requestOptions.headers["Authorization"] = "Bearer " + this.accessToken;
}
}
}
exports.OAuth = OAuth;
class VoidAuth {
constructor() {
this.username = '';
this.password = '';
}
applyToRequest(_) {
// Do nothing
}
}
exports.VoidAuth = VoidAuth;
//# sourceMappingURL=models.js.map
/***/ }),
/***/ 25958:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageV1TokenRequest = void 0;
/**
* TokenRequest contains parameters of a service account token.
*/
class StorageV1TokenRequest {
static getAttributeTypeMap() {
return StorageV1TokenRequest.attributeTypeMap;
}
}
exports.StorageV1TokenRequest = StorageV1TokenRequest;
StorageV1TokenRequest.discriminator = undefined;
StorageV1TokenRequest.attributeTypeMap = [
{
"name": "audience",
"baseName": "audience",
"type": "string"
},
{
"name": "expirationSeconds",
"baseName": "expirationSeconds",
"type": "number"
}
];
//# sourceMappingURL=storageV1TokenRequest.js.map
/***/ }),
/***/ 44481:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIGroup = void 0;
/**
* APIGroup contains the name, the supported versions, and the preferred version of a group.
*/
class V1APIGroup {
static getAttributeTypeMap() {
return V1APIGroup.attributeTypeMap;
}
}
exports.V1APIGroup = V1APIGroup;
V1APIGroup.discriminator = undefined;
V1APIGroup.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "preferredVersion",
"baseName": "preferredVersion",
"type": "V1GroupVersionForDiscovery"
},
{
"name": "serverAddressByClientCIDRs",
"baseName": "serverAddressByClientCIDRs",
"type": "Array"
},
{
"name": "versions",
"baseName": "versions",
"type": "Array"
}
];
//# sourceMappingURL=v1APIGroup.js.map
/***/ }),
/***/ 52906:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIGroupList = void 0;
/**
* APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.
*/
class V1APIGroupList {
static getAttributeTypeMap() {
return V1APIGroupList.attributeTypeMap;
}
}
exports.V1APIGroupList = V1APIGroupList;
V1APIGroupList.discriminator = undefined;
V1APIGroupList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "groups",
"baseName": "groups",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
}
];
//# sourceMappingURL=v1APIGroupList.js.map
/***/ }),
/***/ 89033:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIResource = void 0;
/**
* APIResource specifies the name of a resource and whether it is namespaced.
*/
class V1APIResource {
static getAttributeTypeMap() {
return V1APIResource.attributeTypeMap;
}
}
exports.V1APIResource = V1APIResource;
V1APIResource.discriminator = undefined;
V1APIResource.attributeTypeMap = [
{
"name": "categories",
"baseName": "categories",
"type": "Array"
},
{
"name": "group",
"baseName": "group",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespaced",
"baseName": "namespaced",
"type": "boolean"
},
{
"name": "shortNames",
"baseName": "shortNames",
"type": "Array"
},
{
"name": "singularName",
"baseName": "singularName",
"type": "string"
},
{
"name": "storageVersionHash",
"baseName": "storageVersionHash",
"type": "string"
},
{
"name": "verbs",
"baseName": "verbs",
"type": "Array"
},
{
"name": "version",
"baseName": "version",
"type": "string"
}
];
//# sourceMappingURL=v1APIResource.js.map
/***/ }),
/***/ 5454:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIResourceList = void 0;
/**
* 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.
*/
class V1APIResourceList {
static getAttributeTypeMap() {
return V1APIResourceList.attributeTypeMap;
}
}
exports.V1APIResourceList = V1APIResourceList;
V1APIResourceList.discriminator = undefined;
V1APIResourceList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "groupVersion",
"baseName": "groupVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "resources",
"baseName": "resources",
"type": "Array"
}
];
//# sourceMappingURL=v1APIResourceList.js.map
/***/ }),
/***/ 99042:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIService = void 0;
/**
* APIService represents a server for a particular GroupVersion. Name must be \"version.group\".
*/
class V1APIService {
static getAttributeTypeMap() {
return V1APIService.attributeTypeMap;
}
}
exports.V1APIService = V1APIService;
V1APIService.discriminator = undefined;
V1APIService.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1APIServiceSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1APIServiceStatus"
}
];
//# sourceMappingURL=v1APIService.js.map
/***/ }),
/***/ 58352:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIServiceCondition = void 0;
/**
* APIServiceCondition describes the state of an APIService at a particular point
*/
class V1APIServiceCondition {
static getAttributeTypeMap() {
return V1APIServiceCondition.attributeTypeMap;
}
}
exports.V1APIServiceCondition = V1APIServiceCondition;
V1APIServiceCondition.discriminator = undefined;
V1APIServiceCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1APIServiceCondition.js.map
/***/ }),
/***/ 87198:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIServiceList = void 0;
/**
* APIServiceList is a list of APIService objects.
*/
class V1APIServiceList {
static getAttributeTypeMap() {
return V1APIServiceList.attributeTypeMap;
}
}
exports.V1APIServiceList = V1APIServiceList;
V1APIServiceList.discriminator = undefined;
V1APIServiceList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1APIServiceList.js.map
/***/ }),
/***/ 61496:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIServiceSpec = void 0;
/**
* APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.
*/
class V1APIServiceSpec {
static getAttributeTypeMap() {
return V1APIServiceSpec.attributeTypeMap;
}
}
exports.V1APIServiceSpec = V1APIServiceSpec;
V1APIServiceSpec.discriminator = undefined;
V1APIServiceSpec.attributeTypeMap = [
{
"name": "caBundle",
"baseName": "caBundle",
"type": "string"
},
{
"name": "group",
"baseName": "group",
"type": "string"
},
{
"name": "groupPriorityMinimum",
"baseName": "groupPriorityMinimum",
"type": "number"
},
{
"name": "insecureSkipTLSVerify",
"baseName": "insecureSkipTLSVerify",
"type": "boolean"
},
{
"name": "service",
"baseName": "service",
"type": "ApiregistrationV1ServiceReference"
},
{
"name": "version",
"baseName": "version",
"type": "string"
},
{
"name": "versionPriority",
"baseName": "versionPriority",
"type": "number"
}
];
//# sourceMappingURL=v1APIServiceSpec.js.map
/***/ }),
/***/ 17883:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIServiceStatus = void 0;
/**
* APIServiceStatus contains derived information about an API server
*/
class V1APIServiceStatus {
static getAttributeTypeMap() {
return V1APIServiceStatus.attributeTypeMap;
}
}
exports.V1APIServiceStatus = V1APIServiceStatus;
V1APIServiceStatus.discriminator = undefined;
V1APIServiceStatus.attributeTypeMap = [
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
}
];
//# sourceMappingURL=v1APIServiceStatus.js.map
/***/ }),
/***/ 93135:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIVersions = void 0;
/**
* 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.
*/
class V1APIVersions {
static getAttributeTypeMap() {
return V1APIVersions.attributeTypeMap;
}
}
exports.V1APIVersions = V1APIVersions;
V1APIVersions.discriminator = undefined;
V1APIVersions.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "serverAddressByClientCIDRs",
"baseName": "serverAddressByClientCIDRs",
"type": "Array"
},
{
"name": "versions",
"baseName": "versions",
"type": "Array"
}
];
//# sourceMappingURL=v1APIVersions.js.map
/***/ }),
/***/ 39808:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AWSElasticBlockStoreVolumeSource = void 0;
/**
* 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.
*/
class V1AWSElasticBlockStoreVolumeSource {
static getAttributeTypeMap() {
return V1AWSElasticBlockStoreVolumeSource.attributeTypeMap;
}
}
exports.V1AWSElasticBlockStoreVolumeSource = V1AWSElasticBlockStoreVolumeSource;
V1AWSElasticBlockStoreVolumeSource.discriminator = undefined;
V1AWSElasticBlockStoreVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "partition",
"baseName": "partition",
"type": "number"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "volumeID",
"baseName": "volumeID",
"type": "string"
}
];
//# sourceMappingURL=v1AWSElasticBlockStoreVolumeSource.js.map
/***/ }),
/***/ 61957:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Affinity = void 0;
/**
* Affinity is a group of affinity scheduling rules.
*/
class V1Affinity {
static getAttributeTypeMap() {
return V1Affinity.attributeTypeMap;
}
}
exports.V1Affinity = V1Affinity;
V1Affinity.discriminator = undefined;
V1Affinity.attributeTypeMap = [
{
"name": "nodeAffinity",
"baseName": "nodeAffinity",
"type": "V1NodeAffinity"
},
{
"name": "podAffinity",
"baseName": "podAffinity",
"type": "V1PodAffinity"
},
{
"name": "podAntiAffinity",
"baseName": "podAntiAffinity",
"type": "V1PodAntiAffinity"
}
];
//# sourceMappingURL=v1Affinity.js.map
/***/ }),
/***/ 90312:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AggregationRule = void 0;
/**
* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
*/
class V1AggregationRule {
static getAttributeTypeMap() {
return V1AggregationRule.attributeTypeMap;
}
}
exports.V1AggregationRule = V1AggregationRule;
V1AggregationRule.discriminator = undefined;
V1AggregationRule.attributeTypeMap = [
{
"name": "clusterRoleSelectors",
"baseName": "clusterRoleSelectors",
"type": "Array"
}
];
//# sourceMappingURL=v1AggregationRule.js.map
/***/ }),
/***/ 97069:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AttachedVolume = void 0;
/**
* AttachedVolume describes a volume attached to a node
*/
class V1AttachedVolume {
static getAttributeTypeMap() {
return V1AttachedVolume.attributeTypeMap;
}
}
exports.V1AttachedVolume = V1AttachedVolume;
V1AttachedVolume.discriminator = undefined;
V1AttachedVolume.attributeTypeMap = [
{
"name": "devicePath",
"baseName": "devicePath",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
}
];
//# sourceMappingURL=v1AttachedVolume.js.map
/***/ }),
/***/ 91312:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AzureDiskVolumeSource = void 0;
/**
* AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
*/
class V1AzureDiskVolumeSource {
static getAttributeTypeMap() {
return V1AzureDiskVolumeSource.attributeTypeMap;
}
}
exports.V1AzureDiskVolumeSource = V1AzureDiskVolumeSource;
V1AzureDiskVolumeSource.discriminator = undefined;
V1AzureDiskVolumeSource.attributeTypeMap = [
{
"name": "cachingMode",
"baseName": "cachingMode",
"type": "string"
},
{
"name": "diskName",
"baseName": "diskName",
"type": "string"
},
{
"name": "diskURI",
"baseName": "diskURI",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
}
];
//# sourceMappingURL=v1AzureDiskVolumeSource.js.map
/***/ }),
/***/ 23694:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AzureFilePersistentVolumeSource = void 0;
/**
* AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
*/
class V1AzureFilePersistentVolumeSource {
static getAttributeTypeMap() {
return V1AzureFilePersistentVolumeSource.attributeTypeMap;
}
}
exports.V1AzureFilePersistentVolumeSource = V1AzureFilePersistentVolumeSource;
V1AzureFilePersistentVolumeSource.discriminator = undefined;
V1AzureFilePersistentVolumeSource.attributeTypeMap = [
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretName",
"baseName": "secretName",
"type": "string"
},
{
"name": "secretNamespace",
"baseName": "secretNamespace",
"type": "string"
},
{
"name": "shareName",
"baseName": "shareName",
"type": "string"
}
];
//# sourceMappingURL=v1AzureFilePersistentVolumeSource.js.map
/***/ }),
/***/ 95073:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AzureFileVolumeSource = void 0;
/**
* AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
*/
class V1AzureFileVolumeSource {
static getAttributeTypeMap() {
return V1AzureFileVolumeSource.attributeTypeMap;
}
}
exports.V1AzureFileVolumeSource = V1AzureFileVolumeSource;
V1AzureFileVolumeSource.discriminator = undefined;
V1AzureFileVolumeSource.attributeTypeMap = [
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretName",
"baseName": "secretName",
"type": "string"
},
{
"name": "shareName",
"baseName": "shareName",
"type": "string"
}
];
//# sourceMappingURL=v1AzureFileVolumeSource.js.map
/***/ }),
/***/ 48551:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Binding = void 0;
/**
* 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.
*/
class V1Binding {
static getAttributeTypeMap() {
return V1Binding.attributeTypeMap;
}
}
exports.V1Binding = V1Binding;
V1Binding.discriminator = undefined;
V1Binding.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "target",
"baseName": "target",
"type": "V1ObjectReference"
}
];
//# sourceMappingURL=v1Binding.js.map
/***/ }),
/***/ 68849:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1BoundObjectReference = void 0;
/**
* BoundObjectReference is a reference to an object that a token is bound to.
*/
class V1BoundObjectReference {
static getAttributeTypeMap() {
return V1BoundObjectReference.attributeTypeMap;
}
}
exports.V1BoundObjectReference = V1BoundObjectReference;
V1BoundObjectReference.discriminator = undefined;
V1BoundObjectReference.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "uid",
"baseName": "uid",
"type": "string"
}
];
//# sourceMappingURL=v1BoundObjectReference.js.map
/***/ }),
/***/ 34144:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIDriver = void 0;
/**
* CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.
*/
class V1CSIDriver {
static getAttributeTypeMap() {
return V1CSIDriver.attributeTypeMap;
}
}
exports.V1CSIDriver = V1CSIDriver;
V1CSIDriver.discriminator = undefined;
V1CSIDriver.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CSIDriverSpec"
}
];
//# sourceMappingURL=v1CSIDriver.js.map
/***/ }),
/***/ 84881:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIDriverList = void 0;
/**
* CSIDriverList is a collection of CSIDriver objects.
*/
class V1CSIDriverList {
static getAttributeTypeMap() {
return V1CSIDriverList.attributeTypeMap;
}
}
exports.V1CSIDriverList = V1CSIDriverList;
V1CSIDriverList.discriminator = undefined;
V1CSIDriverList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CSIDriverList.js.map
/***/ }),
/***/ 11582:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIDriverSpec = void 0;
/**
* CSIDriverSpec is the specification of a CSIDriver.
*/
class V1CSIDriverSpec {
static getAttributeTypeMap() {
return V1CSIDriverSpec.attributeTypeMap;
}
}
exports.V1CSIDriverSpec = V1CSIDriverSpec;
V1CSIDriverSpec.discriminator = undefined;
V1CSIDriverSpec.attributeTypeMap = [
{
"name": "attachRequired",
"baseName": "attachRequired",
"type": "boolean"
},
{
"name": "fsGroupPolicy",
"baseName": "fsGroupPolicy",
"type": "string"
},
{
"name": "podInfoOnMount",
"baseName": "podInfoOnMount",
"type": "boolean"
},
{
"name": "requiresRepublish",
"baseName": "requiresRepublish",
"type": "boolean"
},
{
"name": "storageCapacity",
"baseName": "storageCapacity",
"type": "boolean"
},
{
"name": "tokenRequests",
"baseName": "tokenRequests",
"type": "Array"
},
{
"name": "volumeLifecycleModes",
"baseName": "volumeLifecycleModes",
"type": "Array"
}
];
//# sourceMappingURL=v1CSIDriverSpec.js.map
/***/ }),
/***/ 74315:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSINode = void 0;
/**
* CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn\'t create this object. CSINode has an OwnerReference that points to the corresponding node object.
*/
class V1CSINode {
static getAttributeTypeMap() {
return V1CSINode.attributeTypeMap;
}
}
exports.V1CSINode = V1CSINode;
V1CSINode.discriminator = undefined;
V1CSINode.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CSINodeSpec"
}
];
//# sourceMappingURL=v1CSINode.js.map
/***/ }),
/***/ 90288:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSINodeDriver = void 0;
/**
* CSINodeDriver holds information about the specification of one CSI driver installed on a node
*/
class V1CSINodeDriver {
static getAttributeTypeMap() {
return V1CSINodeDriver.attributeTypeMap;
}
}
exports.V1CSINodeDriver = V1CSINodeDriver;
V1CSINodeDriver.discriminator = undefined;
V1CSINodeDriver.attributeTypeMap = [
{
"name": "allocatable",
"baseName": "allocatable",
"type": "V1VolumeNodeResources"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "nodeID",
"baseName": "nodeID",
"type": "string"
},
{
"name": "topologyKeys",
"baseName": "topologyKeys",
"type": "Array"
}
];
//# sourceMappingURL=v1CSINodeDriver.js.map
/***/ }),
/***/ 24000:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSINodeList = void 0;
/**
* CSINodeList is a collection of CSINode objects.
*/
class V1CSINodeList {
static getAttributeTypeMap() {
return V1CSINodeList.attributeTypeMap;
}
}
exports.V1CSINodeList = V1CSINodeList;
V1CSINodeList.discriminator = undefined;
V1CSINodeList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CSINodeList.js.map
/***/ }),
/***/ 75636:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSINodeSpec = void 0;
/**
* CSINodeSpec holds information about the specification of all CSI drivers installed on a node
*/
class V1CSINodeSpec {
static getAttributeTypeMap() {
return V1CSINodeSpec.attributeTypeMap;
}
}
exports.V1CSINodeSpec = V1CSINodeSpec;
V1CSINodeSpec.discriminator = undefined;
V1CSINodeSpec.attributeTypeMap = [
{
"name": "drivers",
"baseName": "drivers",
"type": "Array"
}
];
//# sourceMappingURL=v1CSINodeSpec.js.map
/***/ }),
/***/ 98367:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIPersistentVolumeSource = void 0;
/**
* Represents storage that is managed by an external CSI volume driver (Beta feature)
*/
class V1CSIPersistentVolumeSource {
static getAttributeTypeMap() {
return V1CSIPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1CSIPersistentVolumeSource = V1CSIPersistentVolumeSource;
V1CSIPersistentVolumeSource.discriminator = undefined;
V1CSIPersistentVolumeSource.attributeTypeMap = [
{
"name": "controllerExpandSecretRef",
"baseName": "controllerExpandSecretRef",
"type": "V1SecretReference"
},
{
"name": "controllerPublishSecretRef",
"baseName": "controllerPublishSecretRef",
"type": "V1SecretReference"
},
{
"name": "driver",
"baseName": "driver",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "nodePublishSecretRef",
"baseName": "nodePublishSecretRef",
"type": "V1SecretReference"
},
{
"name": "nodeStageSecretRef",
"baseName": "nodeStageSecretRef",
"type": "V1SecretReference"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "volumeAttributes",
"baseName": "volumeAttributes",
"type": "{ [key: string]: string; }"
},
{
"name": "volumeHandle",
"baseName": "volumeHandle",
"type": "string"
}
];
//# sourceMappingURL=v1CSIPersistentVolumeSource.js.map
/***/ }),
/***/ 87598:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIVolumeSource = void 0;
/**
* Represents a source location of a volume to mount, managed by an external CSI driver
*/
class V1CSIVolumeSource {
static getAttributeTypeMap() {
return V1CSIVolumeSource.attributeTypeMap;
}
}
exports.V1CSIVolumeSource = V1CSIVolumeSource;
V1CSIVolumeSource.discriminator = undefined;
V1CSIVolumeSource.attributeTypeMap = [
{
"name": "driver",
"baseName": "driver",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "nodePublishSecretRef",
"baseName": "nodePublishSecretRef",
"type": "V1LocalObjectReference"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "volumeAttributes",
"baseName": "volumeAttributes",
"type": "{ [key: string]: string; }"
}
];
//# sourceMappingURL=v1CSIVolumeSource.js.map
/***/ }),
/***/ 82975:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Capabilities = void 0;
/**
* Adds and removes POSIX capabilities from running containers.
*/
class V1Capabilities {
static getAttributeTypeMap() {
return V1Capabilities.attributeTypeMap;
}
}
exports.V1Capabilities = V1Capabilities;
V1Capabilities.discriminator = undefined;
V1Capabilities.attributeTypeMap = [
{
"name": "add",
"baseName": "add",
"type": "Array"
},
{
"name": "drop",
"baseName": "drop",
"type": "Array"
}
];
//# sourceMappingURL=v1Capabilities.js.map
/***/ }),
/***/ 14268:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CephFSPersistentVolumeSource = void 0;
/**
* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
*/
class V1CephFSPersistentVolumeSource {
static getAttributeTypeMap() {
return V1CephFSPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1CephFSPersistentVolumeSource = V1CephFSPersistentVolumeSource;
V1CephFSPersistentVolumeSource.discriminator = undefined;
V1CephFSPersistentVolumeSource.attributeTypeMap = [
{
"name": "monitors",
"baseName": "monitors",
"type": "Array"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretFile",
"baseName": "secretFile",
"type": "string"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretReference"
},
{
"name": "user",
"baseName": "user",
"type": "string"
}
];
//# sourceMappingURL=v1CephFSPersistentVolumeSource.js.map
/***/ }),
/***/ 84957:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CephFSVolumeSource = void 0;
/**
* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
*/
class V1CephFSVolumeSource {
static getAttributeTypeMap() {
return V1CephFSVolumeSource.attributeTypeMap;
}
}
exports.V1CephFSVolumeSource = V1CephFSVolumeSource;
V1CephFSVolumeSource.discriminator = undefined;
V1CephFSVolumeSource.attributeTypeMap = [
{
"name": "monitors",
"baseName": "monitors",
"type": "Array"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretFile",
"baseName": "secretFile",
"type": "string"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1LocalObjectReference"
},
{
"name": "user",
"baseName": "user",
"type": "string"
}
];
//# sourceMappingURL=v1CephFSVolumeSource.js.map
/***/ }),
/***/ 99084:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequest = void 0;
/**
* CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. Kubelets use this API to obtain: 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName). 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName). This API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.
*/
class V1CertificateSigningRequest {
static getAttributeTypeMap() {
return V1CertificateSigningRequest.attributeTypeMap;
}
}
exports.V1CertificateSigningRequest = V1CertificateSigningRequest;
V1CertificateSigningRequest.discriminator = undefined;
V1CertificateSigningRequest.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CertificateSigningRequestSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1CertificateSigningRequestStatus"
}
];
//# sourceMappingURL=v1CertificateSigningRequest.js.map
/***/ }),
/***/ 92932:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequestCondition = void 0;
/**
* CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object
*/
class V1CertificateSigningRequestCondition {
static getAttributeTypeMap() {
return V1CertificateSigningRequestCondition.attributeTypeMap;
}
}
exports.V1CertificateSigningRequestCondition = V1CertificateSigningRequestCondition;
V1CertificateSigningRequestCondition.discriminator = undefined;
V1CertificateSigningRequestCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "lastUpdateTime",
"baseName": "lastUpdateTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1CertificateSigningRequestCondition.js.map
/***/ }),
/***/ 31530:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequestList = void 0;
/**
* CertificateSigningRequestList is a collection of CertificateSigningRequest objects
*/
class V1CertificateSigningRequestList {
static getAttributeTypeMap() {
return V1CertificateSigningRequestList.attributeTypeMap;
}
}
exports.V1CertificateSigningRequestList = V1CertificateSigningRequestList;
V1CertificateSigningRequestList.discriminator = undefined;
V1CertificateSigningRequestList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CertificateSigningRequestList.js.map
/***/ }),
/***/ 37759:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequestSpec = void 0;
/**
* CertificateSigningRequestSpec contains the certificate request.
*/
class V1CertificateSigningRequestSpec {
static getAttributeTypeMap() {
return V1CertificateSigningRequestSpec.attributeTypeMap;
}
}
exports.V1CertificateSigningRequestSpec = V1CertificateSigningRequestSpec;
V1CertificateSigningRequestSpec.discriminator = undefined;
V1CertificateSigningRequestSpec.attributeTypeMap = [
{
"name": "expirationSeconds",
"baseName": "expirationSeconds",
"type": "number"
},
{
"name": "extra",
"baseName": "extra",
"type": "{ [key: string]: Array; }"
},
{
"name": "groups",
"baseName": "groups",
"type": "Array"
},
{
"name": "request",
"baseName": "request",
"type": "string"
},
{
"name": "signerName",
"baseName": "signerName",
"type": "string"
},
{
"name": "uid",
"baseName": "uid",
"type": "string"
},
{
"name": "usages",
"baseName": "usages",
"type": "Array"
},
{
"name": "username",
"baseName": "username",
"type": "string"
}
];
//# sourceMappingURL=v1CertificateSigningRequestSpec.js.map
/***/ }),
/***/ 38285:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequestStatus = void 0;
/**
* CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.
*/
class V1CertificateSigningRequestStatus {
static getAttributeTypeMap() {
return V1CertificateSigningRequestStatus.attributeTypeMap;
}
}
exports.V1CertificateSigningRequestStatus = V1CertificateSigningRequestStatus;
V1CertificateSigningRequestStatus.discriminator = undefined;
V1CertificateSigningRequestStatus.attributeTypeMap = [
{
"name": "certificate",
"baseName": "certificate",
"type": "string"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
}
];
//# sourceMappingURL=v1CertificateSigningRequestStatus.js.map
/***/ }),
/***/ 41888:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CinderPersistentVolumeSource = void 0;
/**
* 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.
*/
class V1CinderPersistentVolumeSource {
static getAttributeTypeMap() {
return V1CinderPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1CinderPersistentVolumeSource = V1CinderPersistentVolumeSource;
V1CinderPersistentVolumeSource.discriminator = undefined;
V1CinderPersistentVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretReference"
},
{
"name": "volumeID",
"baseName": "volumeID",
"type": "string"
}
];
//# sourceMappingURL=v1CinderPersistentVolumeSource.js.map
/***/ }),
/***/ 19111:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CinderVolumeSource = void 0;
/**
* 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.
*/
class V1CinderVolumeSource {
static getAttributeTypeMap() {
return V1CinderVolumeSource.attributeTypeMap;
}
}
exports.V1CinderVolumeSource = V1CinderVolumeSource;
V1CinderVolumeSource.discriminator = undefined;
V1CinderVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1LocalObjectReference"
},
{
"name": "volumeID",
"baseName": "volumeID",
"type": "string"
}
];
//# sourceMappingURL=v1CinderVolumeSource.js.map
/***/ }),
/***/ 33913:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClientIPConfig = void 0;
/**
* ClientIPConfig represents the configurations of Client IP based session affinity.
*/
class V1ClientIPConfig {
static getAttributeTypeMap() {
return V1ClientIPConfig.attributeTypeMap;
}
}
exports.V1ClientIPConfig = V1ClientIPConfig;
V1ClientIPConfig.discriminator = undefined;
V1ClientIPConfig.attributeTypeMap = [
{
"name": "timeoutSeconds",
"baseName": "timeoutSeconds",
"type": "number"
}
];
//# sourceMappingURL=v1ClientIPConfig.js.map
/***/ }),
/***/ 61458:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClusterRole = void 0;
/**
* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
*/
class V1ClusterRole {
static getAttributeTypeMap() {
return V1ClusterRole.attributeTypeMap;
}
}
exports.V1ClusterRole = V1ClusterRole;
V1ClusterRole.discriminator = undefined;
V1ClusterRole.attributeTypeMap = [
{
"name": "aggregationRule",
"baseName": "aggregationRule",
"type": "V1AggregationRule"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "rules",
"baseName": "rules",
"type": "Array"
}
];
//# sourceMappingURL=v1ClusterRole.js.map
/***/ }),
/***/ 32315:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClusterRoleBinding = void 0;
/**
* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.
*/
class V1ClusterRoleBinding {
static getAttributeTypeMap() {
return V1ClusterRoleBinding.attributeTypeMap;
}
}
exports.V1ClusterRoleBinding = V1ClusterRoleBinding;
V1ClusterRoleBinding.discriminator = undefined;
V1ClusterRoleBinding.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "roleRef",
"baseName": "roleRef",
"type": "V1RoleRef"
},
{
"name": "subjects",
"baseName": "subjects",
"type": "Array"
}
];
//# sourceMappingURL=v1ClusterRoleBinding.js.map
/***/ }),
/***/ 21181:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClusterRoleBindingList = void 0;
/**
* ClusterRoleBindingList is a collection of ClusterRoleBindings
*/
class V1ClusterRoleBindingList {
static getAttributeTypeMap() {
return V1ClusterRoleBindingList.attributeTypeMap;
}
}
exports.V1ClusterRoleBindingList = V1ClusterRoleBindingList;
V1ClusterRoleBindingList.discriminator = undefined;
V1ClusterRoleBindingList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ClusterRoleBindingList.js.map
/***/ }),
/***/ 95532:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClusterRoleList = void 0;
/**
* ClusterRoleList is a collection of ClusterRoles
*/
class V1ClusterRoleList {
static getAttributeTypeMap() {
return V1ClusterRoleList.attributeTypeMap;
}
}
exports.V1ClusterRoleList = V1ClusterRoleList;
V1ClusterRoleList.discriminator = undefined;
V1ClusterRoleList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ClusterRoleList.js.map
/***/ }),
/***/ 30578:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ComponentCondition = void 0;
/**
* Information about the condition of a component.
*/
class V1ComponentCondition {
static getAttributeTypeMap() {
return V1ComponentCondition.attributeTypeMap;
}
}
exports.V1ComponentCondition = V1ComponentCondition;
V1ComponentCondition.discriminator = undefined;
V1ComponentCondition.attributeTypeMap = [
{
"name": "error",
"baseName": "error",
"type": "string"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1ComponentCondition.js.map
/***/ }),
/***/ 2047:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ComponentStatus = void 0;
/**
* ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+
*/
class V1ComponentStatus {
static getAttributeTypeMap() {
return V1ComponentStatus.attributeTypeMap;
}
}
exports.V1ComponentStatus = V1ComponentStatus;
V1ComponentStatus.discriminator = undefined;
V1ComponentStatus.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
}
];
//# sourceMappingURL=v1ComponentStatus.js.map
/***/ }),
/***/ 38596:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ComponentStatusList = void 0;
/**
* Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+
*/
class V1ComponentStatusList {
static getAttributeTypeMap() {
return V1ComponentStatusList.attributeTypeMap;
}
}
exports.V1ComponentStatusList = V1ComponentStatusList;
V1ComponentStatusList.discriminator = undefined;
V1ComponentStatusList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ComponentStatusList.js.map
/***/ }),
/***/ 34990:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Condition = void 0;
/**
* Condition contains details for one aspect of the current state of this API Resource.
*/
class V1Condition {
static getAttributeTypeMap() {
return V1Condition.attributeTypeMap;
}
}
exports.V1Condition = V1Condition;
V1Condition.discriminator = undefined;
V1Condition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "observedGeneration",
"baseName": "observedGeneration",
"type": "number"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1Condition.js.map
/***/ }),
/***/ 42874:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMap = void 0;
/**
* ConfigMap holds configuration data for pods to consume.
*/
class V1ConfigMap {
static getAttributeTypeMap() {
return V1ConfigMap.attributeTypeMap;
}
}
exports.V1ConfigMap = V1ConfigMap;
V1ConfigMap.discriminator = undefined;
V1ConfigMap.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "binaryData",
"baseName": "binaryData",
"type": "{ [key: string]: string; }"
},
{
"name": "data",
"baseName": "data",
"type": "{ [key: string]: string; }"
},
{
"name": "immutable",
"baseName": "immutable",
"type": "boolean"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
}
];
//# sourceMappingURL=v1ConfigMap.js.map
/***/ }),
/***/ 99685:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapEnvSource = void 0;
/**
* 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.
*/
class V1ConfigMapEnvSource {
static getAttributeTypeMap() {
return V1ConfigMapEnvSource.attributeTypeMap;
}
}
exports.V1ConfigMapEnvSource = V1ConfigMapEnvSource;
V1ConfigMapEnvSource.discriminator = undefined;
V1ConfigMapEnvSource.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "optional",
"baseName": "optional",
"type": "boolean"
}
];
//# sourceMappingURL=v1ConfigMapEnvSource.js.map
/***/ }),
/***/ 62892:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapKeySelector = void 0;
/**
* Selects a key from a ConfigMap.
*/
class V1ConfigMapKeySelector {
static getAttributeTypeMap() {
return V1ConfigMapKeySelector.attributeTypeMap;
}
}
exports.V1ConfigMapKeySelector = V1ConfigMapKeySelector;
V1ConfigMapKeySelector.discriminator = undefined;
V1ConfigMapKeySelector.attributeTypeMap = [
{
"name": "key",
"baseName": "key",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "optional",
"baseName": "optional",
"type": "boolean"
}
];
//# sourceMappingURL=v1ConfigMapKeySelector.js.map
/***/ }),
/***/ 80512:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapList = void 0;
/**
* ConfigMapList is a resource containing a list of ConfigMap objects.
*/
class V1ConfigMapList {
static getAttributeTypeMap() {
return V1ConfigMapList.attributeTypeMap;
}
}
exports.V1ConfigMapList = V1ConfigMapList;
V1ConfigMapList.discriminator = undefined;
V1ConfigMapList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ConfigMapList.js.map
/***/ }),
/***/ 56709:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapNodeConfigSource = void 0;
/**
* ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration
*/
class V1ConfigMapNodeConfigSource {
static getAttributeTypeMap() {
return V1ConfigMapNodeConfigSource.attributeTypeMap;
}
}
exports.V1ConfigMapNodeConfigSource = V1ConfigMapNodeConfigSource;
V1ConfigMapNodeConfigSource.discriminator = undefined;
V1ConfigMapNodeConfigSource.attributeTypeMap = [
{
"name": "kubeletConfigKey",
"baseName": "kubeletConfigKey",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "resourceVersion",
"baseName": "resourceVersion",
"type": "string"
},
{
"name": "uid",
"baseName": "uid",
"type": "string"
}
];
//# sourceMappingURL=v1ConfigMapNodeConfigSource.js.map
/***/ }),
/***/ 61682:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapProjection = void 0;
/**
* 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.
*/
class V1ConfigMapProjection {
static getAttributeTypeMap() {
return V1ConfigMapProjection.attributeTypeMap;
}
}
exports.V1ConfigMapProjection = V1ConfigMapProjection;
V1ConfigMapProjection.discriminator = undefined;
V1ConfigMapProjection.attributeTypeMap = [
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "optional",
"baseName": "optional",
"type": "boolean"
}
];
//# sourceMappingURL=v1ConfigMapProjection.js.map
/***/ }),
/***/ 59708:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapVolumeSource = void 0;
/**
* 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.
*/
class V1ConfigMapVolumeSource {
static getAttributeTypeMap() {
return V1ConfigMapVolumeSource.attributeTypeMap;
}
}
exports.V1ConfigMapVolumeSource = V1ConfigMapVolumeSource;
V1ConfigMapVolumeSource.discriminator = undefined;
V1ConfigMapVolumeSource.attributeTypeMap = [
{
"name": "defaultMode",
"baseName": "defaultMode",
"type": "number"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "optional",
"baseName": "optional",
"type": "boolean"
}
];
//# sourceMappingURL=v1ConfigMapVolumeSource.js.map
/***/ }),
/***/ 52865:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Container = void 0;
/**
* A single application container that you want to run within a pod.
*/
class V1Container {
static getAttributeTypeMap() {
return V1Container.attributeTypeMap;
}
}
exports.V1Container = V1Container;
V1Container.discriminator = undefined;
V1Container.attributeTypeMap = [
{
"name": "args",
"baseName": "args",
"type": "Array"
},
{
"name": "command",
"baseName": "command",
"type": "Array"
},
{
"name": "env",
"baseName": "env",
"type": "Array"
},
{
"name": "envFrom",
"baseName": "envFrom",
"type": "Array"
},
{
"name": "image",
"baseName": "image",
"type": "string"
},
{
"name": "imagePullPolicy",
"baseName": "imagePullPolicy",
"type": "string"
},
{
"name": "lifecycle",
"baseName": "lifecycle",
"type": "V1Lifecycle"
},
{
"name": "livenessProbe",
"baseName": "livenessProbe",
"type": "V1Probe"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "ports",
"baseName": "ports",
"type": "Array"
},
{
"name": "readinessProbe",
"baseName": "readinessProbe",
"type": "V1Probe"
},
{
"name": "resources",
"baseName": "resources",
"type": "V1ResourceRequirements"
},
{
"name": "securityContext",
"baseName": "securityContext",
"type": "V1SecurityContext"
},
{
"name": "startupProbe",
"baseName": "startupProbe",
"type": "V1Probe"
},
{
"name": "stdin",
"baseName": "stdin",
"type": "boolean"
},
{
"name": "stdinOnce",
"baseName": "stdinOnce",
"type": "boolean"
},
{
"name": "terminationMessagePath",
"baseName": "terminationMessagePath",
"type": "string"
},
{
"name": "terminationMessagePolicy",
"baseName": "terminationMessagePolicy",
"type": "string"
},
{
"name": "tty",
"baseName": "tty",
"type": "boolean"
},
{
"name": "volumeDevices",
"baseName": "volumeDevices",
"type": "Array"
},
{
"name": "volumeMounts",
"baseName": "volumeMounts",
"type": "Array"
},
{
"name": "workingDir",
"baseName": "workingDir",
"type": "string"
}
];
//# sourceMappingURL=v1Container.js.map
/***/ }),
/***/ 13501:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerImage = void 0;
/**
* Describe a container image
*/
class V1ContainerImage {
static getAttributeTypeMap() {
return V1ContainerImage.attributeTypeMap;
}
}
exports.V1ContainerImage = V1ContainerImage;
V1ContainerImage.discriminator = undefined;
V1ContainerImage.attributeTypeMap = [
{
"name": "names",
"baseName": "names",
"type": "Array"
},
{
"name": "sizeBytes",
"baseName": "sizeBytes",
"type": "number"
}
];
//# sourceMappingURL=v1ContainerImage.js.map
/***/ }),
/***/ 50217:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerPort = void 0;
/**
* ContainerPort represents a network port in a single container.
*/
class V1ContainerPort {
static getAttributeTypeMap() {
return V1ContainerPort.attributeTypeMap;
}
}
exports.V1ContainerPort = V1ContainerPort;
V1ContainerPort.discriminator = undefined;
V1ContainerPort.attributeTypeMap = [
{
"name": "containerPort",
"baseName": "containerPort",
"type": "number"
},
{
"name": "hostIP",
"baseName": "hostIP",
"type": "string"
},
{
"name": "hostPort",
"baseName": "hostPort",
"type": "number"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "protocol",
"baseName": "protocol",
"type": "string"
}
];
//# sourceMappingURL=v1ContainerPort.js.map
/***/ }),
/***/ 83765:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerState = void 0;
/**
* 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.
*/
class V1ContainerState {
static getAttributeTypeMap() {
return V1ContainerState.attributeTypeMap;
}
}
exports.V1ContainerState = V1ContainerState;
V1ContainerState.discriminator = undefined;
V1ContainerState.attributeTypeMap = [
{
"name": "running",
"baseName": "running",
"type": "V1ContainerStateRunning"
},
{
"name": "terminated",
"baseName": "terminated",
"type": "V1ContainerStateTerminated"
},
{
"name": "waiting",
"baseName": "waiting",
"type": "V1ContainerStateWaiting"
}
];
//# sourceMappingURL=v1ContainerState.js.map
/***/ }),
/***/ 89767:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerStateRunning = void 0;
/**
* ContainerStateRunning is a running state of a container.
*/
class V1ContainerStateRunning {
static getAttributeTypeMap() {
return V1ContainerStateRunning.attributeTypeMap;
}
}
exports.V1ContainerStateRunning = V1ContainerStateRunning;
V1ContainerStateRunning.discriminator = undefined;
V1ContainerStateRunning.attributeTypeMap = [
{
"name": "startedAt",
"baseName": "startedAt",
"type": "Date"
}
];
//# sourceMappingURL=v1ContainerStateRunning.js.map
/***/ }),
/***/ 27892:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerStateTerminated = void 0;
/**
* ContainerStateTerminated is a terminated state of a container.
*/
class V1ContainerStateTerminated {
static getAttributeTypeMap() {
return V1ContainerStateTerminated.attributeTypeMap;
}
}
exports.V1ContainerStateTerminated = V1ContainerStateTerminated;
V1ContainerStateTerminated.discriminator = undefined;
V1ContainerStateTerminated.attributeTypeMap = [
{
"name": "containerID",
"baseName": "containerID",
"type": "string"
},
{
"name": "exitCode",
"baseName": "exitCode",
"type": "number"
},
{
"name": "finishedAt",
"baseName": "finishedAt",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "signal",
"baseName": "signal",
"type": "number"
},
{
"name": "startedAt",
"baseName": "startedAt",
"type": "Date"
}
];
//# sourceMappingURL=v1ContainerStateTerminated.js.map
/***/ }),
/***/ 19716:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerStateWaiting = void 0;
/**
* ContainerStateWaiting is a waiting state of a container.
*/
class V1ContainerStateWaiting {
static getAttributeTypeMap() {
return V1ContainerStateWaiting.attributeTypeMap;
}
}
exports.V1ContainerStateWaiting = V1ContainerStateWaiting;
V1ContainerStateWaiting.discriminator = undefined;
V1ContainerStateWaiting.attributeTypeMap = [
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
}
];
//# sourceMappingURL=v1ContainerStateWaiting.js.map
/***/ }),
/***/ 35980:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerStatus = void 0;
/**
* ContainerStatus contains details for the current status of this container.
*/
class V1ContainerStatus {
static getAttributeTypeMap() {
return V1ContainerStatus.attributeTypeMap;
}
}
exports.V1ContainerStatus = V1ContainerStatus;
V1ContainerStatus.discriminator = undefined;
V1ContainerStatus.attributeTypeMap = [
{
"name": "containerID",
"baseName": "containerID",
"type": "string"
},
{
"name": "image",
"baseName": "image",
"type": "string"
},
{
"name": "imageID",
"baseName": "imageID",
"type": "string"
},
{
"name": "lastState",
"baseName": "lastState",
"type": "V1ContainerState"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "ready",
"baseName": "ready",
"type": "boolean"
},
{
"name": "restartCount",
"baseName": "restartCount",
"type": "number"
},
{
"name": "started",
"baseName": "started",
"type": "boolean"
},
{
"name": "state",
"baseName": "state",
"type": "V1ContainerState"
}
];
//# sourceMappingURL=v1ContainerStatus.js.map
/***/ }),
/***/ 78405:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ControllerRevision = void 0;
/**
* 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.
*/
class V1ControllerRevision {
static getAttributeTypeMap() {
return V1ControllerRevision.attributeTypeMap;
}
}
exports.V1ControllerRevision = V1ControllerRevision;
V1ControllerRevision.discriminator = undefined;
V1ControllerRevision.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "data",
"baseName": "data",
"type": "object"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "revision",
"baseName": "revision",
"type": "number"
}
];
//# sourceMappingURL=v1ControllerRevision.js.map
/***/ }),
/***/ 66304:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ControllerRevisionList = void 0;
/**
* ControllerRevisionList is a resource containing a list of ControllerRevision objects.
*/
class V1ControllerRevisionList {
static getAttributeTypeMap() {
return V1ControllerRevisionList.attributeTypeMap;
}
}
exports.V1ControllerRevisionList = V1ControllerRevisionList;
V1ControllerRevisionList.discriminator = undefined;
V1ControllerRevisionList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ControllerRevisionList.js.map
/***/ }),
/***/ 54382:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CronJob = void 0;
/**
* CronJob represents the configuration of a single cron job.
*/
class V1CronJob {
static getAttributeTypeMap() {
return V1CronJob.attributeTypeMap;
}
}
exports.V1CronJob = V1CronJob;
V1CronJob.discriminator = undefined;
V1CronJob.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CronJobSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1CronJobStatus"
}
];
//# sourceMappingURL=v1CronJob.js.map
/***/ }),
/***/ 72565:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CronJobList = void 0;
/**
* CronJobList is a collection of cron jobs.
*/
class V1CronJobList {
static getAttributeTypeMap() {
return V1CronJobList.attributeTypeMap;
}
}
exports.V1CronJobList = V1CronJobList;
V1CronJobList.discriminator = undefined;
V1CronJobList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CronJobList.js.map
/***/ }),
/***/ 7011:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CronJobSpec = void 0;
/**
* CronJobSpec describes how the job execution will look like and when it will actually run.
*/
class V1CronJobSpec {
static getAttributeTypeMap() {
return V1CronJobSpec.attributeTypeMap;
}
}
exports.V1CronJobSpec = V1CronJobSpec;
V1CronJobSpec.discriminator = undefined;
V1CronJobSpec.attributeTypeMap = [
{
"name": "concurrencyPolicy",
"baseName": "concurrencyPolicy",
"type": "string"
},
{
"name": "failedJobsHistoryLimit",
"baseName": "failedJobsHistoryLimit",
"type": "number"
},
{
"name": "jobTemplate",
"baseName": "jobTemplate",
"type": "V1JobTemplateSpec"
},
{
"name": "schedule",
"baseName": "schedule",
"type": "string"
},
{
"name": "startingDeadlineSeconds",
"baseName": "startingDeadlineSeconds",
"type": "number"
},
{
"name": "successfulJobsHistoryLimit",
"baseName": "successfulJobsHistoryLimit",
"type": "number"
},
{
"name": "suspend",
"baseName": "suspend",
"type": "boolean"
}
];
//# sourceMappingURL=v1CronJobSpec.js.map
/***/ }),
/***/ 24600:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CronJobStatus = void 0;
/**
* CronJobStatus represents the current state of a cron job.
*/
class V1CronJobStatus {
static getAttributeTypeMap() {
return V1CronJobStatus.attributeTypeMap;
}
}
exports.V1CronJobStatus = V1CronJobStatus;
V1CronJobStatus.discriminator = undefined;
V1CronJobStatus.attributeTypeMap = [
{
"name": "active",
"baseName": "active",
"type": "Array"
},
{
"name": "lastScheduleTime",
"baseName": "lastScheduleTime",
"type": "Date"
},
{
"name": "lastSuccessfulTime",
"baseName": "lastSuccessfulTime",
"type": "Date"
}
];
//# sourceMappingURL=v1CronJobStatus.js.map
/***/ }),
/***/ 34233:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CrossVersionObjectReference = void 0;
/**
* CrossVersionObjectReference contains enough information to let you identify the referred resource.
*/
class V1CrossVersionObjectReference {
static getAttributeTypeMap() {
return V1CrossVersionObjectReference.attributeTypeMap;
}
}
exports.V1CrossVersionObjectReference = V1CrossVersionObjectReference;
V1CrossVersionObjectReference.discriminator = undefined;
V1CrossVersionObjectReference.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
}
];
//# sourceMappingURL=v1CrossVersionObjectReference.js.map
/***/ }),
/***/ 94346:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceColumnDefinition = void 0;
/**
* CustomResourceColumnDefinition specifies a column for server side printing.
*/
class V1CustomResourceColumnDefinition {
static getAttributeTypeMap() {
return V1CustomResourceColumnDefinition.attributeTypeMap;
}
}
exports.V1CustomResourceColumnDefinition = V1CustomResourceColumnDefinition;
V1CustomResourceColumnDefinition.discriminator = undefined;
V1CustomResourceColumnDefinition.attributeTypeMap = [
{
"name": "description",
"baseName": "description",
"type": "string"
},
{
"name": "format",
"baseName": "format",
"type": "string"
},
{
"name": "jsonPath",
"baseName": "jsonPath",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "priority",
"baseName": "priority",
"type": "number"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1CustomResourceColumnDefinition.js.map
/***/ }),
/***/ 9731:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceConversion = void 0;
/**
* CustomResourceConversion describes how to convert different versions of a CR.
*/
class V1CustomResourceConversion {
static getAttributeTypeMap() {
return V1CustomResourceConversion.attributeTypeMap;
}
}
exports.V1CustomResourceConversion = V1CustomResourceConversion;
V1CustomResourceConversion.discriminator = undefined;
V1CustomResourceConversion.attributeTypeMap = [
{
"name": "strategy",
"baseName": "strategy",
"type": "string"
},
{
"name": "webhook",
"baseName": "webhook",
"type": "V1WebhookConversion"
}
];
//# sourceMappingURL=v1CustomResourceConversion.js.map
/***/ }),
/***/ 40325:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinition = void 0;
/**
* CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.
*/
class V1CustomResourceDefinition {
static getAttributeTypeMap() {
return V1CustomResourceDefinition.attributeTypeMap;
}
}
exports.V1CustomResourceDefinition = V1CustomResourceDefinition;
V1CustomResourceDefinition.discriminator = undefined;
V1CustomResourceDefinition.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CustomResourceDefinitionSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1CustomResourceDefinitionStatus"
}
];
//# sourceMappingURL=v1CustomResourceDefinition.js.map
/***/ }),
/***/ 32791:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionCondition = void 0;
/**
* CustomResourceDefinitionCondition contains details for the current condition of this pod.
*/
class V1CustomResourceDefinitionCondition {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionCondition.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionCondition = V1CustomResourceDefinitionCondition;
V1CustomResourceDefinitionCondition.discriminator = undefined;
V1CustomResourceDefinitionCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionCondition.js.map
/***/ }),
/***/ 10486:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionList = void 0;
/**
* CustomResourceDefinitionList is a list of CustomResourceDefinition objects.
*/
class V1CustomResourceDefinitionList {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionList.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionList = V1CustomResourceDefinitionList;
V1CustomResourceDefinitionList.discriminator = undefined;
V1CustomResourceDefinitionList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionList.js.map
/***/ }),
/***/ 69798:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionNames = void 0;
/**
* CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
*/
class V1CustomResourceDefinitionNames {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionNames.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionNames = V1CustomResourceDefinitionNames;
V1CustomResourceDefinitionNames.discriminator = undefined;
V1CustomResourceDefinitionNames.attributeTypeMap = [
{
"name": "categories",
"baseName": "categories",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "listKind",
"baseName": "listKind",
"type": "string"
},
{
"name": "plural",
"baseName": "plural",
"type": "string"
},
{
"name": "shortNames",
"baseName": "shortNames",
"type": "Array"
},
{
"name": "singular",
"baseName": "singular",
"type": "string"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionNames.js.map
/***/ }),
/***/ 20486:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionSpec = void 0;
/**
* CustomResourceDefinitionSpec describes how a user wants their resource to appear
*/
class V1CustomResourceDefinitionSpec {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionSpec.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionSpec = V1CustomResourceDefinitionSpec;
V1CustomResourceDefinitionSpec.discriminator = undefined;
V1CustomResourceDefinitionSpec.attributeTypeMap = [
{
"name": "conversion",
"baseName": "conversion",
"type": "V1CustomResourceConversion"
},
{
"name": "group",
"baseName": "group",
"type": "string"
},
{
"name": "names",
"baseName": "names",
"type": "V1CustomResourceDefinitionNames"
},
{
"name": "preserveUnknownFields",
"baseName": "preserveUnknownFields",
"type": "boolean"
},
{
"name": "scope",
"baseName": "scope",
"type": "string"
},
{
"name": "versions",
"baseName": "versions",
"type": "Array"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionSpec.js.map
/***/ }),
/***/ 25713:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionStatus = void 0;
/**
* CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
*/
class V1CustomResourceDefinitionStatus {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionStatus.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionStatus = V1CustomResourceDefinitionStatus;
V1CustomResourceDefinitionStatus.discriminator = undefined;
V1CustomResourceDefinitionStatus.attributeTypeMap = [
{
"name": "acceptedNames",
"baseName": "acceptedNames",
"type": "V1CustomResourceDefinitionNames"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
},
{
"name": "storedVersions",
"baseName": "storedVersions",
"type": "Array"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionStatus.js.map
/***/ }),
/***/ 82283:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionVersion = void 0;
/**
* CustomResourceDefinitionVersion describes a version for CRD.
*/
class V1CustomResourceDefinitionVersion {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionVersion.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionVersion = V1CustomResourceDefinitionVersion;
V1CustomResourceDefinitionVersion.discriminator = undefined;
V1CustomResourceDefinitionVersion.attributeTypeMap = [
{
"name": "additionalPrinterColumns",
"baseName": "additionalPrinterColumns",
"type": "Array"
},
{
"name": "deprecated",
"baseName": "deprecated",
"type": "boolean"
},
{
"name": "deprecationWarning",
"baseName": "deprecationWarning",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "schema",
"baseName": "schema",
"type": "V1CustomResourceValidation"
},
{
"name": "served",
"baseName": "served",
"type": "boolean"
},
{
"name": "storage",
"baseName": "storage",
"type": "boolean"
},
{
"name": "subresources",
"baseName": "subresources",
"type": "V1CustomResourceSubresources"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionVersion.js.map
/***/ }),
/***/ 98087:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceSubresourceScale = void 0;
/**
* CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
*/
class V1CustomResourceSubresourceScale {
static getAttributeTypeMap() {
return V1CustomResourceSubresourceScale.attributeTypeMap;
}
}
exports.V1CustomResourceSubresourceScale = V1CustomResourceSubresourceScale;
V1CustomResourceSubresourceScale.discriminator = undefined;
V1CustomResourceSubresourceScale.attributeTypeMap = [
{
"name": "labelSelectorPath",
"baseName": "labelSelectorPath",
"type": "string"
},
{
"name": "specReplicasPath",
"baseName": "specReplicasPath",
"type": "string"
},
{
"name": "statusReplicasPath",
"baseName": "statusReplicasPath",
"type": "string"
}
];
//# sourceMappingURL=v1CustomResourceSubresourceScale.js.map
/***/ }),
/***/ 94579:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceSubresources = void 0;
/**
* CustomResourceSubresources defines the status and scale subresources for CustomResources.
*/
class V1CustomResourceSubresources {
static getAttributeTypeMap() {
return V1CustomResourceSubresources.attributeTypeMap;
}
}
exports.V1CustomResourceSubresources = V1CustomResourceSubresources;
V1CustomResourceSubresources.discriminator = undefined;
V1CustomResourceSubresources.attributeTypeMap = [
{
"name": "scale",
"baseName": "scale",
"type": "V1CustomResourceSubresourceScale"
},
{
"name": "status",
"baseName": "status",
"type": "object"
}
];
//# sourceMappingURL=v1CustomResourceSubresources.js.map
/***/ }),
/***/ 25408:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceValidation = void 0;
/**
* CustomResourceValidation is a list of validation methods for CustomResources.
*/
class V1CustomResourceValidation {
static getAttributeTypeMap() {
return V1CustomResourceValidation.attributeTypeMap;
}
}
exports.V1CustomResourceValidation = V1CustomResourceValidation;
V1CustomResourceValidation.discriminator = undefined;
V1CustomResourceValidation.attributeTypeMap = [
{
"name": "openAPIV3Schema",
"baseName": "openAPIV3Schema",
"type": "V1JSONSchemaProps"
}
];
//# sourceMappingURL=v1CustomResourceValidation.js.map
/***/ }),
/***/ 37060:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonEndpoint = void 0;
/**
* DaemonEndpoint contains information about a single Daemon endpoint.
*/
class V1DaemonEndpoint {
static getAttributeTypeMap() {
return V1DaemonEndpoint.attributeTypeMap;
}
}
exports.V1DaemonEndpoint = V1DaemonEndpoint;
V1DaemonEndpoint.discriminator = undefined;
V1DaemonEndpoint.attributeTypeMap = [
{
"name": "Port",
"baseName": "Port",
"type": "number"
}
];
//# sourceMappingURL=v1DaemonEndpoint.js.map
/***/ }),
/***/ 32699:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSet = void 0;
/**
* DaemonSet represents the configuration of a daemon set.
*/
class V1DaemonSet {
static getAttributeTypeMap() {
return V1DaemonSet.attributeTypeMap;
}
}
exports.V1DaemonSet = V1DaemonSet;
V1DaemonSet.discriminator = undefined;
V1DaemonSet.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1DaemonSetSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1DaemonSetStatus"
}
];
//# sourceMappingURL=v1DaemonSet.js.map
/***/ }),
/***/ 77063:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetCondition = void 0;
/**
* DaemonSetCondition describes the state of a DaemonSet at a certain point.
*/
class V1DaemonSetCondition {
static getAttributeTypeMap() {
return V1DaemonSetCondition.attributeTypeMap;
}
}
exports.V1DaemonSetCondition = V1DaemonSetCondition;
V1DaemonSetCondition.discriminator = undefined;
V1DaemonSetCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1DaemonSetCondition.js.map
/***/ }),
/***/ 173:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetList = void 0;
/**
* DaemonSetList is a collection of daemon sets.
*/
class V1DaemonSetList {
static getAttributeTypeMap() {
return V1DaemonSetList.attributeTypeMap;
}
}
exports.V1DaemonSetList = V1DaemonSetList;
V1DaemonSetList.discriminator = undefined;
V1DaemonSetList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1DaemonSetList.js.map
/***/ }),
/***/ 44560:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetSpec = void 0;
/**
* DaemonSetSpec is the specification of a daemon set.
*/
class V1DaemonSetSpec {
static getAttributeTypeMap() {
return V1DaemonSetSpec.attributeTypeMap;
}
}
exports.V1DaemonSetSpec = V1DaemonSetSpec;
V1DaemonSetSpec.discriminator = undefined;
V1DaemonSetSpec.attributeTypeMap = [
{
"name": "minReadySeconds",
"baseName": "minReadySeconds",
"type": "number"
},
{
"name": "revisionHistoryLimit",
"baseName": "revisionHistoryLimit",
"type": "number"
},
{
"name": "selector",
"baseName": "selector",
"type": "V1LabelSelector"
},
{
"name": "template",
"baseName": "template",
"type": "V1PodTemplateSpec"
},
{
"name": "updateStrategy",
"baseName": "updateStrategy",
"type": "V1DaemonSetUpdateStrategy"
}
];
//# sourceMappingURL=v1DaemonSetSpec.js.map
/***/ }),
/***/ 87510:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetStatus = void 0;
/**
* DaemonSetStatus represents the current status of a daemon set.
*/
class V1DaemonSetStatus {
static getAttributeTypeMap() {
return V1DaemonSetStatus.attributeTypeMap;
}
}
exports.V1DaemonSetStatus = V1DaemonSetStatus;
V1DaemonSetStatus.discriminator = undefined;
V1DaemonSetStatus.attributeTypeMap = [
{
"name": "collisionCount",
"baseName": "collisionCount",
"type": "number"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
},
{
"name": "currentNumberScheduled",
"baseName": "currentNumberScheduled",
"type": "number"
},
{
"name": "desiredNumberScheduled",
"baseName": "desiredNumberScheduled",
"type": "number"
},
{
"name": "numberAvailable",
"baseName": "numberAvailable",
"type": "number"
},
{
"name": "numberMisscheduled",
"baseName": "numberMisscheduled",
"type": "number"
},
{
"name": "numberReady",
"baseName": "numberReady",
"type": "number"
},
{
"name": "numberUnavailable",
"baseName": "numberUnavailable",
"type": "number"
},
{
"name": "observedGeneration",
"baseName": "observedGeneration",
"type": "number"
},
{
"name": "updatedNumberScheduled",
"baseName": "updatedNumberScheduled",
"type": "number"
}
];
//# sourceMappingURL=v1DaemonSetStatus.js.map
/***/ }),
/***/ 48451:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetUpdateStrategy = void 0;
/**
* DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
*/
class V1DaemonSetUpdateStrategy {
static getAttributeTypeMap() {
return V1DaemonSetUpdateStrategy.attributeTypeMap;
}
}
exports.V1DaemonSetUpdateStrategy = V1DaemonSetUpdateStrategy;
V1DaemonSetUpdateStrategy.discriminator = undefined;
V1DaemonSetUpdateStrategy.attributeTypeMap = [
{
"name": "rollingUpdate",
"baseName": "rollingUpdate",
"type": "V1RollingUpdateDaemonSet"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1DaemonSetUpdateStrategy.js.map
/***/ }),
/***/ 18029:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeleteOptions = void 0;
/**
* DeleteOptions may be provided when deleting an API object.
*/
class V1DeleteOptions {
static getAttributeTypeMap() {
return V1DeleteOptions.attributeTypeMap;
}
}
exports.V1DeleteOptions = V1DeleteOptions;
V1DeleteOptions.discriminator = undefined;
V1DeleteOptions.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "dryRun",
"baseName": "dryRun",
"type": "Array"
},
{
"name": "gracePeriodSeconds",
"baseName": "gracePeriodSeconds",
"type": "number"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "orphanDependents",
"baseName": "orphanDependents",
"type": "boolean"
},
{
"name": "preconditions",
"baseName": "preconditions",
"type": "V1Preconditions"
},
{
"name": "propagationPolicy",
"baseName": "propagationPolicy",
"type": "string"
}
];
//# sourceMappingURL=v1DeleteOptions.js.map
/***/ }),
/***/ 65310:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Deployment = void 0;
/**
* Deployment enables declarative updates for Pods and ReplicaSets.
*/
class V1Deployment {
static getAttributeTypeMap() {
return V1Deployment.attributeTypeMap;
}
}
exports.V1Deployment = V1Deployment;
V1Deployment.discriminator = undefined;
V1Deployment.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1DeploymentSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1DeploymentStatus"
}
];
//# sourceMappingURL=v1Deployment.js.map
/***/ }),
/***/ 95602:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentCondition = void 0;
/**
* DeploymentCondition describes the state of a deployment at a certain point.
*/
class V1DeploymentCondition {
static getAttributeTypeMap() {
return V1DeploymentCondition.attributeTypeMap;
}
}
exports.V1DeploymentCondition = V1DeploymentCondition;
V1DeploymentCondition.discriminator = undefined;
V1DeploymentCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "lastUpdateTime",
"baseName": "lastUpdateTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1DeploymentCondition.js.map
/***/ }),
/***/ 81364:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentList = void 0;
/**
* DeploymentList is a list of Deployments.
*/
class V1DeploymentList {
static getAttributeTypeMap() {
return V1DeploymentList.attributeTypeMap;
}
}
exports.V1DeploymentList = V1DeploymentList;
V1DeploymentList.discriminator = undefined;
V1DeploymentList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1DeploymentList.js.map
/***/ }),
/***/ 41298:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentSpec = void 0;
/**
* DeploymentSpec is the specification of the desired behavior of the Deployment.
*/
class V1DeploymentSpec {
static getAttributeTypeMap() {
return V1DeploymentSpec.attributeTypeMap;
}
}
exports.V1DeploymentSpec = V1DeploymentSpec;
V1DeploymentSpec.discriminator = undefined;
V1DeploymentSpec.attributeTypeMap = [
{
"name": "minReadySeconds",
"baseName": "minReadySeconds",
"type": "number"
},
{
"name": "paused",
"baseName": "paused",
"type": "boolean"
},
{
"name": "progressDeadlineSeconds",
"baseName": "progressDeadlineSeconds",
"type": "number"
},
{
"name": "replicas",
"baseName": "replicas",
"type": "number"
},
{
"name": "revisionHistoryLimit",
"baseName": "revisionHistoryLimit",
"type": "number"
},
{
"name": "selector",
"baseName": "selector",
"type": "V1LabelSelector"
},
{
"name": "strategy",
"baseName": "strategy",
"type": "V1DeploymentStrategy"
},
{
"name": "template",
"baseName": "template",
"type": "V1PodTemplateSpec"
}
];
//# sourceMappingURL=v1DeploymentSpec.js.map
/***/ }),
/***/ 55398:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentStatus = void 0;
/**
* DeploymentStatus is the most recently observed status of the Deployment.
*/
class V1DeploymentStatus {
static getAttributeTypeMap() {
return V1DeploymentStatus.attributeTypeMap;
}
}
exports.V1DeploymentStatus = V1DeploymentStatus;
V1DeploymentStatus.discriminator = undefined;
V1DeploymentStatus.attributeTypeMap = [
{
"name": "availableReplicas",
"baseName": "availableReplicas",
"type": "number"
},
{
"name": "collisionCount",
"baseName": "collisionCount",
"type": "number"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
},
{
"name": "observedGeneration",
"baseName": "observedGeneration",
"type": "number"
},
{
"name": "readyReplicas",
"baseName": "readyReplicas",
"type": "number"
},
{
"name": "replicas",
"baseName": "replicas",
"type": "number"
},
{
"name": "unavailableReplicas",
"baseName": "unavailableReplicas",
"type": "number"
},
{
"name": "updatedReplicas",
"baseName": "updatedReplicas",
"type": "number"
}
];
//# sourceMappingURL=v1DeploymentStatus.js.map
/***/ }),
/***/ 34981:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentStrategy = void 0;
/**
* DeploymentStrategy describes how to replace existing pods with new ones.
*/
class V1DeploymentStrategy {
static getAttributeTypeMap() {
return V1DeploymentStrategy.attributeTypeMap;
}
}
exports.V1DeploymentStrategy = V1DeploymentStrategy;
V1DeploymentStrategy.discriminator = undefined;
V1DeploymentStrategy.attributeTypeMap = [
{
"name": "rollingUpdate",
"baseName": "rollingUpdate",
"type": "V1RollingUpdateDeployment"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1DeploymentStrategy.js.map
/***/ }),
/***/ 38099:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DownwardAPIProjection = void 0;
/**
* Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.
*/
class V1DownwardAPIProjection {
static getAttributeTypeMap() {
return V1DownwardAPIProjection.attributeTypeMap;
}
}
exports.V1DownwardAPIProjection = V1DownwardAPIProjection;
V1DownwardAPIProjection.discriminator = undefined;
V1DownwardAPIProjection.attributeTypeMap = [
{
"name": "items",
"baseName": "items",
"type": "Array"
}
];
//# sourceMappingURL=v1DownwardAPIProjection.js.map
/***/ }),
/***/ 78901:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DownwardAPIVolumeFile = void 0;
/**
* DownwardAPIVolumeFile represents information to create the file containing the pod field
*/
class V1DownwardAPIVolumeFile {
static getAttributeTypeMap() {
return V1DownwardAPIVolumeFile.attributeTypeMap;
}
}
exports.V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile;
V1DownwardAPIVolumeFile.discriminator = undefined;
V1DownwardAPIVolumeFile.attributeTypeMap = [
{
"name": "fieldRef",
"baseName": "fieldRef",
"type": "V1ObjectFieldSelector"
},
{
"name": "mode",
"baseName": "mode",
"type": "number"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "resourceFieldRef",
"baseName": "resourceFieldRef",
"type": "V1ResourceFieldSelector"
}
];
//# sourceMappingURL=v1DownwardAPIVolumeFile.js.map
/***/ }),
/***/ 19562:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DownwardAPIVolumeSource = void 0;
/**
* DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.
*/
class V1DownwardAPIVolumeSource {
static getAttributeTypeMap() {
return V1DownwardAPIVolumeSource.attributeTypeMap;
}
}
exports.V1DownwardAPIVolumeSource = V1DownwardAPIVolumeSource;
V1DownwardAPIVolumeSource.discriminator = undefined;
V1DownwardAPIVolumeSource.attributeTypeMap = [
{
"name": "defaultMode",
"baseName": "defaultMode",
"type": "number"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
}
];
//# sourceMappingURL=v1DownwardAPIVolumeSource.js.map
/***/ }),
/***/ 11672:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EmptyDirVolumeSource = void 0;
/**
* Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.
*/
class V1EmptyDirVolumeSource {
static getAttributeTypeMap() {
return V1EmptyDirVolumeSource.attributeTypeMap;
}
}
exports.V1EmptyDirVolumeSource = V1EmptyDirVolumeSource;
V1EmptyDirVolumeSource.discriminator = undefined;
V1EmptyDirVolumeSource.attributeTypeMap = [
{
"name": "medium",
"baseName": "medium",
"type": "string"
},
{
"name": "sizeLimit",
"baseName": "sizeLimit",
"type": "string"
}
];
//# sourceMappingURL=v1EmptyDirVolumeSource.js.map
/***/ }),
/***/ 17252:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Endpoint = void 0;
/**
* Endpoint represents a single logical \"backend\" implementing a service.
*/
class V1Endpoint {
static getAttributeTypeMap() {
return V1Endpoint.attributeTypeMap;
}
}
exports.V1Endpoint = V1Endpoint;
V1Endpoint.discriminator = undefined;
V1Endpoint.attributeTypeMap = [
{
"name": "addresses",
"baseName": "addresses",
"type": "Array"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "V1EndpointConditions"
},
{
"name": "deprecatedTopology",
"baseName": "deprecatedTopology",
"type": "{ [key: string]: string; }"
},
{
"name": "hints",
"baseName": "hints",
"type": "V1EndpointHints"
},
{
"name": "hostname",
"baseName": "hostname",
"type": "string"
},
{
"name": "nodeName",
"baseName": "nodeName",
"type": "string"
},
{
"name": "targetRef",
"baseName": "targetRef",
"type": "V1ObjectReference"
},
{
"name": "zone",
"baseName": "zone",
"type": "string"
}
];
//# sourceMappingURL=v1Endpoint.js.map
/***/ }),
/***/ 57151:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointAddress = void 0;
/**
* EndpointAddress is a tuple that describes single IP address.
*/
class V1EndpointAddress {
static getAttributeTypeMap() {
return V1EndpointAddress.attributeTypeMap;
}
}
exports.V1EndpointAddress = V1EndpointAddress;
V1EndpointAddress.discriminator = undefined;
V1EndpointAddress.attributeTypeMap = [
{
"name": "hostname",
"baseName": "hostname",
"type": "string"
},
{
"name": "ip",
"baseName": "ip",
"type": "string"
},
{
"name": "nodeName",
"baseName": "nodeName",
"type": "string"
},
{
"name": "targetRef",
"baseName": "targetRef",
"type": "V1ObjectReference"
}
];
//# sourceMappingURL=v1EndpointAddress.js.map
/***/ }),
/***/ 70435:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointConditions = void 0;
/**
* EndpointConditions represents the current condition of an endpoint.
*/
class V1EndpointConditions {
static getAttributeTypeMap() {
return V1EndpointConditions.attributeTypeMap;
}
}
exports.V1EndpointConditions = V1EndpointConditions;
V1EndpointConditions.discriminator = undefined;
V1EndpointConditions.attributeTypeMap = [
{
"name": "ready",
"baseName": "ready",
"type": "boolean"
},
{
"name": "serving",
"baseName": "serving",
"type": "boolean"
},
{
"name": "terminating",
"baseName": "terminating",
"type": "boolean"
}
];
//# sourceMappingURL=v1EndpointConditions.js.map
/***/ }),
/***/ 97000:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointHints = void 0;
/**
* EndpointHints provides hints describing how an endpoint should be consumed.
*/
class V1EndpointHints {
static getAttributeTypeMap() {
return V1EndpointHints.attributeTypeMap;
}
}
exports.V1EndpointHints = V1EndpointHints;
V1EndpointHints.discriminator = undefined;
V1EndpointHints.attributeTypeMap = [
{
"name": "forZones",
"baseName": "forZones",
"type": "Array"
}
];
//# sourceMappingURL=v1EndpointHints.js.map
/***/ }),
/***/ 53708:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointSlice = void 0;
/**
* EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
*/
class V1EndpointSlice {
static getAttributeTypeMap() {
return V1EndpointSlice.attributeTypeMap;
}
}
exports.V1EndpointSlice = V1EndpointSlice;
V1EndpointSlice.discriminator = undefined;
V1EndpointSlice.attributeTypeMap = [
{
"name": "addressType",
"baseName": "addressType",
"type": "string"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "endpoints",
"baseName": "endpoints",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "ports",
"baseName": "ports",
"type": "Array"
}
];
//# sourceMappingURL=v1EndpointSlice.js.map
/***/ }),
/***/ 6223:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointSliceList = void 0;
/**
* EndpointSliceList represents a list of endpoint slices
*/
class V1EndpointSliceList {
static getAttributeTypeMap() {
return V1EndpointSliceList.attributeTypeMap;
}
}
exports.V1EndpointSliceList = V1EndpointSliceList;
V1EndpointSliceList.discriminator = undefined;
V1EndpointSliceList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1EndpointSliceList.js.map
/***/ }),
/***/ 31925:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointSubset = void 0;
/**
* 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 ]
*/
class V1EndpointSubset {
static getAttributeTypeMap() {
return V1EndpointSubset.attributeTypeMap;
}
}
exports.V1EndpointSubset = V1EndpointSubset;
V1EndpointSubset.discriminator = undefined;
V1EndpointSubset.attributeTypeMap = [
{
"name": "addresses",
"baseName": "addresses",
"type": "Array"
},
{
"name": "notReadyAddresses",
"baseName": "notReadyAddresses",
"type": "Array"
},
{
"name": "ports",
"baseName": "ports",
"type": "Array"
}
];
//# sourceMappingURL=v1EndpointSubset.js.map
/***/ }),
/***/ 13449:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Endpoints = void 0;
/**
* 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}] }, ]
*/
class V1Endpoints {
static getAttributeTypeMap() {
return V1Endpoints.attributeTypeMap;
}
}
exports.V1Endpoints = V1Endpoints;
V1Endpoints.discriminator = undefined;
V1Endpoints.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "subsets",
"baseName": "subsets",
"type": "Array"
}
];
//# sourceMappingURL=v1Endpoints.js.map
/***/ }),
/***/ 69906:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointsList = void 0;
/**
* EndpointsList is a list of endpoints.
*/
class V1EndpointsList {
static getAttributeTypeMap() {
return V1EndpointsList.attributeTypeMap;
}
}
exports.V1EndpointsList = V1EndpointsList;
V1EndpointsList.discriminator = undefined;
V1EndpointsList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1EndpointsList.js.map
/***/ }),
/***/ 23074:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EnvFromSource = void 0;
/**
* EnvFromSource represents the source of a set of ConfigMaps
*/
class V1EnvFromSource {
static getAttributeTypeMap() {
return V1EnvFromSource.attributeTypeMap;
}
}
exports.V1EnvFromSource = V1EnvFromSource;
V1EnvFromSource.discriminator = undefined;
V1EnvFromSource.attributeTypeMap = [
{
"name": "configMapRef",
"baseName": "configMapRef",
"type": "V1ConfigMapEnvSource"
},
{
"name": "prefix",
"baseName": "prefix",
"type": "string"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretEnvSource"
}
];
//# sourceMappingURL=v1EnvFromSource.js.map
/***/ }),
/***/ 36874:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EnvVar = void 0;
/**
* EnvVar represents an environment variable present in a Container.
*/
class V1EnvVar {
static getAttributeTypeMap() {
return V1EnvVar.attributeTypeMap;
}
}
exports.V1EnvVar = V1EnvVar;
V1EnvVar.discriminator = undefined;
V1EnvVar.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "value",
"baseName": "value",
"type": "string"
},
{
"name": "valueFrom",
"baseName": "valueFrom",
"type": "V1EnvVarSource"
}
];
//# sourceMappingURL=v1EnvVar.js.map
/***/ }),
/***/ 17205:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EnvVarSource = void 0;
/**
* EnvVarSource represents a source for the value of an EnvVar.
*/
class V1EnvVarSource {
static getAttributeTypeMap() {
return V1EnvVarSource.attributeTypeMap;
}
}
exports.V1EnvVarSource = V1EnvVarSource;
V1EnvVarSource.discriminator = undefined;
V1EnvVarSource.attributeTypeMap = [
{
"name": "configMapKeyRef",
"baseName": "configMapKeyRef",
"type": "V1ConfigMapKeySelector"
},
{
"name": "fieldRef",
"baseName": "fieldRef",
"type": "V1ObjectFieldSelector"
},
{
"name": "resourceFieldRef",
"baseName": "resourceFieldRef",
"type": "V1ResourceFieldSelector"
},
{
"name": "secretKeyRef",
"baseName": "secretKeyRef",
"type": "V1SecretKeySelector"
}
];
//# sourceMappingURL=v1EnvVarSource.js.map
/***/ }),
/***/ 32671:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EphemeralContainer = void 0;
/**
* An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod\'s ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag.
*/
class V1EphemeralContainer {
static getAttributeTypeMap() {
return V1EphemeralContainer.attributeTypeMap;
}
}
exports.V1EphemeralContainer = V1EphemeralContainer;
V1EphemeralContainer.discriminator = undefined;
V1EphemeralContainer.attributeTypeMap = [
{
"name": "args",
"baseName": "args",
"type": "Array"
},
{
"name": "command",
"baseName": "command",
"type": "Array"
},
{
"name": "env",
"baseName": "env",
"type": "Array"
},
{
"name": "envFrom",
"baseName": "envFrom",
"type": "Array"
},
{
"name": "image",
"baseName": "image",
"type": "string"
},
{
"name": "imagePullPolicy",
"baseName": "imagePullPolicy",
"type": "string"
},
{
"name": "lifecycle",
"baseName": "lifecycle",
"type": "V1Lifecycle"
},
{
"name": "livenessProbe",
"baseName": "livenessProbe",
"type": "V1Probe"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "ports",
"baseName": "ports",
"type": "Array"
},
{
"name": "readinessProbe",
"baseName": "readinessProbe",
"type": "V1Probe"
},
{
"name": "resources",
"baseName": "resources",
"type": "V1ResourceRequirements"
},
{
"name": "securityContext",
"baseName": "securityContext",
"type": "V1SecurityContext"
},
{
"name": "startupProbe",
"baseName": "startupProbe",
"type": "V1Probe"
},
{
"name": "stdin",
"baseName": "stdin",
"type": "boolean"
},
{
"name": "stdinOnce",
"baseName": "stdinOnce",
"type": "boolean"
},
{
"name": "targetContainerName",
"baseName": "targetContainerName",
"type": "string"
},
{
"name": "terminationMessagePath",
"baseName": "terminationMessagePath",
"type": "string"
},
{
"name": "terminationMessagePolicy",
"baseName": "terminationMessagePolicy",
"type": "string"
},
{
"name": "tty",
"baseName": "tty",
"type": "boolean"
},
{
"name": "volumeDevices",
"baseName": "volumeDevices",
"type": "Array"
},
{
"name": "volumeMounts",
"baseName": "volumeMounts",
"type": "Array"
},
{
"name": "workingDir",
"baseName": "workingDir",
"type": "string"
}
];
//# sourceMappingURL=v1EphemeralContainer.js.map
/***/ }),
/***/ 90017:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EphemeralVolumeSource = void 0;
/**
* Represents an ephemeral volume that is handled by a normal storage driver.
*/
class V1EphemeralVolumeSource {
static getAttributeTypeMap() {
return V1EphemeralVolumeSource.attributeTypeMap;
}
}
exports.V1EphemeralVolumeSource = V1EphemeralVolumeSource;
V1EphemeralVolumeSource.discriminator = undefined;
V1EphemeralVolumeSource.attributeTypeMap = [
{
"name": "volumeClaimTemplate",
"baseName": "volumeClaimTemplate",
"type": "V1PersistentVolumeClaimTemplate"
}
];
//# sourceMappingURL=v1EphemeralVolumeSource.js.map
/***/ }),
/***/ 97764:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EventSource = void 0;
/**
* EventSource contains information for an event.
*/
class V1EventSource {
static getAttributeTypeMap() {
return V1EventSource.attributeTypeMap;
}
}
exports.V1EventSource = V1EventSource;
V1EventSource.discriminator = undefined;
V1EventSource.attributeTypeMap = [
{
"name": "component",
"baseName": "component",
"type": "string"
},
{
"name": "host",
"baseName": "host",
"type": "string"
}
];
//# sourceMappingURL=v1EventSource.js.map
/***/ }),
/***/ 87969:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Eviction = void 0;
/**
* 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.
*/
class V1Eviction {
static getAttributeTypeMap() {
return V1Eviction.attributeTypeMap;
}
}
exports.V1Eviction = V1Eviction;
V1Eviction.discriminator = undefined;
V1Eviction.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "deleteOptions",
"baseName": "deleteOptions",
"type": "V1DeleteOptions"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
}
];
//# sourceMappingURL=v1Eviction.js.map
/***/ }),
/***/ 13313:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ExecAction = void 0;
/**
* ExecAction describes a \"run in container\" action.
*/
class V1ExecAction {
static getAttributeTypeMap() {
return V1ExecAction.attributeTypeMap;
}
}
exports.V1ExecAction = V1ExecAction;
V1ExecAction.discriminator = undefined;
V1ExecAction.attributeTypeMap = [
{
"name": "command",
"baseName": "command",
"type": "Array"
}
];
//# sourceMappingURL=v1ExecAction.js.map
/***/ }),
/***/ 77213:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ExternalDocumentation = void 0;
/**
* ExternalDocumentation allows referencing an external resource for extended documentation.
*/
class V1ExternalDocumentation {
static getAttributeTypeMap() {
return V1ExternalDocumentation.attributeTypeMap;
}
}
exports.V1ExternalDocumentation = V1ExternalDocumentation;
V1ExternalDocumentation.discriminator = undefined;
V1ExternalDocumentation.attributeTypeMap = [
{
"name": "description",
"baseName": "description",
"type": "string"
},
{
"name": "url",
"baseName": "url",
"type": "string"
}
];
//# sourceMappingURL=v1ExternalDocumentation.js.map
/***/ }),
/***/ 35093:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1FCVolumeSource = void 0;
/**
* 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.
*/
class V1FCVolumeSource {
static getAttributeTypeMap() {
return V1FCVolumeSource.attributeTypeMap;
}
}
exports.V1FCVolumeSource = V1FCVolumeSource;
V1FCVolumeSource.discriminator = undefined;
V1FCVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "lun",
"baseName": "lun",
"type": "number"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "targetWWNs",
"baseName": "targetWWNs",
"type": "Array"
},
{
"name": "wwids",
"baseName": "wwids",
"type": "Array"
}
];
//# sourceMappingURL=v1FCVolumeSource.js.map
/***/ }),
/***/ 91874:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1FlexPersistentVolumeSource = void 0;
/**
* FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.
*/
class V1FlexPersistentVolumeSource {
static getAttributeTypeMap() {
return V1FlexPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1FlexPersistentVolumeSource = V1FlexPersistentVolumeSource;
V1FlexPersistentVolumeSource.discriminator = undefined;
V1FlexPersistentVolumeSource.attributeTypeMap = [
{
"name": "driver",
"baseName": "driver",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "options",
"baseName": "options",
"type": "{ [key: string]: string; }"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretReference"
}
];
//# sourceMappingURL=v1FlexPersistentVolumeSource.js.map
/***/ }),
/***/ 16690:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1FlexVolumeSource = void 0;
/**
* FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
*/
class V1FlexVolumeSource {
static getAttributeTypeMap() {
return V1FlexVolumeSource.attributeTypeMap;
}
}
exports.V1FlexVolumeSource = V1FlexVolumeSource;
V1FlexVolumeSource.discriminator = undefined;
V1FlexVolumeSource.attributeTypeMap = [
{
"name": "driver",
"baseName": "driver",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "options",
"baseName": "options",
"type": "{ [key: string]: string; }"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1LocalObjectReference"
}
];
//# sourceMappingURL=v1FlexVolumeSource.js.map
/***/ }),
/***/ 10414:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1FlockerVolumeSource = void 0;
/**
* 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.
*/
class V1FlockerVolumeSource {
static getAttributeTypeMap() {
return V1FlockerVolumeSource.attributeTypeMap;
}
}
exports.V1FlockerVolumeSource = V1FlockerVolumeSource;
V1FlockerVolumeSource.discriminator = undefined;
V1FlockerVolumeSource.attributeTypeMap = [
{
"name": "datasetName",
"baseName": "datasetName",
"type": "string"
},
{
"name": "datasetUUID",
"baseName": "datasetUUID",
"type": "string"
}
];
//# sourceMappingURL=v1FlockerVolumeSource.js.map
/***/ }),
/***/ 3439:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ForZone = void 0;
/**
* ForZone provides information about which zones should consume this endpoint.
*/
class V1ForZone {
static getAttributeTypeMap() {
return V1ForZone.attributeTypeMap;
}
}
exports.V1ForZone = V1ForZone;
V1ForZone.discriminator = undefined;
V1ForZone.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
}
];
//# sourceMappingURL=v1ForZone.js.map
/***/ }),
/***/ 1016:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GCEPersistentDiskVolumeSource = void 0;
/**
* 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.
*/
class V1GCEPersistentDiskVolumeSource {
static getAttributeTypeMap() {
return V1GCEPersistentDiskVolumeSource.attributeTypeMap;
}
}
exports.V1GCEPersistentDiskVolumeSource = V1GCEPersistentDiskVolumeSource;
V1GCEPersistentDiskVolumeSource.discriminator = undefined;
V1GCEPersistentDiskVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "partition",
"baseName": "partition",
"type": "number"
},
{
"name": "pdName",
"baseName": "pdName",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
}
];
//# sourceMappingURL=v1GCEPersistentDiskVolumeSource.js.map
/***/ }),
/***/ 27584:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GitRepoVolumeSource = void 0;
/**
* 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.
*/
class V1GitRepoVolumeSource {
static getAttributeTypeMap() {
return V1GitRepoVolumeSource.attributeTypeMap;
}
}
exports.V1GitRepoVolumeSource = V1GitRepoVolumeSource;
V1GitRepoVolumeSource.discriminator = undefined;
V1GitRepoVolumeSource.attributeTypeMap = [
{
"name": "directory",
"baseName": "directory",
"type": "string"
},
{
"name": "repository",
"baseName": "repository",
"type": "string"
},
{
"name": "revision",
"baseName": "revision",
"type": "string"
}
];
//# sourceMappingURL=v1GitRepoVolumeSource.js.map
/***/ }),
/***/ 97617:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GlusterfsPersistentVolumeSource = void 0;
/**
* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
*/
class V1GlusterfsPersistentVolumeSource {
static getAttributeTypeMap() {
return V1GlusterfsPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1GlusterfsPersistentVolumeSource = V1GlusterfsPersistentVolumeSource;
V1GlusterfsPersistentVolumeSource.discriminator = undefined;
V1GlusterfsPersistentVolumeSource.attributeTypeMap = [
{
"name": "endpoints",
"baseName": "endpoints",
"type": "string"
},
{
"name": "endpointsNamespace",
"baseName": "endpointsNamespace",
"type": "string"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
}
];
//# sourceMappingURL=v1GlusterfsPersistentVolumeSource.js.map
/***/ }),
/***/ 37426:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GlusterfsVolumeSource = void 0;
/**
* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
*/
class V1GlusterfsVolumeSource {
static getAttributeTypeMap() {
return V1GlusterfsVolumeSource.attributeTypeMap;
}
}
exports.V1GlusterfsVolumeSource = V1GlusterfsVolumeSource;
V1GlusterfsVolumeSource.discriminator = undefined;
V1GlusterfsVolumeSource.attributeTypeMap = [
{
"name": "endpoints",
"baseName": "endpoints",
"type": "string"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
}
];
//# sourceMappingURL=v1GlusterfsVolumeSource.js.map
/***/ }),
/***/ 87855:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GroupVersionForDiscovery = void 0;
/**
* GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.
*/
class V1GroupVersionForDiscovery {
static getAttributeTypeMap() {
return V1GroupVersionForDiscovery.attributeTypeMap;
}
}
exports.V1GroupVersionForDiscovery = V1GroupVersionForDiscovery;
V1GroupVersionForDiscovery.discriminator = undefined;
V1GroupVersionForDiscovery.attributeTypeMap = [
{
"name": "groupVersion",
"baseName": "groupVersion",
"type": "string"
},
{
"name": "version",
"baseName": "version",
"type": "string"
}
];
//# sourceMappingURL=v1GroupVersionForDiscovery.js.map
/***/ }),
/***/ 16636:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HTTPGetAction = void 0;
/**
* HTTPGetAction describes an action based on HTTP Get requests.
*/
class V1HTTPGetAction {
static getAttributeTypeMap() {
return V1HTTPGetAction.attributeTypeMap;
}
}
exports.V1HTTPGetAction = V1HTTPGetAction;
V1HTTPGetAction.discriminator = undefined;
V1HTTPGetAction.attributeTypeMap = [
{
"name": "host",
"baseName": "host",
"type": "string"
},
{
"name": "httpHeaders",
"baseName": "httpHeaders",
"type": "Array"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "IntOrString"
},
{
"name": "scheme",
"baseName": "scheme",
"type": "string"
}
];
//# sourceMappingURL=v1HTTPGetAction.js.map
/***/ }),
/***/ 3437:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HTTPHeader = void 0;
/**
* HTTPHeader describes a custom header to be used in HTTP probes
*/
class V1HTTPHeader {
static getAttributeTypeMap() {
return V1HTTPHeader.attributeTypeMap;
}
}
exports.V1HTTPHeader = V1HTTPHeader;
V1HTTPHeader.discriminator = undefined;
V1HTTPHeader.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "value",
"baseName": "value",
"type": "string"
}
];
//# sourceMappingURL=v1HTTPHeader.js.map
/***/ }),
/***/ 86769:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HTTPIngressPath = void 0;
/**
* HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.
*/
class V1HTTPIngressPath {
static getAttributeTypeMap() {
return V1HTTPIngressPath.attributeTypeMap;
}
}
exports.V1HTTPIngressPath = V1HTTPIngressPath;
V1HTTPIngressPath.discriminator = undefined;
V1HTTPIngressPath.attributeTypeMap = [
{
"name": "backend",
"baseName": "backend",
"type": "V1IngressBackend"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "pathType",
"baseName": "pathType",
"type": "string"
}
];
//# sourceMappingURL=v1HTTPIngressPath.js.map
/***/ }),
/***/ 56219:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HTTPIngressRuleValue = void 0;
/**
* 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 \'#\'.
*/
class V1HTTPIngressRuleValue {
static getAttributeTypeMap() {
return V1HTTPIngressRuleValue.attributeTypeMap;
}
}
exports.V1HTTPIngressRuleValue = V1HTTPIngressRuleValue;
V1HTTPIngressRuleValue.discriminator = undefined;
V1HTTPIngressRuleValue.attributeTypeMap = [
{
"name": "paths",
"baseName": "paths",
"type": "Array"
}
];
//# sourceMappingURL=v1HTTPIngressRuleValue.js.map
/***/ }),
/***/ 95179:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Handler = void 0;
/**
* Handler defines a specific action that should be taken
*/
class V1Handler {
static getAttributeTypeMap() {
return V1Handler.attributeTypeMap;
}
}
exports.V1Handler = V1Handler;
V1Handler.discriminator = undefined;
V1Handler.attributeTypeMap = [
{
"name": "exec",
"baseName": "exec",
"type": "V1ExecAction"
},
{
"name": "httpGet",
"baseName": "httpGet",
"type": "V1HTTPGetAction"
},
{
"name": "tcpSocket",
"baseName": "tcpSocket",
"type": "V1TCPSocketAction"
}
];
//# sourceMappingURL=v1Handler.js.map
/***/ }),
/***/ 93652:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HorizontalPodAutoscaler = void 0;
/**
* configuration of a horizontal pod autoscaler.
*/
class V1HorizontalPodAutoscaler {
static getAttributeTypeMap() {
return V1HorizontalPodAutoscaler.attributeTypeMap;
}
}
exports.V1HorizontalPodAutoscaler = V1HorizontalPodAutoscaler;
V1HorizontalPodAutoscaler.discriminator = undefined;
V1HorizontalPodAutoscaler.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1HorizontalPodAutoscalerSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1HorizontalPodAutoscalerStatus"
}
];
//# sourceMappingURL=v1HorizontalPodAutoscaler.js.map
/***/ }),
/***/ 17024:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HorizontalPodAutoscalerList = void 0;
/**
* list of horizontal pod autoscaler objects.
*/
class V1HorizontalPodAutoscalerList {
static getAttributeTypeMap() {
return V1HorizontalPodAutoscalerList.attributeTypeMap;
}
}
exports.V1HorizontalPodAutoscalerList = V1HorizontalPodAutoscalerList;
V1HorizontalPodAutoscalerList.discriminator = undefined;
V1HorizontalPodAutoscalerList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1HorizontalPodAutoscalerList.js.map
/***/ }),
/***/ 49823:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HorizontalPodAutoscalerSpec = void 0;
/**
* specification of a horizontal pod autoscaler.
*/
class V1HorizontalPodAutoscalerSpec {
static getAttributeTypeMap() {
return V1HorizontalPodAutoscalerSpec.attributeTypeMap;
}
}
exports.V1HorizontalPodAutoscalerSpec = V1HorizontalPodAutoscalerSpec;
V1HorizontalPodAutoscalerSpec.discriminator = undefined;
V1HorizontalPodAutoscalerSpec.attributeTypeMap = [
{
"name": "maxReplicas",
"baseName": "maxReplicas",
"type": "number"
},
{
"name": "minReplicas",
"baseName": "minReplicas",
"type": "number"
},
{
"name": "scaleTargetRef",
"baseName": "scaleTargetRef",
"type": "V1CrossVersionObjectReference"
},
{
"name": "targetCPUUtilizationPercentage",
"baseName": "targetCPUUtilizationPercentage",
"type": "number"
}
];
//# sourceMappingURL=v1HorizontalPodAutoscalerSpec.js.map
/***/ }),
/***/ 50910:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HorizontalPodAutoscalerStatus = void 0;
/**
* current status of a horizontal pod autoscaler
*/
class V1HorizontalPodAutoscalerStatus {
static getAttributeTypeMap() {
return V1HorizontalPodAutoscalerStatus.attributeTypeMap;
}
}
exports.V1HorizontalPodAutoscalerStatus = V1HorizontalPodAutoscalerStatus;
V1HorizontalPodAutoscalerStatus.discriminator = undefined;
V1HorizontalPodAutoscalerStatus.attributeTypeMap = [
{
"name": "currentCPUUtilizationPercentage",
"baseName": "currentCPUUtilizationPercentage",
"type": "number"
},
{
"name": "currentReplicas",
"baseName": "currentReplicas",
"type": "number"
},
{
"name": "desiredReplicas",
"baseName": "desiredReplicas",
"type": "number"
},
{
"name": "lastScaleTime",
"baseName": "lastScaleTime",
"type": "Date"
},
{
"name": "observedGeneration",
"baseName": "observedGeneration",
"type": "number"
}
];
//# sourceMappingURL=v1HorizontalPodAutoscalerStatus.js.map
/***/ }),
/***/ 72796:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HostAlias = void 0;
/**
* HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod\'s hosts file.
*/
class V1HostAlias {
static getAttributeTypeMap() {
return V1HostAlias.attributeTypeMap;
}
}
exports.V1HostAlias = V1HostAlias;
V1HostAlias.discriminator = undefined;
V1HostAlias.attributeTypeMap = [
{
"name": "hostnames",
"baseName": "hostnames",
"type": "Array"
},
{
"name": "ip",
"baseName": "ip",
"type": "string"
}
];
//# sourceMappingURL=v1HostAlias.js.map
/***/ }),
/***/ 69225:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HostPathVolumeSource = void 0;
/**
* Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.
*/
class V1HostPathVolumeSource {
static getAttributeTypeMap() {
return V1HostPathVolumeSource.attributeTypeMap;
}
}
exports.V1HostPathVolumeSource = V1HostPathVolumeSource;
V1HostPathVolumeSource.discriminator = undefined;
V1HostPathVolumeSource.attributeTypeMap = [
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1HostPathVolumeSource.js.map
/***/ }),
/***/ 49202:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IPBlock = void 0;
/**
* IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") 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.
*/
class V1IPBlock {
static getAttributeTypeMap() {
return V1IPBlock.attributeTypeMap;
}
}
exports.V1IPBlock = V1IPBlock;
V1IPBlock.discriminator = undefined;
V1IPBlock.attributeTypeMap = [
{
"name": "cidr",
"baseName": "cidr",
"type": "string"
},
{
"name": "except",
"baseName": "except",
"type": "Array"
}
];
//# sourceMappingURL=v1IPBlock.js.map
/***/ }),
/***/ 83570:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ISCSIPersistentVolumeSource = void 0;
/**
* ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
*/
class V1ISCSIPersistentVolumeSource {
static getAttributeTypeMap() {
return V1ISCSIPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1ISCSIPersistentVolumeSource = V1ISCSIPersistentVolumeSource;
V1ISCSIPersistentVolumeSource.discriminator = undefined;
V1ISCSIPersistentVolumeSource.attributeTypeMap = [
{
"name": "chapAuthDiscovery",
"baseName": "chapAuthDiscovery",
"type": "boolean"
},
{
"name": "chapAuthSession",
"baseName": "chapAuthSession",
"type": "boolean"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "initiatorName",
"baseName": "initiatorName",
"type": "string"
},
{
"name": "iqn",
"baseName": "iqn",
"type": "string"
},
{
"name": "iscsiInterface",
"baseName": "iscsiInterface",
"type": "string"
},
{
"name": "lun",
"baseName": "lun",
"type": "number"
},
{
"name": "portals",
"baseName": "portals",
"type": "Array"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretReference"
},
{
"name": "targetPortal",
"baseName": "targetPortal",
"type": "string"
}
];
//# sourceMappingURL=v1ISCSIPersistentVolumeSource.js.map
/***/ }),
/***/ 68021:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ISCSIVolumeSource = void 0;
/**
* Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
*/
class V1ISCSIVolumeSource {
static getAttributeTypeMap() {
return V1ISCSIVolumeSource.attributeTypeMap;
}
}
exports.V1ISCSIVolumeSource = V1ISCSIVolumeSource;
V1ISCSIVolumeSource.discriminator = undefined;
V1ISCSIVolumeSource.attributeTypeMap = [
{
"name": "chapAuthDiscovery",
"baseName": "chapAuthDiscovery",
"type": "boolean"
},
{
"name": "chapAuthSession",
"baseName": "chapAuthSession",
"type": "boolean"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "initiatorName",
"baseName": "initiatorName",
"type": "string"
},
{
"name": "iqn",
"baseName": "iqn",
"type": "string"
},
{
"name": "iscsiInterface",
"baseName": "iscsiInterface",
"type": "string"
},
{
"name": "lun",
"baseName": "lun",
"type": "number"
},
{
"name": "portals",
"baseName": "portals",
"type": "Array"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1LocalObjectReference"
},
{
"name": "targetPortal",
"baseName": "targetPortal",
"type": "string"
}
];
//# sourceMappingURL=v1ISCSIVolumeSource.js.map
/***/ }),
/***/ 32492:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Ingress = void 0;
/**
* 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.
*/
class V1Ingress {
static getAttributeTypeMap() {
return V1Ingress.attributeTypeMap;
}
}
exports.V1Ingress = V1Ingress;
V1Ingress.discriminator = undefined;
V1Ingress.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1IngressSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1IngressStatus"
}
];
//# sourceMappingURL=v1Ingress.js.map
/***/ }),
/***/ 44340:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressBackend = void 0;
/**
* IngressBackend describes all endpoints for a given service and port.
*/
class V1IngressBackend {
static getAttributeTypeMap() {
return V1IngressBackend.attributeTypeMap;
}
}
exports.V1IngressBackend = V1IngressBackend;
V1IngressBackend.discriminator = undefined;
V1IngressBackend.attributeTypeMap = [
{
"name": "resource",
"baseName": "resource",
"type": "V1TypedLocalObjectReference"
},
{
"name": "service",
"baseName": "service",
"type": "V1IngressServiceBackend"
}
];
//# sourceMappingURL=v1IngressBackend.js.map
/***/ }),
/***/ 93865:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressClass = void 0;
/**
* IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.
*/
class V1IngressClass {
static getAttributeTypeMap() {
return V1IngressClass.attributeTypeMap;
}
}
exports.V1IngressClass = V1IngressClass;
V1IngressClass.discriminator = undefined;
V1IngressClass.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1IngressClassSpec"
}
];
//# sourceMappingURL=v1IngressClass.js.map
/***/ }),
/***/ 76125:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressClassList = void 0;
/**
* IngressClassList is a collection of IngressClasses.
*/
class V1IngressClassList {
static getAttributeTypeMap() {
return V1IngressClassList.attributeTypeMap;
}
}
exports.V1IngressClassList = V1IngressClassList;
V1IngressClassList.discriminator = undefined;
V1IngressClassList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1IngressClassList.js.map
/***/ }),
/***/ 76672:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressClassParametersReference = void 0;
/**
* IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.
*/
class V1IngressClassParametersReference {
static getAttributeTypeMap() {
return V1IngressClassParametersReference.attributeTypeMap;
}
}
exports.V1IngressClassParametersReference = V1IngressClassParametersReference;
V1IngressClassParametersReference.discriminator = undefined;
V1IngressClassParametersReference.attributeTypeMap = [
{
"name": "apiGroup",
"baseName": "apiGroup",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "scope",
"baseName": "scope",
"type": "string"
}
];
//# sourceMappingURL=v1IngressClassParametersReference.js.map
/***/ }),
/***/ 92069:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressClassSpec = void 0;
/**
* IngressClassSpec provides information about the class of an Ingress.
*/
class V1IngressClassSpec {
static getAttributeTypeMap() {
return V1IngressClassSpec.attributeTypeMap;
}
}
exports.V1IngressClassSpec = V1IngressClassSpec;
V1IngressClassSpec.discriminator = undefined;
V1IngressClassSpec.attributeTypeMap = [
{
"name": "controller",
"baseName": "controller",
"type": "string"
},
{
"name": "parameters",
"baseName": "parameters",
"type": "V1IngressClassParametersReference"
}
];
//# sourceMappingURL=v1IngressClassSpec.js.map
/***/ }),
/***/ 43693:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressList = void 0;
/**
* IngressList is a collection of Ingress.
*/
class V1IngressList {
static getAttributeTypeMap() {
return V1IngressList.attributeTypeMap;
}
}
exports.V1IngressList = V1IngressList;
V1IngressList.discriminator = undefined;
V1IngressList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1IngressList.js.map
/***/ }),
/***/ 89541:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressRule = void 0;
/**
* 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.
*/
class V1IngressRule {
static getAttributeTypeMap() {
return V1IngressRule.attributeTypeMap;
}
}
exports.V1IngressRule = V1IngressRule;
V1IngressRule.discriminator = undefined;
V1IngressRule.attributeTypeMap = [
{
"name": "host",
"baseName": "host",
"type": "string"
},
{
"name": "http",
"baseName": "http",
"type": "V1HTTPIngressRuleValue"
}
];
//# sourceMappingURL=v1IngressRule.js.map
/***/ }),
/***/ 62476:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressServiceBackend = void 0;
/**
* IngressServiceBackend references a Kubernetes Service as a Backend.
*/
class V1IngressServiceBackend {
static getAttributeTypeMap() {
return V1IngressServiceBackend.attributeTypeMap;
}
}
exports.V1IngressServiceBackend = V1IngressServiceBackend;
V1IngressServiceBackend.discriminator = undefined;
V1IngressServiceBackend.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "V1ServiceBackendPort"
}
];
//# sourceMappingURL=v1IngressServiceBackend.js.map
/***/ }),
/***/ 59689:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressSpec = void 0;
/**
* IngressSpec describes the Ingress the user wishes to exist.
*/
class V1IngressSpec {
static getAttributeTypeMap() {
return V1IngressSpec.attributeTypeMap;
}
}
exports.V1IngressSpec = V1IngressSpec;
V1IngressSpec.discriminator = undefined;
V1IngressSpec.attributeTypeMap = [
{
"name": "defaultBackend",
"baseName": "defaultBackend",
"type": "V1IngressBackend"
},
{
"name": "ingressClassName",
"baseName": "ingressClassName",
"type": "string"
},
{
"name": "rules",
"baseName": "rules",
"type": "Array"
},
{
"name": "tls",
"baseName": "tls",
"type": "Array"
}
];
//# sourceMappingURL=v1IngressSpec.js.map
/***/ }),
/***/ 45830:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressStatus = void 0;
/**
* IngressStatus describe the current state of the Ingress.
*/
class V1IngressStatus {
static getAttributeTypeMap() {
return V1IngressStatus.attributeTypeMap;
}
}
exports.V1IngressStatus = V1IngressStatus;
V1IngressStatus.discriminator = undefined;
V1IngressStatus.attributeTypeMap = [
{
"name": "loadBalancer",
"baseName": "loadBalancer",
"type": "V1LoadBalancerStatus"
}
];
//# sourceMappingURL=v1IngressStatus.js.map
/***/ }),
/***/ 23037:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressTLS = void 0;
/**
* IngressTLS describes the transport layer security associated with an Ingress.
*/
class V1IngressTLS {
static getAttributeTypeMap() {
return V1IngressTLS.attributeTypeMap;
}
}
exports.V1IngressTLS = V1IngressTLS;
V1IngressTLS.discriminator = undefined;
V1IngressTLS.attributeTypeMap = [
{
"name": "hosts",
"baseName": "hosts",
"type": "Array"
},
{
"name": "secretName",
"baseName": "secretName",
"type": "string"
}
];
//# sourceMappingURL=v1IngressTLS.js.map
/***/ }),
/***/ 63580:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1JSONSchemaProps = void 0;
/**
* JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).
*/
class V1JSONSchemaProps {
static getAttributeTypeMap() {
return V1JSONSchemaProps.attributeTypeMap;
}
}
exports.V1JSONSchemaProps = V1JSONSchemaProps;
V1JSONSchemaProps.discriminator = undefined;
V1JSONSchemaProps.attributeTypeMap = [
{
"name": "$ref",
"baseName": "$ref",
"type": "string"
},
{
"name": "$schema",
"baseName": "$schema",
"type": "string"
},
{
"name": "additionalItems",
"baseName": "additionalItems",
"type": "object"
},
{
"name": "additionalProperties",
"baseName": "additionalProperties",
"type": "object"
},
{
"name": "allOf",
"baseName": "allOf",
"type": "Array"
},
{
"name": "anyOf",
"baseName": "anyOf",
"type": "Array"
},
{
"name": "_default",
"baseName": "default",
"type": "object"
},
{
"name": "definitions",
"baseName": "definitions",
"type": "{ [key: string]: V1JSONSchemaProps; }"
},
{
"name": "dependencies",
"baseName": "dependencies",
"type": "{ [key: string]: object; }"
},
{
"name": "description",
"baseName": "description",
"type": "string"
},
{
"name": "_enum",
"baseName": "enum",
"type": "Array