RestMethod.fromJson constructor

RestMethod.fromJson(
  1. Map json_
)

Implementation

RestMethod.fromJson(core.Map json_)
    : this(
        apiVersion: json_.containsKey('apiVersion')
            ? json_['apiVersion'] as core.String
            : null,
        deprecated: json_.containsKey('deprecated')
            ? json_['deprecated'] as core.bool
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        etagRequired: json_.containsKey('etagRequired')
            ? json_['etagRequired'] as core.bool
            : null,
        flatPath: json_.containsKey('flatPath')
            ? json_['flatPath'] as core.String
            : null,
        httpMethod: json_.containsKey('httpMethod')
            ? json_['httpMethod'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        mediaUpload: json_.containsKey('mediaUpload')
            ? RestMethodMediaUpload.fromJson(
                json_['mediaUpload'] as core.Map<core.String, core.dynamic>)
            : null,
        parameterOrder: json_.containsKey('parameterOrder')
            ? (json_['parameterOrder'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        parameters: json_.containsKey('parameters')
            ? (json_['parameters'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  JsonSchema.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        path: json_.containsKey('path') ? json_['path'] as core.String : null,
        request: json_.containsKey('request')
            ? RestMethodRequest.fromJson(
                json_['request'] as core.Map<core.String, core.dynamic>)
            : null,
        response: json_.containsKey('response')
            ? RestMethodResponse.fromJson(
                json_['response'] as core.Map<core.String, core.dynamic>)
            : null,
        scopes: json_.containsKey('scopes')
            ? (json_['scopes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        supportsMediaDownload: json_.containsKey('supportsMediaDownload')
            ? json_['supportsMediaDownload'] as core.bool
            : null,
        supportsMediaUpload: json_.containsKey('supportsMediaUpload')
            ? json_['supportsMediaUpload'] as core.bool
            : null,
        supportsSubscription: json_.containsKey('supportsSubscription')
            ? json_['supportsSubscription'] as core.bool
            : null,
        useMediaDownloadService: json_.containsKey('useMediaDownloadService')
            ? json_['useMediaDownloadService'] as core.bool
            : null,
      );