APIServiceSpec.fromJson constructor
Creates a APIServiceSpec from JSON data.
Implementation
factory APIServiceSpec.fromJson(Map<String, dynamic> json) {
final tempCaBundleJson = json['caBundle'];
final tempGroupJson = json['group'];
final tempGroupPriorityMinimumJson = json['groupPriorityMinimum'];
final tempInsecureSkipTLSVerifyJson = json['insecureSkipTLSVerify'];
final tempServiceJson = json['service'];
final tempVersionJson = json['version'];
final tempVersionPriorityJson = json['versionPriority'];
final String? tempCaBundle = tempCaBundleJson;
final String? tempGroup = tempGroupJson;
final int tempGroupPriorityMinimum = tempGroupPriorityMinimumJson;
final bool? tempInsecureSkipTLSVerify = tempInsecureSkipTLSVerifyJson;
final ServiceReference? tempService = tempServiceJson != null
? ServiceReference.fromJson(tempServiceJson)
: null;
final String? tempVersion = tempVersionJson;
final int tempVersionPriority = tempVersionPriorityJson;
return APIServiceSpec(
caBundle: tempCaBundle,
group: tempGroup,
groupPriorityMinimum: tempGroupPriorityMinimum,
insecureSkipTLSVerify: tempInsecureSkipTLSVerify,
service: tempService,
version: tempVersion,
versionPriority: tempVersionPriority,
);
}