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,
        matchesPrefix: json_.containsKey('matchesPrefix')
            ? (json_['matchesPrefix'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        matchesStorageClass: json_.containsKey('matchesStorageClass')
            ? (json_['matchesStorageClass'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        matchesSuffix: json_.containsKey('matchesSuffix')
            ? (json_['matchesSuffix'] 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,
      );