Resource.fromJson constructor

Resource.fromJson(
  1. Map json_
)

Implementation

Resource.fromJson(core.Map json_)
    : this(
        caiAssets: json_.containsKey('caiAssets')
            ? (json_['caiAssets'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  ResourceCAIInfo.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        intent: json_.containsKey('intent')
            ? json_['intent'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        terraformInfo: json_.containsKey('terraformInfo')
            ? ResourceTerraformInfo.fromJson(
                json_['terraformInfo'] as core.Map<core.String, core.dynamic>)
            : null,
      );