Service.fromJson constructor

Service.fromJson(
  1. Map json_
)

Implementation

Service.fromJson(core.Map json_)
    : this(
        apis: json_.containsKey('apis')
            ? (json_['apis'] as core.List)
                .map((value) => Api.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        authentication: json_.containsKey('authentication')
            ? Authentication.fromJson(json_['authentication']
                as core.Map<core.String, core.dynamic>)
            : null,
        backend: json_.containsKey('backend')
            ? Backend.fromJson(
                json_['backend'] as core.Map<core.String, core.dynamic>)
            : null,
        billing: json_.containsKey('billing')
            ? Billing.fromJson(
                json_['billing'] as core.Map<core.String, core.dynamic>)
            : null,
        configVersion: json_.containsKey('configVersion')
            ? json_['configVersion'] as core.int
            : null,
        context: json_.containsKey('context')
            ? Context.fromJson(
                json_['context'] as core.Map<core.String, core.dynamic>)
            : null,
        control: json_.containsKey('control')
            ? Control.fromJson(
                json_['control'] as core.Map<core.String, core.dynamic>)
            : null,
        customError: json_.containsKey('customError')
            ? CustomError.fromJson(
                json_['customError'] as core.Map<core.String, core.dynamic>)
            : null,
        documentation: json_.containsKey('documentation')
            ? Documentation.fromJson(
                json_['documentation'] as core.Map<core.String, core.dynamic>)
            : null,
        endpoints: json_.containsKey('endpoints')
            ? (json_['endpoints'] as core.List)
                .map((value) => Endpoint.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        enums: json_.containsKey('enums')
            ? (json_['enums'] as core.List)
                .map((value) => Enum.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        http: json_.containsKey('http')
            ? Http.fromJson(
                json_['http'] as core.Map<core.String, core.dynamic>)
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        logging: json_.containsKey('logging')
            ? Logging.fromJson(
                json_['logging'] as core.Map<core.String, core.dynamic>)
            : null,
        logs: json_.containsKey('logs')
            ? (json_['logs'] as core.List)
                .map((value) => LogDescriptor.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        metrics: json_.containsKey('metrics')
            ? (json_['metrics'] as core.List)
                .map((value) => MetricDescriptor.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        monitoredResources: json_.containsKey('monitoredResources')
            ? (json_['monitoredResources'] as core.List)
                .map((value) => MonitoredResourceDescriptor.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        monitoring: json_.containsKey('monitoring')
            ? Monitoring.fromJson(
                json_['monitoring'] as core.Map<core.String, core.dynamic>)
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        producerProjectId: json_.containsKey('producerProjectId')
            ? json_['producerProjectId'] as core.String
            : null,
        publishing: json_.containsKey('publishing')
            ? Publishing.fromJson(
                json_['publishing'] as core.Map<core.String, core.dynamic>)
            : null,
        quota: json_.containsKey('quota')
            ? Quota.fromJson(
                json_['quota'] as core.Map<core.String, core.dynamic>)
            : null,
        sourceInfo: json_.containsKey('sourceInfo')
            ? SourceInfo.fromJson(
                json_['sourceInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        systemParameters: json_.containsKey('systemParameters')
            ? SystemParameters.fromJson(json_['systemParameters']
                as core.Map<core.String, core.dynamic>)
            : null,
        systemTypes: json_.containsKey('systemTypes')
            ? (json_['systemTypes'] as core.List)
                .map((value) => Type.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        types: json_.containsKey('types')
            ? (json_['types'] as core.List)
                .map((value) => Type.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        usage: json_.containsKey('usage')
            ? Usage.fromJson(
                json_['usage'] as core.Map<core.String, core.dynamic>)
            : null,
      );