Feature.fromJson constructor

Feature.fromJson(
  1. Map json_
)

Implementation

Feature.fromJson(core.Map json_)
    : this(
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        deleteTime: json_.containsKey('deleteTime')
            ? json_['deleteTime'] as core.String
            : null,
        fleetDefaultMemberConfig:
            json_.containsKey('fleetDefaultMemberConfig')
                ? CommonFleetDefaultMemberConfigSpec.fromJson(
                    json_['fleetDefaultMemberConfig']
                        as core.Map<core.String, core.dynamic>)
                : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        membershipSpecs: json_.containsKey('membershipSpecs')
            ? (json_['membershipSpecs']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  MembershipFeatureSpec.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        membershipStates: json_.containsKey('membershipStates')
            ? (json_['membershipStates']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  MembershipFeatureState.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        resourceState: json_.containsKey('resourceState')
            ? FeatureResourceState.fromJson(
                json_['resourceState'] as core.Map<core.String, core.dynamic>)
            : null,
        scopeSpecs: json_.containsKey('scopeSpecs')
            ? (json_['scopeSpecs'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  ScopeFeatureSpec.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        scopeStates: json_.containsKey('scopeStates')
            ? (json_['scopeStates'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  ScopeFeatureState.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        spec: json_.containsKey('spec')
            ? CommonFeatureSpec.fromJson(
                json_['spec'] as core.Map<core.String, core.dynamic>)
            : null,
        state: json_.containsKey('state')
            ? CommonFeatureState.fromJson(
                json_['state'] as core.Map<core.String, core.dynamic>)
            : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
      );