in clients/client-bcm-pricing-calculator/src/protocols/Aws_json1_0.ts [2573:2985]
negateSavingsPlanAction: _json(output.negateSavingsPlanAction),
};
}
return { $unknown: Object.entries(output)[0] };
};
/**
* deserializeAws_json1_0BillScenarioCommitmentModificationItem
*/
const de_BillScenarioCommitmentModificationItem = (
output: any,
context: __SerdeContext
): BillScenarioCommitmentModificationItem => {
return take(output, {
commitmentAction: (_: any) => de_BillScenarioCommitmentModificationAction(__expectUnion(_), context),
group: __expectString,
id: __expectString,
usageAccountId: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0BillScenarioCommitmentModificationItems
*/
const de_BillScenarioCommitmentModificationItems = (
output: any,
context: __SerdeContext
): BillScenarioCommitmentModificationItem[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
return de_BillScenarioCommitmentModificationItem(entry, context);
});
return retVal;
};
/**
* deserializeAws_json1_0BillScenarioSummaries
*/
const de_BillScenarioSummaries = (output: any, context: __SerdeContext): BillScenarioSummary[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
return de_BillScenarioSummary(entry, context);
});
return retVal;
};
/**
* deserializeAws_json1_0BillScenarioSummary
*/
const de_BillScenarioSummary = (output: any, context: __SerdeContext): BillScenarioSummary => {
return take(output, {
billInterval: (_: any) => de_BillInterval(_, context),
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
failureMessage: __expectString,
id: __expectString,
name: __expectString,
status: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0BillScenarioUsageModificationItem
*/
const de_BillScenarioUsageModificationItem = (
output: any,
context: __SerdeContext
): BillScenarioUsageModificationItem => {
return take(output, {
availabilityZone: __expectString,
group: __expectString,
historicalUsage: (_: any) => de_HistoricalUsageEntity(_, context),
id: __expectString,
location: __expectString,
operation: __expectString,
quantities: (_: any) => de_UsageQuantities(_, context),
serviceCode: __expectString,
usageAccountId: __expectString,
usageType: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0BillScenarioUsageModificationItems
*/
const de_BillScenarioUsageModificationItems = (
output: any,
context: __SerdeContext
): BillScenarioUsageModificationItem[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
return de_BillScenarioUsageModificationItem(entry, context);
});
return retVal;
};
// de_ConflictException omitted.
/**
* deserializeAws_json1_0CostAmount
*/
const de_CostAmount = (output: any, context: __SerdeContext): CostAmount => {
return take(output, {
amount: __limitedParseDouble,
currency: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0CostDifference
*/
const de_CostDifference = (output: any, context: __SerdeContext): CostDifference => {
return take(output, {
estimatedCost: (_: any) => de_CostAmount(_, context),
historicalCost: (_: any) => de_CostAmount(_, context),
}) as any;
};
/**
* deserializeAws_json1_0CreateBillEstimateResponse
*/
const de_CreateBillEstimateResponse = (output: any, context: __SerdeContext): CreateBillEstimateResponse => {
return take(output, {
billInterval: (_: any) => de_BillInterval(_, context),
costSummary: (_: any) => de_BillEstimateCostSummary(_, context),
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
failureMessage: __expectString,
id: __expectString,
name: __expectString,
status: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0CreateBillScenarioResponse
*/
const de_CreateBillScenarioResponse = (output: any, context: __SerdeContext): CreateBillScenarioResponse => {
return take(output, {
billInterval: (_: any) => de_BillInterval(_, context),
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
failureMessage: __expectString,
id: __expectString,
name: __expectString,
status: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0CreateWorkloadEstimateResponse
*/
const de_CreateWorkloadEstimateResponse = (output: any, context: __SerdeContext): CreateWorkloadEstimateResponse => {
return take(output, {
costCurrency: __expectString,
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
failureMessage: __expectString,
id: __expectString,
name: __expectString,
rateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
rateType: __expectString,
status: __expectString,
totalCost: __limitedParseDouble,
}) as any;
};
// de_DataUnavailableException omitted.
// de_DeleteBillEstimateResponse omitted.
// de_DeleteBillScenarioResponse omitted.
// de_DeleteWorkloadEstimateResponse omitted.
/**
* deserializeAws_json1_0Expression
*/
const de_Expression = (output: any, context: __SerdeContext): Expression => {
return take(output, {
and: (_: any) => de_ExpressionList(_, context),
costCategories: _json,
dimensions: _json,
not: (_: any) => de_Expression(_, context),
or: (_: any) => de_ExpressionList(_, context),
tags: _json,
}) as any;
};
// de_ExpressionFilter omitted.
/**
* deserializeAws_json1_0ExpressionList
*/
const de_ExpressionList = (output: any, context: __SerdeContext): Expression[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
return de_Expression(entry, context);
});
return retVal;
};
/**
* deserializeAws_json1_0GetBillEstimateResponse
*/
const de_GetBillEstimateResponse = (output: any, context: __SerdeContext): GetBillEstimateResponse => {
return take(output, {
billInterval: (_: any) => de_BillInterval(_, context),
costSummary: (_: any) => de_BillEstimateCostSummary(_, context),
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
failureMessage: __expectString,
id: __expectString,
name: __expectString,
status: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0GetBillScenarioResponse
*/
const de_GetBillScenarioResponse = (output: any, context: __SerdeContext): GetBillScenarioResponse => {
return take(output, {
billInterval: (_: any) => de_BillInterval(_, context),
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
failureMessage: __expectString,
id: __expectString,
name: __expectString,
status: __expectString,
}) as any;
};
// de_GetPreferencesResponse omitted.
/**
* deserializeAws_json1_0GetWorkloadEstimateResponse
*/
const de_GetWorkloadEstimateResponse = (output: any, context: __SerdeContext): GetWorkloadEstimateResponse => {
return take(output, {
costCurrency: __expectString,
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
failureMessage: __expectString,
id: __expectString,
name: __expectString,
rateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
rateType: __expectString,
status: __expectString,
totalCost: __limitedParseDouble,
}) as any;
};
/**
* deserializeAws_json1_0HistoricalUsageEntity
*/
const de_HistoricalUsageEntity = (output: any, context: __SerdeContext): HistoricalUsageEntity => {
return take(output, {
billInterval: (_: any) => de_BillInterval(_, context),
filterExpression: (_: any) => de_Expression(_, context),
location: __expectString,
operation: __expectString,
serviceCode: __expectString,
usageAccountId: __expectString,
usageType: __expectString,
}) as any;
};
// de_InternalServerException omitted.
/**
* deserializeAws_json1_0ListBillEstimateCommitmentsResponse
*/
const de_ListBillEstimateCommitmentsResponse = (
output: any,
context: __SerdeContext
): ListBillEstimateCommitmentsResponse => {
return take(output, {
items: (_: any) => de_BillEstimateCommitmentSummaries(_, context),
nextToken: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0ListBillEstimateInputCommitmentModificationsResponse
*/
const de_ListBillEstimateInputCommitmentModificationsResponse = (
output: any,
context: __SerdeContext
): ListBillEstimateInputCommitmentModificationsResponse => {
return take(output, {
items: (_: any) => de_BillEstimateInputCommitmentModificationSummaries(_, context),
nextToken: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0ListBillEstimateInputUsageModificationsResponse
*/
const de_ListBillEstimateInputUsageModificationsResponse = (
output: any,
context: __SerdeContext
): ListBillEstimateInputUsageModificationsResponse => {
return take(output, {
items: (_: any) => de_BillEstimateInputUsageModificationSummaries(_, context),
nextToken: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0ListBillEstimateLineItemsResponse
*/
const de_ListBillEstimateLineItemsResponse = (
output: any,
context: __SerdeContext
): ListBillEstimateLineItemsResponse => {
return take(output, {
items: (_: any) => de_BillEstimateLineItemSummaries(_, context),
nextToken: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0ListBillEstimatesResponse
*/
const de_ListBillEstimatesResponse = (output: any, context: __SerdeContext): ListBillEstimatesResponse => {
return take(output, {
items: (_: any) => de_BillEstimateSummaries(_, context),
nextToken: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0ListBillScenarioCommitmentModificationsResponse
*/
const de_ListBillScenarioCommitmentModificationsResponse = (
output: any,
context: __SerdeContext
): ListBillScenarioCommitmentModificationsResponse => {
return take(output, {
items: (_: any) => de_BillScenarioCommitmentModificationItems(_, context),
nextToken: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0ListBillScenariosResponse
*/
const de_ListBillScenariosResponse = (output: any, context: __SerdeContext): ListBillScenariosResponse => {
return take(output, {
items: (_: any) => de_BillScenarioSummaries(_, context),
nextToken: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0ListBillScenarioUsageModificationsResponse
*/
const de_ListBillScenarioUsageModificationsResponse = (
output: any,
context: __SerdeContext
): ListBillScenarioUsageModificationsResponse => {
return take(output, {
items: (_: any) => de_BillScenarioUsageModificationItems(_, context),
nextToken: __expectString,
}) as any;
};
// de_ListTagsForResourceResponse omitted.
/**
* deserializeAws_json1_0ListWorkloadEstimatesResponse
*/
const de_ListWorkloadEstimatesResponse = (output: any, context: __SerdeContext): ListWorkloadEstimatesResponse => {
return take(output, {
items: (_: any) => de_WorkloadEstimateSummaries(_, context),
nextToken: __expectString,
}) as any;
};
/**
* deserializeAws_json1_0ListWorkloadEstimateUsageResponse
*/
const de_ListWorkloadEstimateUsageResponse = (
output: any,
context: __SerdeContext
): ListWorkloadEstimateUsageResponse => {
return take(output, {
items: (_: any) => de_WorkloadEstimateUsageItems(_, context),
nextToken: __expectString,
}) as any;
};
// de_NegateReservedInstanceAction omitted.
// de_NegateSavingsPlanAction omitted.
// de_RateTypes omitted.
// de_ResourceNotFoundException omitted.
// de_SavingsPlanArns omitted.
/**
* deserializeAws_json1_0ServiceCostDifferenceMap
*/
const de_ServiceCostDifferenceMap = (output: any, context: __SerdeContext): Record<string, CostDifference> => {
return Object.entries(output).reduce((acc: Record<string, CostDifference>, [key, value]: [string, any]) => {
if (value === null) {