CustomResourceDefinitionVersion.fromJson constructor
Creates a CustomResourceDefinitionVersion from JSON data.
Implementation
factory CustomResourceDefinitionVersion.fromJson(Map<String, dynamic> json) {
final tempAdditionalPrinterColumnsJson = json['additionalPrinterColumns'];
final tempDeprecatedJson = json['deprecated'];
final tempDeprecationWarningJson = json['deprecationWarning'];
final tempNameJson = json['name'];
final tempSchemaJson = json['schema'];
final tempServedJson = json['served'];
final tempStorageJson = json['storage'];
final tempSubresourcesJson = json['subresources'];
final List<CustomResourceColumnDefinition>? tempAdditionalPrinterColumns =
tempAdditionalPrinterColumnsJson != null
? List<dynamic>.from(tempAdditionalPrinterColumnsJson)
.map(
(e) => CustomResourceColumnDefinition.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final bool? tempDeprecated = tempDeprecatedJson;
final String? tempDeprecationWarning = tempDeprecationWarningJson;
final String tempName = tempNameJson;
final CustomResourceValidation? tempSchema = tempSchemaJson != null
? CustomResourceValidation.fromJson(tempSchemaJson)
: null;
final bool tempServed = tempServedJson;
final bool tempStorage = tempStorageJson;
final CustomResourceSubresources? tempSubresources =
tempSubresourcesJson != null
? CustomResourceSubresources.fromJson(tempSubresourcesJson)
: null;
return CustomResourceDefinitionVersion(
additionalPrinterColumns: tempAdditionalPrinterColumns,
deprecated: tempDeprecated,
deprecationWarning: tempDeprecationWarning,
name: tempName,
schema: tempSchema,
served: tempServed,
storage: tempStorage,
subresources: tempSubresources,
);
}