copyWith method

Context copyWith (
  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}
)

Allows to copy a created Context over with some new settings.

Implementation

Context copyWith(
    {String handler,
    String functionName,
    String functionMemorySize,
    String logGroupName,
    String logStreamName,
    String requestId,
    String invokedFunction,
    String region,
    String executionEnv,
    String accessKey,
    String secretAccessKey,
    String sessionToken}) {
  return Context(
      handler: handler ?? this.handler,
      functionName: functionName ?? this.functionName,
      functionMemorySize: functionMemorySize ?? this.functionMemorySize,
      logGroupName: logGroupName ?? this.logGroupName,
      logStreamName: logStreamName ?? this.logStreamName,
      requestId: requestId ?? this.requestId,
      invokedFunction: invokedFunction ?? this.invokedFunctionArn,
      region: region ?? this.region,
      executionEnv: executionEnv ?? this.executionEnv,
      accessKey: accessKey ?? this.accessKey,
      secretAccessKey: secretAccessKey ?? this.secretAccessKey,
      sessionToken: sessionToken ?? this.sessionToken);
}