{
    "BITFIELD": {
        "summary": "Perform arbitrary bitfield integer operations on strings",
        "complexity": "O(1) for each subcommand specified",
        "group": "bitmap",
        "since": "3.2.0",
        "arity": -2,
        "function": "bitfieldCommand",
        "get_keys_function": "bitfieldGetKeys",
        "command_flags": [
            "WRITE",
            "DENYOOM"
        ],
        "acl_categories": [
            "BITMAP"
        ],
        "key_specs": [
            {
                "notes": "This command allows both access and modification of the key",
                "flags": [
                    "RW",
                    "UPDATE",
                    "ACCESS",
                    "VARIABLE_FLAGS"
                ],
                "begin_search": {
                    "index": {
                        "pos": 1
                    }
                },
                "find_keys": {
                    "range": {
                        "lastkey": 0,
                        "step": 1,
                        "limit": 0
                    }
                }
            }
        ],
        "arguments": [
            {
                "name": "key",
                "type": "key",
                "key_spec_index": 0
            },
            {
                "token": "GET",
                "name": "encoding_offset",
                "type": "block",
                "optional": true,
                "arguments": [
                    {
                        "name": "encoding",
                        "type": "string"
                    },
                    {
                        "name": "offset",
                        "type": "integer"
                    }
                ]
            },
            {
                "token": "SET",
                "name": "encoding_offset_value",
                "type": "block",
                "optional": true,
                "arguments": [
                    {
                        "name": "encoding",
                        "type": "string"
                    },
                    {
                        "name": "offset",
                        "type": "integer"
                    },
                    {
                        "name": "value",
                        "type": "integer"
                    }
                ]
            },
            {
                "token": "INCRBY",
                "name": "encoding_offset_increment",
                "type": "block",
                "optional": true,
                "arguments": [
                    {
                        "name": "encoding",
                        "type": "string"
                    },
                    {
                        "name": "offset",
                        "type": "integer"
                    },
                    {
                        "name": "increment",
                        "type": "integer"
                    }
                ]
            },
            {
                "token": "OVERFLOW",
                "name": "wrap_sat_fail",
                "type": "oneof",
                "optional": true,
                "arguments": [
                    {
                        "name": "wrap",
                        "type": "pure-token",
                        "token": "WRAP"
                    },
                    {
                        "name": "sat",
                        "type": "pure-token",
                        "token": "SAT"
                    },
                    {
                        "name": "fail",
                        "type": "pure-token",
                        "token": "FAIL"
                    }
                ]
            }
        ]
    }
}
