FunctionConfiguration.fromJson constructor

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

Implementation

factory FunctionConfiguration.fromJson(Map<String, dynamic> json) {
  return FunctionConfiguration(
    codeSha256: json['CodeSha256'] as String?,
    codeSize: json['CodeSize'] as int?,
    deadLetterConfig: json['DeadLetterConfig'] != null
        ? DeadLetterConfig.fromJson(
            json['DeadLetterConfig'] as Map<String, dynamic>)
        : null,
    description: json['Description'] as String?,
    environment: json['Environment'] != null
        ? EnvironmentResponse.fromJson(
            json['Environment'] as Map<String, dynamic>)
        : null,
    fileSystemConfigs: (json['FileSystemConfigs'] as List?)
        ?.whereNotNull()
        .map((e) => FileSystemConfig.fromJson(e as Map<String, dynamic>))
        .toList(),
    functionArn: json['FunctionArn'] as String?,
    functionName: json['FunctionName'] as String?,
    handler: json['Handler'] as String?,
    imageConfigResponse: json['ImageConfigResponse'] != null
        ? ImageConfigResponse.fromJson(
            json['ImageConfigResponse'] as Map<String, dynamic>)
        : null,
    kMSKeyArn: json['KMSKeyArn'] as String?,
    lastModified: json['LastModified'] as String?,
    lastUpdateStatus:
        (json['LastUpdateStatus'] as String?)?.toLastUpdateStatus(),
    lastUpdateStatusReason: json['LastUpdateStatusReason'] as String?,
    lastUpdateStatusReasonCode:
        (json['LastUpdateStatusReasonCode'] as String?)
            ?.toLastUpdateStatusReasonCode(),
    layers: (json['Layers'] as List?)
        ?.whereNotNull()
        .map((e) => Layer.fromJson(e as Map<String, dynamic>))
        .toList(),
    masterArn: json['MasterArn'] as String?,
    memorySize: json['MemorySize'] as int?,
    packageType: (json['PackageType'] as String?)?.toPackageType(),
    revisionId: json['RevisionId'] as String?,
    role: json['Role'] as String?,
    runtime: (json['Runtime'] as String?)?.toRuntime(),
    signingJobArn: json['SigningJobArn'] as String?,
    signingProfileVersionArn: json['SigningProfileVersionArn'] as String?,
    state: (json['State'] as String?)?.toState(),
    stateReason: json['StateReason'] as String?,
    stateReasonCode:
        (json['StateReasonCode'] as String?)?.toStateReasonCode(),
    timeout: json['Timeout'] as int?,
    tracingConfig: json['TracingConfig'] != null
        ? TracingConfigResponse.fromJson(
            json['TracingConfig'] as Map<String, dynamic>)
        : null,
    version: json['Version'] as String?,
    vpcConfig: json['VpcConfig'] != null
        ? VpcConfigResponse.fromJson(
            json['VpcConfig'] as Map<String, dynamic>)
        : null,
  );
}