Class: TrackPicForm

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/track_types.rb

Constant Summary collapse

ID =
1
CRUD =
2
FIELDS =
{
  ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
  CRUD => {:type => ::Thrift::Types::I32, :name => 'crud', :optional => true, :enum_class => ::CRUDOperation}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



211
# File 'lib/track_types.rb', line 211

def struct_fields; FIELDS; end

#validateObject



213
214
215
216
217
# File 'lib/track_types.rb', line 213

def validate
  unless @crud.nil? || ::CRUDOperation::VALID_VALUES.include?(@crud)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field crud!')
  end
end