toErrorCode method
Implementation
ErrorCode toErrorCode() {
switch (this) {
case 'BadRequest':
return ErrorCode.badRequest;
case 'Conflict':
return ErrorCode.conflict;
case 'Forbidden':
return ErrorCode.forbidden;
case 'NotFound':
return ErrorCode.notFound;
case 'PreconditionFailed':
return ErrorCode.preconditionFailed;
case 'ResourceLimitExceeded':
return ErrorCode.resourceLimitExceeded;
case 'ServiceFailure':
return ErrorCode.serviceFailure;
case 'AccessDenied':
return ErrorCode.accessDenied;
case 'ServiceUnavailable':
return ErrorCode.serviceUnavailable;
case 'Throttled':
return ErrorCode.throttled;
case 'Throttling':
return ErrorCode.throttling;
case 'Unauthorized':
return ErrorCode.unauthorized;
case 'Unprocessable':
return ErrorCode.unprocessable;
case 'VoiceConnectorGroupAssociationsExist':
return ErrorCode.voiceConnectorGroupAssociationsExist;
case 'PhoneNumberAssociationsExist':
return ErrorCode.phoneNumberAssociationsExist;
}
throw Exception('$this is not known in enum ErrorCode');
}