# DO NOT EDIT
# Autogenerated by mkproto.pl

package Rethinkdb::Protocol;
use Rethinkdb::Base -base;

has 'versionDummy' => sub { Rethinkdb::Protocol::VersionDummy->new; };
has 'query' => sub { Rethinkdb::Protocol::Query->new; };
has 'frame' => sub { Rethinkdb::Protocol::Frame->new; };
has 'backtrace' => sub { Rethinkdb::Protocol::Backtrace->new; };
has 'response' => sub { Rethinkdb::Protocol::Response->new; };
has 'datum' => sub { Rethinkdb::Protocol::Datum->new; };
has 'term' => sub { Rethinkdb::Protocol::Term->new; };
package Rethinkdb::Protocol::VersionDummy;
use Rethinkdb::Base -base;
has 'version' => sub { Rethinkdb::Protocol::Version->new; };
has 'protocol' => sub { Rethinkdb::Protocol::Protocol->new; };

package Rethinkdb::Protocol::Version;
use Rethinkdb::Base -base;
has 'v0_1' => 0x3f61ba36;
has 'v0_2' => 0x723081e1;
has 'v0_3' => 0x5f75e83e;
has 'v0_4' => 0x400c2d20;
has 'v1_0' => 0x34c2bdc3;

package Rethinkdb::Protocol::Protocol;
use Rethinkdb::Base -base;
has 'protobuf' => 0x271ffc41;
has 'json' => 0x7e6970c7;

package Rethinkdb::Protocol::Query;
use Rethinkdb::Base -base;
has 'queryType' => sub { Rethinkdb::Protocol::QueryType->new; };

package Rethinkdb::Protocol::QueryType;
use Rethinkdb::Base -base;
has 'start' => 1;
has 'continue' => 2;
has 'stop' => 3;
has 'noreply_wait' => 4;
has 'server_info' => 5;

package Rethinkdb::Protocol::Frame;
use Rethinkdb::Base -base;
has 'frameType' => sub { Rethinkdb::Protocol::FrameType->new; };

package Rethinkdb::Protocol::FrameType;
use Rethinkdb::Base -base;
has 'pos' => 1;
has 'opt' => 2;

package Rethinkdb::Protocol::Backtrace;
use Rethinkdb::Base -base;

package Rethinkdb::Protocol::Response;
use Rethinkdb::Base -base;
has 'responseType' => sub { Rethinkdb::Protocol::ResponseType->new; };
has 'errorType' => sub { Rethinkdb::Protocol::ErrorType->new; };
has 'responseNote' => sub { Rethinkdb::Protocol::ResponseNote->new; };

package Rethinkdb::Protocol::ResponseType;
use Rethinkdb::Base -base;
has 'success_atom' => 1;
has 'success_sequence' => 2;
has 'success_partial' => 3;
has 'wait_complete' => 4;
has 'server_info' => 5;
has 'client_error' => 16;
has 'compile_error' => 17;
has 'runtime_error' => 18;

package Rethinkdb::Protocol::ErrorType;
use Rethinkdb::Base -base;
has 'internal' => 1000000;
has 'resource_limit' => 2000000;
has 'query_logic' => 3000000;
has 'non_existence' => 3100000;
has 'op_failed' => 4100000;
has 'op_indeterminate' => 4200000;
has 'user' => 5000000;
has 'permission_error' => 6000000;

package Rethinkdb::Protocol::ResponseNote;
use Rethinkdb::Base -base;
has 'sequence_feed' => 1;
has 'atom_feed' => 2;
has 'order_by_limit_feed' => 3;
has 'unioned_feed' => 4;
has 'includes_states' => 5;

package Rethinkdb::Protocol::Datum;
use Rethinkdb::Base -base;
has 'datumType' => sub { Rethinkdb::Protocol::DatumType->new; };

package Rethinkdb::Protocol::DatumType;
use Rethinkdb::Base -base;
has 'r_null' => 1;
has 'r_bool' => 2;
has 'r_num' => 3;
has 'r_str' => 4;
has 'r_array' => 5;
has 'r_object' => 6;
has 'r_json' => 7;

package Rethinkdb::Protocol::Term;
use Rethinkdb::Base -base;
has 'termType' => sub { Rethinkdb::Protocol::TermType->new; };

package Rethinkdb::Protocol::TermType;
use Rethinkdb::Base -base;
has 'datum' => 1;
has 'make_array' => 2;
has 'make_obj' => 3;
has 'var' => 10;
has 'javascript' => 11;
has 'uuid' => 169;
has 'http' => 153;
has 'error' => 12;
has 'implicit_var' => 13;
has 'db' => 14;
has 'table' => 15;
has 'get' => 16;
has 'get_all' => 78;
has 'eq' => 17;
has 'ne' => 18;
has 'lt' => 19;
has 'le' => 20;
has 'gt' => 21;
has 'ge' => 22;
has 'not' => 23;
has 'add' => 24;
has 'sub' => 25;
has 'mul' => 26;
has 'div' => 27;
has 'mod' => 28;
has 'floor' => 183;
has 'ceil' => 184;
has 'round' => 185;
has 'append' => 29;
has 'prepend' => 80;
has 'difference' => 95;
has 'set_insert' => 88;
has 'set_intersection' => 89;
has 'set_union' => 90;
has 'set_difference' => 91;
has 'slice' => 30;
has 'skip' => 70;
has 'limit' => 71;
has 'offsets_of' => 87;
has 'contains' => 93;
has 'get_field' => 31;
has 'keys' => 94;
has 'values' => 186;
has 'object' => 143;
has 'has_fields' => 32;
has 'with_fields' => 96;
has 'pluck' => 33;
has 'without' => 34;
has 'merge' => 35;
has 'between_deprecated' => 36;
has 'between' => 182;
has 'reduce' => 37;
has 'map' => 38;
has 'fold' => 187;
has 'filter' => 39;
has 'concat_map' => 40;
has 'order_by' => 41;
has 'distinct' => 42;
has 'count' => 43;
has 'is_empty' => 86;
has 'union' => 44;
has 'nth' => 45;
has 'bracket' => 170;
has 'inner_join' => 48;
has 'outer_join' => 49;
has 'eq_join' => 50;
has 'zip' => 72;
has 'range' => 173;
has 'insert_at' => 82;
has 'delete_at' => 83;
has 'change_at' => 84;
has 'splice_at' => 85;
has 'coerce_to' => 51;
has 'type_of' => 52;
has 'update' => 53;
has 'delete' => 54;
has 'replace' => 55;
has 'insert' => 56;
has 'db_create' => 57;
has 'db_drop' => 58;
has 'db_list' => 59;
has 'table_create' => 60;
has 'table_drop' => 61;
has 'table_list' => 62;
has 'config' => 174;
has 'status' => 175;
has 'wait' => 177;
has 'reconfigure' => 176;
has 'rebalance' => 179;
has 'sync' => 138;
has 'grant' => 188;
has 'index_create' => 75;
has 'index_drop' => 76;
has 'index_list' => 77;
has 'index_status' => 139;
has 'index_wait' => 140;
has 'index_rename' => 156;
has 'funcall' => 64;
has 'branch' => 65;
has 'or' => 66;
has 'and' => 67;
has 'for_each' => 68;
has 'func' => 69;
has 'asc' => 73;
has 'desc' => 74;
has 'info' => 79;
has 'match' => 97;
has 'upcase' => 141;
has 'downcase' => 142;
has 'sample' => 81;
has 'default' => 92;
has 'json' => 98;
has 'to_json_string' => 172;
has 'iso8601' => 99;
has 'to_iso8601' => 100;
has 'epoch_time' => 101;
has 'to_epoch_time' => 102;
has 'now' => 103;
has 'in_timezone' => 104;
has 'during' => 105;
has 'date' => 106;
has 'time_of_day' => 126;
has 'timezone' => 127;
has 'year' => 128;
has 'month' => 129;
has 'day' => 130;
has 'day_of_week' => 131;
has 'day_of_year' => 132;
has 'hours' => 133;
has 'minutes' => 134;
has 'seconds' => 135;
has 'time' => 136;
has 'monday' => 107;
has 'tuesday' => 108;
has 'wednesday' => 109;
has 'thursday' => 110;
has 'friday' => 111;
has 'saturday' => 112;
has 'sunday' => 113;
has 'january' => 114;
has 'february' => 115;
has 'march' => 116;
has 'april' => 117;
has 'may' => 118;
has 'june' => 119;
has 'july' => 120;
has 'august' => 121;
has 'september' => 122;
has 'october' => 123;
has 'november' => 124;
has 'december' => 125;
has 'literal' => 137;
has 'group' => 144;
has 'sum' => 145;
has 'avg' => 146;
has 'min' => 147;
has 'max' => 148;
has 'split' => 149;
has 'ungroup' => 150;
has 'random' => 151;
has 'changes' => 152;
has 'args' => 154;
has 'binary' => 155;
has 'geojson' => 157;
has 'to_geojson' => 158;
has 'point' => 159;
has 'line' => 160;
has 'polygon' => 161;
has 'distance' => 162;
has 'intersects' => 163;
has 'includes' => 164;
has 'circle' => 165;
has 'get_intersecting' => 166;
has 'fill' => 167;
has 'get_nearest' => 168;
has 'polygon_sub' => 171;
has 'minval' => 180;
has 'maxval' => 181;

1;

=encoding utf8

=head1 NAME

Rethinkdb::Protocol - Rethinkdb Protocol

=head1 SYNOPSIS

  my $p = Rethinkdb::Protocol->new;
  $p->term->termType->get_all;

=head1 DESCRIPTION

This file is automatically generated to enable this driver to serialize &
deserialize RethinkDB Query Langauge messages.

=head1 ATTRIBUTES

L<Rethinkdb::Protocol> implements the following attributes.

=head2 backtrace

Quick access to the C<backtrace> section of the protocol.

=head2 datum

Quick access to the C<datum> section of the protocol.

=head2 frame

Quick access to the C<frame> section of the protocol.

=head2 query

Quick access to the C<query> section of the protocol.

=head2 response

Quick access to the C<response> section of the protocol.

=head2 term

Quick access to the C<term> section of the protocol.

=head2 versionDummy

Quick access to the C<versionDummy> section of the protocol.

=head1 SEE ALSO

L<Rethinkdb>, L<http://rethinkdb.com>

=cut