BucketLifecycleRuleCondition.fromJson constructor

BucketLifecycleRuleCondition.fromJson(
  1. Map _json
)

Implementation

BucketLifecycleRuleCondition.fromJson(core.Map _json)
    : this(
        age: _json.containsKey('age') ? _json['age'] as core.int : null,
        createdBefore: _json.containsKey('createdBefore')
            ? core.DateTime.parse(_json['createdBefore'] as core.String)
            : null,
        customTimeBefore: _json.containsKey('customTimeBefore')
            ? core.DateTime.parse(_json['customTimeBefore'] as core.String)
            : null,
        daysSinceCustomTime: _json.containsKey('daysSinceCustomTime')
            ? _json['daysSinceCustomTime'] as core.int
            : null,
        daysSinceNoncurrentTime: _json.containsKey('daysSinceNoncurrentTime')
            ? _json['daysSinceNoncurrentTime'] as core.int
            : null,
        isLive:
            _json.containsKey('isLive') ? _json['isLive'] as core.bool : null,
        matchesPattern: _json.containsKey('matchesPattern')
            ? _json['matchesPattern'] as core.String
            : null,
        matchesStorageClass: _json.containsKey('matchesStorageClass')
            ? (_json['matchesStorageClass'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        noncurrentTimeBefore: _json.containsKey('noncurrentTimeBefore')
            ? core.DateTime.parse(
                _json['noncurrentTimeBefore'] as core.String)
            : null,
        numNewerVersions: _json.containsKey('numNewerVersions')
            ? _json['numNewerVersions'] as core.int
            : null,
      );