// This is a generated file, modify: generate/templates/templates/struct_header.h

// generated from struct_header.h
#ifndef GITINDEXENTRY_H
#define GITINDEXENTRY_H
#include <nan.h>
#include <string>
#include <utility>

#include "async_baton.h"
#include "async_worker.h"
#include "callback_wrapper.h"
#include "context.h"
#include "reference_counter.h"
#include "nodegit_wrapper.h"
#include "configurable_class_wrapper.h"
#include "v8_helpers.h"

extern "C" {
  #include <git2.h>
  #include <git2/sys/errors.h>
 }

  #include "../include/index_time.h"
  #include "../include/oid.h"
 
using namespace node;
using namespace v8;

class GitIndexEntry;
class ConfigurableGitIndexEntry;
 
struct GitIndexEntryTraits {
  typedef GitIndexEntry cppClass;
  typedef git_index_entry cType;
  typedef ConfigurableGitIndexEntry configurableCppClass;
 
  static const bool isDuplicable = false;
  static void duplicate(git_index_entry **dest, git_index_entry *src) {
     Nan::ThrowError("duplicate called on GitIndexEntry which cannot be duplicated");
   }

  static std::string className() { return "GitIndexEntry"; };
  static const bool isSingleton = false;
  static const bool isFreeable = true;
  static void free(git_index_entry *raw) {
    unsigned long referenceCount = 0;
     if (referenceCount == 0) {
      ::free(raw); // :: to avoid calling this free recursively
    }
   }
};
   class GitIndexEntry : public NodeGitWrapper<GitIndexEntryTraits> {
      // grant full access to base class
      friend class NodeGitWrapper<GitIndexEntryTraits>;

    public:
      GitIndexEntry(git_index_entry* raw, bool selfFreeing, v8::Local<v8::Object> owner = v8::Local<v8::Object>());
      GitIndexEntry(const GitIndexEntry &) = delete;
      GitIndexEntry(GitIndexEntry &&) = delete;
      GitIndexEntry &operator=(const GitIndexEntry &) = delete;
      GitIndexEntry &operator=(GitIndexEntry &&) = delete;
      static void InitializeComponent (v8::Local<v8::Object> target, nodegit::Context *nodegitContext);

    private:
      GitIndexEntry();
      ~GitIndexEntry();

      void ConstructFields();

              Nan::Global<Value> ctime;
  
          static NAN_GETTER(GetCtime);
          static NAN_SETTER(SetCtime);

               Nan::Global<Value> mtime;
  
          static NAN_GETTER(GetMtime);
          static NAN_SETTER(SetMtime);

   
          static NAN_GETTER(GetDev);
          static NAN_SETTER(SetDev);

   
          static NAN_GETTER(GetIno);
          static NAN_SETTER(SetIno);

   
          static NAN_GETTER(GetMode);
          static NAN_SETTER(SetMode);

   
          static NAN_GETTER(GetUid);
          static NAN_SETTER(SetUid);

   
          static NAN_GETTER(GetGid);
          static NAN_SETTER(SetGid);

   
          static NAN_GETTER(GetFileSize);
          static NAN_SETTER(SetFileSize);

               Nan::Global<Value> id;
  
          static NAN_GETTER(GetId);
          static NAN_SETTER(SetId);

   
          static NAN_GETTER(GetFlags);
          static NAN_SETTER(SetFlags);

   
          static NAN_GETTER(GetFlagsExtended);
          static NAN_SETTER(SetFlagsExtended);

   
          static NAN_GETTER(GetPath);
          static NAN_SETTER(SetPath);

    };
 
class ConfigurableGitIndexEntry : public nodegit::ConfigurableClassWrapper<GitIndexEntryTraits> {
  friend class nodegit::ConfigurableClassWrapper<GitIndexEntryTraits>;

public:
  static v8ConversionResult fromJavascript(nodegit::Context *nodegitContext, v8::Local<v8::Value> input);
  ~ConfigurableGitIndexEntry();

  ConfigurableGitIndexEntry(const ConfigurableGitIndexEntry &) = delete;
  ConfigurableGitIndexEntry(ConfigurableGitIndexEntry &&) = delete;
  ConfigurableGitIndexEntry &operator=(const ConfigurableGitIndexEntry &) = delete;
  ConfigurableGitIndexEntry &operator=(ConfigurableGitIndexEntry &&) = delete;

                         
private:
  ConfigurableGitIndexEntry(nodegit::Context *nodegitContext);
  ConfigurableGitIndexEntry() = delete;
  Nan::Global<Value> promiseError;

                                      
};

#endif
