Bucket.fromJson constructor

Bucket.fromJson(
  1. Map json_
)

Implementation

Bucket.fromJson(core.Map json_)
    : this(
        acl: json_.containsKey('acl')
            ? (json_['acl'] as core.List)
                .map((value) => BucketAccessControl.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        autoclass: json_.containsKey('autoclass')
            ? BucketAutoclass.fromJson(
                json_['autoclass'] as core.Map<core.String, core.dynamic>)
            : null,
        billing: json_.containsKey('billing')
            ? BucketBilling.fromJson(
                json_['billing'] as core.Map<core.String, core.dynamic>)
            : null,
        cors: json_.containsKey('cors')
            ? (json_['cors'] as core.List)
                .map((value) => BucketCors.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        customPlacementConfig: json_.containsKey('customPlacementConfig')
            ? BucketCustomPlacementConfig.fromJson(
                json_['customPlacementConfig']
                    as core.Map<core.String, core.dynamic>)
            : null,
        defaultEventBasedHold: json_.containsKey('defaultEventBasedHold')
            ? json_['defaultEventBasedHold'] as core.bool
            : null,
        defaultObjectAcl: json_.containsKey('defaultObjectAcl')
            ? (json_['defaultObjectAcl'] as core.List)
                .map((value) => ObjectAccessControl.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        encryption: json_.containsKey('encryption')
            ? BucketEncryption.fromJson(
                json_['encryption'] as core.Map<core.String, core.dynamic>)
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        iamConfiguration: json_.containsKey('iamConfiguration')
            ? BucketIamConfiguration.fromJson(json_['iamConfiguration']
                as core.Map<core.String, core.dynamic>)
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : 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,
        lifecycle: json_.containsKey('lifecycle')
            ? BucketLifecycle.fromJson(
                json_['lifecycle'] as core.Map<core.String, core.dynamic>)
            : null,
        location: json_.containsKey('location')
            ? json_['location'] as core.String
            : null,
        locationType: json_.containsKey('locationType')
            ? json_['locationType'] as core.String
            : null,
        logging: json_.containsKey('logging')
            ? BucketLogging.fromJson(
                json_['logging'] as core.Map<core.String, core.dynamic>)
            : null,
        metageneration: json_.containsKey('metageneration')
            ? json_['metageneration'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        owner: json_.containsKey('owner')
            ? BucketOwner.fromJson(
                json_['owner'] as core.Map<core.String, core.dynamic>)
            : null,
        projectNumber: json_.containsKey('projectNumber')
            ? json_['projectNumber'] as core.String
            : null,
        retentionPolicy: json_.containsKey('retentionPolicy')
            ? BucketRetentionPolicy.fromJson(json_['retentionPolicy']
                as core.Map<core.String, core.dynamic>)
            : null,
        rpo: json_.containsKey('rpo') ? json_['rpo'] as core.String : null,
        satisfiesPZS: json_.containsKey('satisfiesPZS')
            ? json_['satisfiesPZS'] as core.bool
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        storageClass: json_.containsKey('storageClass')
            ? json_['storageClass'] as core.String
            : null,
        timeCreated: json_.containsKey('timeCreated')
            ? core.DateTime.parse(json_['timeCreated'] as core.String)
            : null,
        updated: json_.containsKey('updated')
            ? core.DateTime.parse(json_['updated'] as core.String)
            : null,
        versioning: json_.containsKey('versioning')
            ? BucketVersioning.fromJson(
                json_['versioning'] as core.Map<core.String, core.dynamic>)
            : null,
        website: json_.containsKey('website')
            ? BucketWebsite.fromJson(
                json_['website'] as core.Map<core.String, core.dynamic>)
            : null,
      );