InferenceSpecification.fromJson constructor
InferenceSpecification.fromJson(
- Map<String, dynamic> json
)
Implementation
factory InferenceSpecification.fromJson(Map<String, dynamic> json) {
return InferenceSpecification(
containers: (json['Containers'] as List)
.whereNotNull()
.map((e) => ModelPackageContainerDefinition.fromJson(
e as Map<String, dynamic>))
.toList(),
supportedContentTypes: (json['SupportedContentTypes'] as List)
.whereNotNull()
.map((e) => e as String)
.toList(),
supportedResponseMIMETypes: (json['SupportedResponseMIMETypes'] as List)
.whereNotNull()
.map((e) => e as String)
.toList(),
supportedRealtimeInferenceInstanceTypes:
(json['SupportedRealtimeInferenceInstanceTypes'] as List?)
?.whereNotNull()
.map((e) => (e as String).toProductionVariantInstanceType())
.toList(),
supportedTransformInstanceTypes:
(json['SupportedTransformInstanceTypes'] as List?)
?.whereNotNull()
.map((e) => (e as String).toTransformInstanceType())
.toList(),
);
}