/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: lock.proto */

#ifndef PROTOBUF_C_lock_2eproto__INCLUDED
#define PROTOBUF_C_lock_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protobuf-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1005001 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protobuf-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protobuf-c.
#endif

#include "rpc.pb-c.h"

typedef struct V3lockpb__LockRequest V3lockpb__LockRequest;
typedef struct V3lockpb__LockResponse V3lockpb__LockResponse;
typedef struct V3lockpb__UnlockRequest V3lockpb__UnlockRequest;
typedef struct V3lockpb__UnlockResponse V3lockpb__UnlockResponse;


/* --- enums --- */


/* --- messages --- */

struct  V3lockpb__LockRequest
{
  ProtobufCMessage base;
  /*
   * name is the identifier for the distributed shared lock to be acquired.
   */
  ProtobufCBinaryData name;
  /*
   * lease is the ID of the lease that will be attached to ownership of the
   * lock. If the lease expires or is revoked and currently holds the lock,
   * the lock is automatically released.
   */
  int64_t lease;
};
#define V3LOCKPB__LOCK_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&v3lockpb__lock_request__descriptor) \
    , {0,NULL}, 0 }


struct  V3lockpb__LockResponse
{
  ProtobufCMessage base;
  Etcdserverpb__ResponseHeader *header;
  /*
   * key is a key that will exist on etcd for the duration that the Lock caller
   * owns the lock. Users should not modify this key or the lock may exhibit
   * undefined behavior.
   */
  ProtobufCBinaryData key;
};
#define V3LOCKPB__LOCK_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&v3lockpb__lock_response__descriptor) \
    , NULL, {0,NULL} }


struct  V3lockpb__UnlockRequest
{
  ProtobufCMessage base;
  /*
   * key is the lock ownership key granted by Lock.
   */
  ProtobufCBinaryData key;
};
#define V3LOCKPB__UNLOCK_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&v3lockpb__unlock_request__descriptor) \
    , {0,NULL} }


struct  V3lockpb__UnlockResponse
{
  ProtobufCMessage base;
  Etcdserverpb__ResponseHeader *header;
};
#define V3LOCKPB__UNLOCK_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&v3lockpb__unlock_response__descriptor) \
    , NULL }


/* V3lockpb__LockRequest methods */
void   v3lockpb__lock_request__init
                     (V3lockpb__LockRequest         *message);
size_t v3lockpb__lock_request__get_packed_size
                     (const V3lockpb__LockRequest   *message);
size_t v3lockpb__lock_request__pack
                     (const V3lockpb__LockRequest   *message,
                      uint8_t             *out);
size_t v3lockpb__lock_request__pack_to_buffer
                     (const V3lockpb__LockRequest   *message,
                      ProtobufCBuffer     *buffer);
V3lockpb__LockRequest *
       v3lockpb__lock_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   v3lockpb__lock_request__free_unpacked
                     (V3lockpb__LockRequest *message,
                      ProtobufCAllocator *allocator);
/* V3lockpb__LockResponse methods */
void   v3lockpb__lock_response__init
                     (V3lockpb__LockResponse         *message);
size_t v3lockpb__lock_response__get_packed_size
                     (const V3lockpb__LockResponse   *message);
size_t v3lockpb__lock_response__pack
                     (const V3lockpb__LockResponse   *message,
                      uint8_t             *out);
size_t v3lockpb__lock_response__pack_to_buffer
                     (const V3lockpb__LockResponse   *message,
                      ProtobufCBuffer     *buffer);
V3lockpb__LockResponse *
       v3lockpb__lock_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   v3lockpb__lock_response__free_unpacked
                     (V3lockpb__LockResponse *message,
                      ProtobufCAllocator *allocator);
/* V3lockpb__UnlockRequest methods */
void   v3lockpb__unlock_request__init
                     (V3lockpb__UnlockRequest         *message);
size_t v3lockpb__unlock_request__get_packed_size
                     (const V3lockpb__UnlockRequest   *message);
size_t v3lockpb__unlock_request__pack
                     (const V3lockpb__UnlockRequest   *message,
                      uint8_t             *out);
size_t v3lockpb__unlock_request__pack_to_buffer
                     (const V3lockpb__UnlockRequest   *message,
                      ProtobufCBuffer     *buffer);
V3lockpb__UnlockRequest *
       v3lockpb__unlock_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   v3lockpb__unlock_request__free_unpacked
                     (V3lockpb__UnlockRequest *message,
                      ProtobufCAllocator *allocator);
/* V3lockpb__UnlockResponse methods */
void   v3lockpb__unlock_response__init
                     (V3lockpb__UnlockResponse         *message);
size_t v3lockpb__unlock_response__get_packed_size
                     (const V3lockpb__UnlockResponse   *message);
size_t v3lockpb__unlock_response__pack
                     (const V3lockpb__UnlockResponse   *message,
                      uint8_t             *out);
size_t v3lockpb__unlock_response__pack_to_buffer
                     (const V3lockpb__UnlockResponse   *message,
                      ProtobufCBuffer     *buffer);
V3lockpb__UnlockResponse *
       v3lockpb__unlock_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   v3lockpb__unlock_response__free_unpacked
                     (V3lockpb__UnlockResponse *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*V3lockpb__LockRequest_Closure)
                 (const V3lockpb__LockRequest *message,
                  void *closure_data);
typedef void (*V3lockpb__LockResponse_Closure)
                 (const V3lockpb__LockResponse *message,
                  void *closure_data);
typedef void (*V3lockpb__UnlockRequest_Closure)
                 (const V3lockpb__UnlockRequest *message,
                  void *closure_data);
typedef void (*V3lockpb__UnlockResponse_Closure)
                 (const V3lockpb__UnlockResponse *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor v3lockpb__lock_request__descriptor;
extern const ProtobufCMessageDescriptor v3lockpb__lock_response__descriptor;
extern const ProtobufCMessageDescriptor v3lockpb__unlock_request__descriptor;
extern const ProtobufCMessageDescriptor v3lockpb__unlock_response__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_lock_2eproto__INCLUDED */
