convent method

Implementation

ProtoFirmwareUpgradeConfiguration_FirmwareUpgradeMode convent() {
  switch (this) {
    case FirmwareUpgradeMode.confirmOnly:
      return ProtoFirmwareUpgradeConfiguration_FirmwareUpgradeMode
          .CONFIRM_ONLY;
    case FirmwareUpgradeMode.testOnly:
      return ProtoFirmwareUpgradeConfiguration_FirmwareUpgradeMode.TEST_ONLY;
    case FirmwareUpgradeMode.testAndConfirm:
      return ProtoFirmwareUpgradeConfiguration_FirmwareUpgradeMode
          .TEST_AND_CONFIRM;
    case FirmwareUpgradeMode.uploadOnly:
      return ProtoFirmwareUpgradeConfiguration_FirmwareUpgradeMode
          .UPLOAD_ONLY;
    default:
      throw 'Unsupported FirmwareUpgradeMode';
  }
}