aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
64 lines (63 loc) • 1.68 kB
TypeScript
/**
* Represents a bitrate value.
*
* The amount can be specified either as a literal value (e.g: `10`) which
* cannot be negative, or as an unresolved number token.
*
* When the amount is passed as a token, unit conversion is not possible.
*/
export declare class Bitrate {
/**
* Create a Bitrate representing an amount of bits per second.
*
* @param amount the amount of bits per second
*/
static bps(amount: number): Bitrate;
/**
* Create a Bitrate representing an amount of kilobits per second.
*
* @param amount the amount of kilobits per second
*/
static kbps(amount: number): Bitrate;
/**
* Create a Bitrate representing an amount of megabits per second.
*
* @param amount the amount of megabits per second
*/
static mbps(amount: number): Bitrate;
/**
* Create a Bitrate representing an amount of gigabits per second.
*
* @param amount the amount of gigabits per second
*/
static gbps(amount: number): Bitrate;
/**
* The amount of bitrate.
*/
private readonly amount;
/**
* The unit of bitrate.
*/
private readonly unit;
private constructor();
/**
* Return the total number of bits per second.
*/
toBps(): number;
/**
* Return the total number of kilobits per second.
*/
toKbps(): number;
/**
* Return the total number of megabits per second.
*/
toMbps(): number;
/**
* Return the total number of gigabits per second.
*/
toGbps(): number;
/**
* Checks if bitrate is a token or a resolvable object
*/
isUnresolved(): boolean;
}