Skip to content

Commit

Permalink
Do not validate budget parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
alankashiwa committed Jul 1, 2022
1 parent 8f71eb1 commit 4ec3f5f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 45 deletions.
11 changes: 4 additions & 7 deletions sdk/maps/maps-route/review/maps-route.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,13 +629,10 @@ export interface RouteRange {

// @public
export type RouteRangeBudget = {
fuelBudgetInLiters: number;
} | {
energyBudgetInKwH: number;
} | {
timeBudgetInSeconds: number;
} | {
distanceBudgetInMeters: number;
fuelBudgetInLiters?: number;
energyBudgetInKwH?: number;
timeBudgetInSeconds?: number;
distanceBudgetInMeters?: number;
};

// @public
Expand Down
62 changes: 24 additions & 38 deletions sdk/maps/maps-route/src/models/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,45 +287,31 @@ export interface RouteDirectionsOptions extends RouteBaseOptions {
}

/**
* Budget for the route range request. One and only one budget must be provided.
* Budget for the route range request.
* Exactly one budget (fuelBudgetInLiters, energyBudgetInKwH, timeBudgetInSeconds, or distanceBudgetInMeters) must be used.
*/
export type RouteRangeBudget =
| {
/**
* Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.
* When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.
*
* Exactly one budget (fuelBudgetInLiters, energyBudgetInKwH, timeBudgetInSeconds, or distanceBudgetInMeters) must be used.
*/
fuelBudgetInLiters: number;
}
| {
/**
* Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.
* When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.
*
* Exactly one budget (fuelBudgetInLiters, energyBudgetInKwH, timeBudgetInSeconds, or distanceBudgetInMeters) must be used.
*/
energyBudgetInKwH: number;
}
| {
/**
* Time budget in seconds that determines maximal range which can be travelled using driving time.
* The Consumption Model will only affect the range when routeType is eco.
*
* Exactly one budget (fuelBudgetInLiters, energyBudgetInKwH, timeBudgetInSeconds, or distanceBudgetInMeters) must be used.
*/
timeBudgetInSeconds: number;
}
| {
/**
* Distance budget in meters that determines maximal range which can be travelled using driving distance.
* The Consumption Model will only affect the range when routeType is eco.
*
* Exactly one budget (fuelBudgetInLiters, energyBudgetInKwH, timeBudgetInSeconds, or distanceBudgetInMeters) must be used.
*/
distanceBudgetInMeters: number;
};
export type RouteRangeBudget = {
/**
* Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.
* When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.
*/
fuelBudgetInLiters?: number;
/**
* Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.
* When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.
*/
energyBudgetInKwH?: number;
/**
* Time budget in seconds that determines maximal range which can be travelled using driving time.
* The Consumption Model will only affect the range when routeType is eco.
*/
timeBudgetInSeconds?: number;
/**
* Distance budget in meters that determines maximal range which can be travelled using driving distance.
* The Consumption Model will only affect the range when routeType is eco.
*/
distanceBudgetInMeters?: number;
};

/** Options for retrieving route range */
export type RouteRangeOptions = RouteBaseOptions & OperationOptions;
Expand Down

0 comments on commit 4ec3f5f

Please sign in to comment.