toPublic method

BlockReason toPublic()

Maps the internal BlockReason enum to the external BlockReason enum.

Implementation

public_types.BlockReason toPublic() {
  switch (this) {
    case InternalBlockReason.UNSPECIFIED:
      return public_types.BlockReason.UNSPECIFIED;
    case InternalBlockReason.SAFETY:
      return public_types.BlockReason.SAFETY;
    case InternalBlockReason.OTHER:
      return public_types.BlockReason.OTHER;
    case InternalBlockReason.UNKNOWN:
      return public_types.BlockReason.UNKNOWN;
  }
}