Stack.fromJson constructor

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

Implementation

factory Stack.fromJson(Map<String, dynamic> json) {
  return Stack(
    agentVersion: json['AgentVersion'] as String?,
    arn: json['Arn'] as String?,
    attributes: (json['Attributes'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k.toStackAttributesKeys(), e as String)),
    chefConfiguration: json['ChefConfiguration'] != null
        ? ChefConfiguration.fromJson(
            json['ChefConfiguration'] as Map<String, dynamic>)
        : null,
    configurationManager: json['ConfigurationManager'] != null
        ? StackConfigurationManager.fromJson(
            json['ConfigurationManager'] as Map<String, dynamic>)
        : null,
    createdAt: json['CreatedAt'] as String?,
    customCookbooksSource: json['CustomCookbooksSource'] != null
        ? Source.fromJson(
            json['CustomCookbooksSource'] as Map<String, dynamic>)
        : null,
    customJson: json['CustomJson'] as String?,
    defaultAvailabilityZone: json['DefaultAvailabilityZone'] as String?,
    defaultInstanceProfileArn: json['DefaultInstanceProfileArn'] as String?,
    defaultOs: json['DefaultOs'] as String?,
    defaultRootDeviceType:
        (json['DefaultRootDeviceType'] as String?)?.toRootDeviceType(),
    defaultSshKeyName: json['DefaultSshKeyName'] as String?,
    defaultSubnetId: json['DefaultSubnetId'] as String?,
    hostnameTheme: json['HostnameTheme'] as String?,
    name: json['Name'] as String?,
    region: json['Region'] as String?,
    serviceRoleArn: json['ServiceRoleArn'] as String?,
    stackId: json['StackId'] as String?,
    useCustomCookbooks: json['UseCustomCookbooks'] as bool?,
    useOpsworksSecurityGroups: json['UseOpsworksSecurityGroups'] as bool?,
    vpcId: json['VpcId'] as String?,
  );
}