TReq

Struct field requirement levels.

Values

ValueMeaning
AUTO

Detect the requiredness from the field type: if it is nullable, treat the field as optional, if it is non-nullable, treat the field as required. This is the default used for handling structs not generated from an IDL file, and never emitted by the Thrift compiler. TReq.AUTO shouldn't be specified explicitly.

OPT_IN_REQ_OUT

The field is treated as optional when deserializing/receiving the struct and as required when serializing/sending. This is the Thrift default if neither "required" nor "optional" are specified in the IDL file.

OPTIONAL

The field is optional.

REQUIRED

The field is required.

IGNORE

Ignore the struct field when serializing/deserializing.

Meta