copyWith method

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 })

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);
}