RestDescription.fromJson constructor

RestDescription.fromJson(
  1. Map json_
)

Implementation

RestDescription.fromJson(core.Map json_)
    : this(
        auth: json_.containsKey('auth')
            ? RestDescriptionAuth.fromJson(
                json_['auth'] as core.Map<core.String, core.dynamic>)
            : null,
        basePath: json_.containsKey('basePath')
            ? json_['basePath'] as core.String
            : null,
        baseUrl: json_.containsKey('baseUrl')
            ? json_['baseUrl'] as core.String
            : null,
        batchPath: json_.containsKey('batchPath')
            ? json_['batchPath'] as core.String
            : null,
        canonicalName: json_.containsKey('canonicalName')
            ? json_['canonicalName'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        discoveryVersion: json_.containsKey('discoveryVersion')
            ? json_['discoveryVersion'] as core.String
            : null,
        documentationLink: json_.containsKey('documentationLink')
            ? json_['documentationLink'] as core.String
            : null,
        endpoints: json_.containsKey('endpoints')
            ? (json_['endpoints'] as core.List)
                .map((value) => RestDescriptionEndpoints.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        exponentialBackoffDefault:
            json_.containsKey('exponentialBackoffDefault')
                ? json_['exponentialBackoffDefault'] as core.bool
                : null,
        features: json_.containsKey('features')
            ? (json_['features'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        icons: json_.containsKey('icons')
            ? RestDescriptionIcons.fromJson(
                json_['icons'] 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.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        methods: json_.containsKey('methods')
            ? (json_['methods'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  RestMethod.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        ownerDomain: json_.containsKey('ownerDomain')
            ? json_['ownerDomain'] as core.String
            : null,
        ownerName: json_.containsKey('ownerName')
            ? json_['ownerName'] as core.String
            : null,
        packagePath: json_.containsKey('packagePath')
            ? json_['packagePath'] as core.String
            : 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,
        protocol: json_.containsKey('protocol')
            ? json_['protocol'] as core.String
            : null,
        resources: json_.containsKey('resources')
            ? (json_['resources'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  RestResource.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        revision: json_.containsKey('revision')
            ? json_['revision'] as core.String
            : null,
        rootUrl: json_.containsKey('rootUrl')
            ? json_['rootUrl'] as core.String
            : null,
        schemas: json_.containsKey('schemas')
            ? (json_['schemas'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  JsonSchema.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        servicePath: json_.containsKey('servicePath')
            ? json_['servicePath'] as core.String
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        version: json_.containsKey('version')
            ? json_['version'] as core.String
            : null,
        versionModule: json_.containsKey('version_module')
            ? json_['version_module'] as core.bool
            : null,
      );