CopyModelRequest.fromJson constructor

CopyModelRequest.fromJson(
  1. Object? j
)

Implementation

factory CopyModelRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return CopyModelRequest(
    modelId: switch (json['modelId']) {
      null => null,
      Object $1 => decodeString($1),
    },
    parentModel: switch (json['parentModel']) {
      null => null,
      Object $1 => decodeString($1),
    },
    parent: switch (json['parent']) {
      null => '',
      Object $1 => decodeString($1),
    },
    sourceModel: switch (json['sourceModel']) {
      null => '',
      Object $1 => decodeString($1),
    },
    encryptionSpec: switch (json['encryptionSpec']) {
      null => null,
      Object $1 => EncryptionSpec.fromJson($1),
    },
  );
}