CustomResourceConversion.fromJson constructor

CustomResourceConversion.fromJson(
  1. Map<String, dynamic> json
)

Creates a CustomResourceConversion from JSON data.

Implementation

factory CustomResourceConversion.fromJson(Map<String, dynamic> json) {
  final tempStrategyJson = json['strategy'];
  final tempWebhookJson = json['webhook'];

  final String tempStrategy = tempStrategyJson;
  final WebhookConversion? tempWebhook = tempWebhookJson != null
      ? WebhookConversion.fromJson(tempWebhookJson)
      : null;

  return CustomResourceConversion(
    strategy: tempStrategy,
    webhook: tempWebhook,
  );
}