Secret.fromJson constructor

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

Creates a Secret from JSON data.

Implementation

factory Secret.fromJson(Map<String, dynamic> json) {
  final tempApiVersionJson = json['apiVersion'];
  final tempDataJson = json['data'];
  final tempImmutableJson = json['immutable'];
  final tempKindJson = json['kind'];
  final tempMetadataJson = json['metadata'];
  final tempStringDataJson = json['stringData'];
  final tempTypeJson = json['type'];

  final String? tempApiVersion = tempApiVersionJson;

  final Map<String, String>? tempData =
      tempDataJson != null ? Map<String, String>.from(tempDataJson) : null;

  final bool? tempImmutable = tempImmutableJson;
  final String? tempKind = tempKindJson;
  final ObjectMeta? tempMetadata =
      tempMetadataJson != null ? ObjectMeta.fromJson(tempMetadataJson) : null;

  final Map<String, String>? tempStringData = tempStringDataJson != null
      ? Map<String, String>.from(tempStringDataJson)
      : null;

  final String? tempType = tempTypeJson;

  return Secret(
    apiVersion: tempApiVersion,
    data: tempData,
    immutable: tempImmutable,
    kind: tempKind,
    metadata: tempMetadata,
    stringData: tempStringData,
    type: tempType,
  );
}