in sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/AmqpMetricsProvider.java [390:540]
private static String responseCodeToLowerCaseString(AmqpResponseCode response) {
if (response == null) {
return "error";
}
switch (response) {
case OK:
return "ok";
case ACCEPTED:
return "accepted";
case BAD_REQUEST:
return "bad_request";
case NOT_FOUND:
return "not_found";
case FORBIDDEN:
return "forbidden";
case INTERNAL_SERVER_ERROR:
return "internal_server_error";
case UNAUTHORIZED:
return "unauthorized";
case CONTINUE:
return "continue";
case SWITCHING_PROTOCOLS:
return "switching_protocols";
case CREATED:
return "created";
case NON_AUTHORITATIVE_INFORMATION:
return "not_authoritative_information";
case NO_CONTENT:
return "no_content";
case RESET_CONTENT:
return "reset_content";
case PARTIAL_CONTENT:
return "partial_content";
case AMBIGUOUS:
return "ambiguous";
case MULTIPLE_CHOICES:
return "multiple_choices";
case MOVED:
return "moved";
case MOVED_PERMANENTLY:
return "moved_permanently";
case FOUND:
return "found";
case REDIRECT:
return "redirect";
case REDIRECT_METHOD:
return "redirect_method";
case SEE_OTHER:
return "see_other";
case NOT_MODIFIED:
return "not_modified";
case USE_PROXY:
return "use_proxy";
case UNUSED:
return "unused";
case REDIRECT_KEEP_VERB:
return "redirect_keep_verb";
case TEMPORARY_REDIRECT:
return "temporary_redirect";
case PAYMENT_REQUIRED:
return "payment_required";
case METHOD_NOT_ALLOWED:
return "method_no_allowed";
case NOT_ACCEPTABLE:
return "not_acceptable";
case PROXY_AUTHENTICATION_REQUIRED:
return "proxy_authentication_required";
case REQUEST_TIMEOUT:
return "request_timeout";
case CONFLICT:
return "conflict";
case GONE:
return "gone";
case LENGTH_REQUIRED:
return "length_required";
case PRECONDITION_FAILED:
return "precondition_failed";
case REQUEST_ENTITY_TOO_LARGE:
return "request_entity_is_too_large";
case REQUEST_URI_TOO_LONG:
return "request_uri_too_long";
case UNSUPPORTED_MEDIA_TYPE:
return "unsupported_media_type";
case REQUESTED_RANGE_NOT_SATISFIABLE:
return "requested_range_not_satisfiable";
case EXPECTATION_FAILED:
return "expectation_failed";
case UPGRADE_REQUIRED:
return "upgrade_required";
case NOT_IMPLEMENTED:
return "no_implemented";
case BAD_GATEWAY:
return "bad_gateway";
case SERVICE_UNAVAILABLE:
return "service_unavailable";
case GATEWAY_TIMEOUT:
return "gateway_timeout";
case HTTP_VERSION_NOT_SUPPORTED:
return "http_version_not_supported";
default:
return "error";
}
}