BucketCors.fromJson constructor

BucketCors.fromJson(
  1. Map _json
)

Implementation

BucketCors.fromJson(core.Map _json)
    : this(
        maxAgeSeconds: _json.containsKey('maxAgeSeconds')
            ? _json['maxAgeSeconds'] as core.int
            : null,
        method: _json.containsKey('method')
            ? (_json['method'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        origin: _json.containsKey('origin')
            ? (_json['origin'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        responseHeader: _json.containsKey('responseHeader')
            ? (_json['responseHeader'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
      );