Package io.github.jdbcx

# Enum RequestParameter

java.lang.Object
java.lang.Enum<RequestParameter>
io.github.jdbcx.RequestParameter

All Implemented Interfaces:
  `Serializable`, `Comparable<RequestParameter>`, `java.lang.constant.Constable`

public enum RequestParameter extends Enum<RequestParameter>

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`AGENT`
Agent or client of the request.
`COMPRESSION`
Preferred encoding or compression of response.
`FORMAT`
Preferred MIME type of response.
`MODE`
`QueryMode` of the request.
`QUERY`
Query.
`QUERY_ID`
Unique ID of the query.
`TENANT_ID`
Tenant ID.
`TRANSACTION_ID`
Transaction ID.
`USER`
User who created the request.

## Method Summary

Modifier and Type
Method
Description
`String`
`defaultValue()`
Gets default value of the parameter.
`String`
`getValue(Map<String,String> headers, Map<String,String> params, String... defaultValues)`
Gets value of the query parameter by checking `headers`, `params`, and `defaultValues` in order.
`String`
`header()`
Gets HTTP request header name in lower case.
`String`
`parameter()`
Gets query parameter name can be used in request URL.
`static RequestParameter`
`valueOf(String name)`
Returns the enum constant of this type with the specified name.
`static RequestParameter[]`
`values()`
Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### AGENT

public static final RequestParameter AGENT
Agent or client of the request.

### COMPRESSION

public static final RequestParameter COMPRESSION
Preferred encoding or compression of response.

### FORMAT

public static final RequestParameter FORMAT
Preferred MIME type of response.

### QUERY

public static final RequestParameter QUERY
Query.

### QUERY_ID

public static final RequestParameter QUERY_ID
Unique ID of the query.

### MODE

public static final RequestParameter MODE
`QueryMode` of the request.

### TENANT_ID

public static final RequestParameter TENANT_ID
Tenant ID.

### TRANSACTION_ID

public static final RequestParameter TRANSACTION_ID
Transaction ID.

### USER

public static final RequestParameter USER
User who created the request.

## Method Details

### values

public static RequestParameter[] values()
Returns an array containing the constants of this enum type, in the order they are declared.

Returns:
  an array containing the constants of this enum type, in the order they are declared

### valueOf

public static RequestParameter valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

### header

public String header()
Gets HTTP request header name in lower case.

Returns:
  non-empty header name

### parameter

public String parameter()
Gets query parameter name can be used in request URL.

Returns:
  non-empty parameter name

### defaultValue

public String defaultValue()
Gets default value of the parameter.

Returns:
  non-null default value

### getValue

public String getValue(Map<String,String> headers, Map<String,String> params, String... defaultValues)
Gets value of the query parameter by checking `headers`, `params`, and `defaultValues` in order. `defaultValue()` will be used if no value found in inputs.

Parameters:
  `headers` - request headers
  `params` - query parameters in request URL
  `defaultValues` - default values
Returns:
  non-null value of the query parameter