Context constructor

Context(
  1. {String handler,
  2. String functionName,
  3. String functionMemorySize,
  4. String logGroupName,
  5. String logStreamName,
  6. String requestId,
  7. String invokedFunction,
  8. String region,
  9. String executionEnv,
  10. String accessKey,
  11. String secretAccessKey,
  12. String sessionToken}
)

Implementation

Context(
    {String handler,
    String functionName,
    String functionMemorySize,
    String logGroupName,
    String logStreamName,
    String requestId,
    String invokedFunction,
    String region,
    String executionEnv,
    String accessKey,
    String secretAccessKey,
    String sessionToken}) {
  assert(requestId != null);
  assert(handler != null);

  this.handler = handler ?? Platform.environment[_kAWSLambdaHandler];
  this.functionName =
      functionName ?? Platform.environment[_kAWSLambdaFunctionName];
  this.functionVersion =
      functionVersion ?? Platform.environment[_kAWSLambdaFunctionVersion];
  this.functionMemorySize = functionMemorySize ??
      Platform.environment[_kAWSLambdaFunctionMemorySize];
  this.logGroupName =
      logGroupName ?? Platform.environment[_kAWSLambdaLogGroupName];
  this.logStreamName =
      logStreamName ?? Platform.environment[_kAWSLambdaLogStreamName];
  this.requestId = requestId;
  this.invokedFunctionArn = invokedFunctionArn;
  this.region = region ?? Platform.environment[_kAWSLambdaRegion];
  this.executionEnv =
      executionEnv ?? Platform.environment[_kAWSLambdaExecutionEnv];
  this.accessKey = accessKey ?? Platform.environment[_kAWSLambdaAccessKey];
  this.secretAccessKey =
      secretAccessKey ?? Platform.environment[_kAWSLambdaSecretAccesKey];
  this.sessionToken =
      sessionToken ?? Platform.environment[_kAWSLambdaSessionToken];
}