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

#ifndef PROTOBUF_C_accesscontrol_2fpolicy_2eproto__INCLUDED
#define PROTOBUF_C_accesscontrol_2fpolicy_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 protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1003003 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif


typedef struct _Accesscontrol__Policy Accesscontrol__Policy;


/* --- enums --- */


/* --- messages --- */

/*
 * Policy used to describe how to authenticate a specific action
 */
struct  _Accesscontrol__Policy
{
  ProtobufCMessage base;
  /*
   * rule keywords, e.g., ANY/MAJORITY/ALL/SELF/a number/a rate
   */
  char *rule;
  /*
   * org_list describes the organization set included in the authentication
   */
  size_t n_org_list;
  char **org_list;
  /*
   * role_list describes the role set included in the authentication
   * e.g., admin/client/consensus/common
   */
  size_t n_role_list;
  char **role_list;
};
#define ACCESSCONTROL__POLICY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&accesscontrol__policy__descriptor) \
    , (char *)protobuf_c_empty_string, 0,NULL, 0,NULL }


/* Accesscontrol__Policy methods */
void   accesscontrol__policy__init
                     (Accesscontrol__Policy         *message);
size_t accesscontrol__policy__get_packed_size
                     (const Accesscontrol__Policy   *message);
size_t accesscontrol__policy__pack
                     (const Accesscontrol__Policy   *message,
                      uint8_t             *out);
size_t accesscontrol__policy__pack_to_buffer
                     (const Accesscontrol__Policy   *message,
                      ProtobufCBuffer     *buffer);
Accesscontrol__Policy *
       accesscontrol__policy__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   accesscontrol__policy__free_unpacked
                     (Accesscontrol__Policy *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Accesscontrol__Policy_Closure)
                 (const Accesscontrol__Policy *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor accesscontrol__policy__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_accesscontrol_2fpolicy_2eproto__INCLUDED */
