toMetadataField method

MetadataField toMetadataField()

Implementation

MetadataField toMetadataField() {
  switch (this) {
    case 'AgentId':
      return MetadataField.agentId;
    case 'AwsRequestId':
      return MetadataField.awsRequestId;
    case 'ComputePlatform':
      return MetadataField.computePlatform;
    case 'ExecutionEnvironment':
      return MetadataField.executionEnvironment;
    case 'LambdaFunctionArn':
      return MetadataField.lambdaFunctionArn;
    case 'LambdaMemoryLimitInMB':
      return MetadataField.lambdaMemoryLimitInMB;
    case 'LambdaPreviousExecutionTimeInMilliseconds':
      return MetadataField.lambdaPreviousExecutionTimeInMilliseconds;
    case 'LambdaRemainingTimeInMilliseconds':
      return MetadataField.lambdaRemainingTimeInMilliseconds;
    case 'LambdaTimeGapBetweenInvokesInMilliseconds':
      return MetadataField.lambdaTimeGapBetweenInvokesInMilliseconds;
  }
  throw Exception('$this is not known in enum MetadataField');
}