BucketLifecycleRuleCondition.fromJson constructor

BucketLifecycleRuleCondition.fromJson(
  1. Map json_
)

Implementation

BucketLifecycleRuleCondition.fromJson(core.Map json_)
    : this(
        age: json_['age'] as core.int?,
        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_['daysSinceCustomTime'] as core.int?,
        daysSinceNoncurrentTime:
            json_['daysSinceNoncurrentTime'] as core.int?,
        isLive: json_['isLive'] as core.bool?,
        matchesPattern: json_['matchesPattern'] as core.String?,
        matchesPrefix: (json_['matchesPrefix'] as core.List?)
            ?.map((value) => value as core.String)
            .toList(),
        matchesStorageClass: (json_['matchesStorageClass'] as core.List?)
            ?.map((value) => value as core.String)
            .toList(),
        matchesSuffix: (json_['matchesSuffix'] as core.List?)
            ?.map((value) => value as core.String)
            .toList(),
        noncurrentTimeBefore: json_.containsKey('noncurrentTimeBefore')
            ? core.DateTime.parse(
                json_['noncurrentTimeBefore'] as core.String)
            : null,
        numNewerVersions: json_['numNewerVersions'] as core.int?,
      );