Stack.fromJson constructor

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

Implementation

factory Stack.fromJson(Map<String, dynamic> json) {
  return Stack(
    name: json['Name'] as String,
    accessEndpoints: (json['AccessEndpoints'] as List?)
        ?.whereNotNull()
        .map((e) => AccessEndpoint.fromJson(e as Map<String, dynamic>))
        .toList(),
    applicationSettings: json['ApplicationSettings'] != null
        ? ApplicationSettingsResponse.fromJson(
            json['ApplicationSettings'] as Map<String, dynamic>)
        : null,
    arn: json['Arn'] as String?,
    createdTime: timeStampFromJson(json['CreatedTime']),
    description: json['Description'] as String?,
    displayName: json['DisplayName'] as String?,
    embedHostDomains: (json['EmbedHostDomains'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    feedbackURL: json['FeedbackURL'] as String?,
    redirectURL: json['RedirectURL'] as String?,
    stackErrors: (json['StackErrors'] as List?)
        ?.whereNotNull()
        .map((e) => StackError.fromJson(e as Map<String, dynamic>))
        .toList(),
    storageConnectors: (json['StorageConnectors'] as List?)
        ?.whereNotNull()
        .map((e) => StorageConnector.fromJson(e as Map<String, dynamic>))
        .toList(),
    userSettings: (json['UserSettings'] as List?)
        ?.whereNotNull()
        .map((e) => UserSetting.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}