AwsLambdaFunctionDetails.fromJson constructor

AwsLambdaFunctionDetails.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AwsLambdaFunctionDetails.fromJson(Map<String, dynamic> json) {
  return AwsLambdaFunctionDetails(
    code: json['Code'] != null
        ? AwsLambdaFunctionCode.fromJson(json['Code'] as Map<String, dynamic>)
        : null,
    codeSha256: json['CodeSha256'] as String?,
    deadLetterConfig: json['DeadLetterConfig'] != null
        ? AwsLambdaFunctionDeadLetterConfig.fromJson(
            json['DeadLetterConfig'] as Map<String, dynamic>)
        : null,
    environment: json['Environment'] != null
        ? AwsLambdaFunctionEnvironment.fromJson(
            json['Environment'] as Map<String, dynamic>)
        : null,
    functionName: json['FunctionName'] as String?,
    handler: json['Handler'] as String?,
    kmsKeyArn: json['KmsKeyArn'] as String?,
    lastModified: json['LastModified'] as String?,
    layers: (json['Layers'] as List?)
        ?.whereNotNull()
        .map(
            (e) => AwsLambdaFunctionLayer.fromJson(e as Map<String, dynamic>))
        .toList(),
    masterArn: json['MasterArn'] as String?,
    memorySize: json['MemorySize'] as int?,
    revisionId: json['RevisionId'] as String?,
    role: json['Role'] as String?,
    runtime: json['Runtime'] as String?,
    timeout: json['Timeout'] as int?,
    tracingConfig: json['TracingConfig'] != null
        ? AwsLambdaFunctionTracingConfig.fromJson(
            json['TracingConfig'] as Map<String, dynamic>)
        : null,
    version: json['Version'] as String?,
    vpcConfig: json['VpcConfig'] != null
        ? AwsLambdaFunctionVpcConfig.fromJson(
            json['VpcConfig'] as Map<String, dynamic>)
        : null,
  );
}