ApiSpec.fromJson constructor

ApiSpec.fromJson(
  1. Map json_
)

Implementation

ApiSpec.fromJson(core.Map json_)
    : this(
        annotations: json_.containsKey('annotations')
            ? (json_['annotations'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        contents: json_.containsKey('contents')
            ? json_['contents'] as core.String
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        filename: json_.containsKey('filename')
            ? json_['filename'] as core.String
            : null,
        hash: json_.containsKey('hash') ? json_['hash'] 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,
        mimeType: json_.containsKey('mimeType')
            ? json_['mimeType'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        revisionCreateTime: json_.containsKey('revisionCreateTime')
            ? json_['revisionCreateTime'] as core.String
            : null,
        revisionId: json_.containsKey('revisionId')
            ? json_['revisionId'] as core.String
            : null,
        revisionUpdateTime: json_.containsKey('revisionUpdateTime')
            ? json_['revisionUpdateTime'] as core.String
            : null,
        sizeBytes: json_.containsKey('sizeBytes')
            ? json_['sizeBytes'] as core.int
            : null,
        sourceUri: json_.containsKey('sourceUri')
            ? json_['sourceUri'] as core.String
            : null,
      );