blob: 6133cb4547ee7e7cfbd1165e864cad799f77ccbb [file] [log] [blame]
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'dependency.dart';
// **************************************************************************
// Generator: JsonSerializableGenerator
// **************************************************************************
SdkDependency _$SdkDependencyFromJson(Map json) {
return $checkedNew('SdkDependency', json, () {
var val = new SdkDependency(
$checkedConvert(json, 'sdk', (v) => v as String),
version: $checkedConvert(json, 'version',
(v) => v == null ? null : _constraintFromString(v as String)));
return val;
});
}
GitDependency _$GitDependencyFromJson(Map json) {
return $checkedNew('GitDependency', json, () {
$checkKeys(json,
requiredKeys: const ['url'], disallowNullValues: const ['url']);
var val = new GitDependency(
$checkedConvert(
json, 'url', (v) => v == null ? null : _parseUri(v as String)),
$checkedConvert(json, 'ref', (v) => v as String),
$checkedConvert(json, 'path', (v) => v as String));
return val;
});
}
HostedDependency _$HostedDependencyFromJson(Map json) {
return $checkedNew('HostedDependency', json, () {
$checkKeys(json,
allowedKeys: const ['version', 'hosted'],
disallowNullValues: const ['hosted']);
var val = new HostedDependency(
version: $checkedConvert(json, 'version',
(v) => v == null ? null : _constraintFromString(v as String)),
hosted: $checkedConvert(json, 'hosted',
(v) => v == null ? null : new HostedDetails.fromJson(v)));
return val;
});
}
HostedDetails _$HostedDetailsFromJson(Map json) {
return $checkedNew('HostedDetails', json, () {
$checkKeys(json,
allowedKeys: const ['name', 'url'],
requiredKeys: const ['name'],
disallowNullValues: const ['name', 'url']);
var val = new HostedDetails(
$checkedConvert(json, 'name', (v) => v as String),
$checkedConvert(
json, 'url', (v) => v == null ? null : _parseUri(v as String)));
return val;
});
}