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

/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif

#include "policy.pb-c.h"
void   accesscontrol__policy__init
                     (Accesscontrol__Policy         *message)
{
  static const Accesscontrol__Policy init_value = ACCESSCONTROL__POLICY__INIT;
  *message = init_value;
}
size_t accesscontrol__policy__get_packed_size
                     (const Accesscontrol__Policy *message)
{
  assert(message->base.descriptor == &accesscontrol__policy__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t accesscontrol__policy__pack
                     (const Accesscontrol__Policy *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &accesscontrol__policy__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t accesscontrol__policy__pack_to_buffer
                     (const Accesscontrol__Policy *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &accesscontrol__policy__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Accesscontrol__Policy *
       accesscontrol__policy__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Accesscontrol__Policy *)
     protobuf_c_message_unpack (&accesscontrol__policy__descriptor,
                                allocator, len, data);
}
void   accesscontrol__policy__free_unpacked
                     (Accesscontrol__Policy *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &accesscontrol__policy__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor accesscontrol__policy__field_descriptors[3] =
{
  {
    "rule",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Accesscontrol__Policy, rule),
    NULL,
    &protobuf_c_empty_string,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "org_list",
    2,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_STRING,
    offsetof(Accesscontrol__Policy, n_org_list),
    offsetof(Accesscontrol__Policy, org_list),
    NULL,
    &protobuf_c_empty_string,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "role_list",
    3,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_STRING,
    offsetof(Accesscontrol__Policy, n_role_list),
    offsetof(Accesscontrol__Policy, role_list),
    NULL,
    &protobuf_c_empty_string,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned accesscontrol__policy__field_indices_by_name[] = {
  1,   /* field[1] = org_list */
  2,   /* field[2] = role_list */
  0,   /* field[0] = rule */
};
static const ProtobufCIntRange accesscontrol__policy__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 3 }
};
const ProtobufCMessageDescriptor accesscontrol__policy__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "accesscontrol.Policy",
  "Policy",
  "Accesscontrol__Policy",
  "accesscontrol",
  sizeof(Accesscontrol__Policy),
  3,
  accesscontrol__policy__field_descriptors,
  accesscontrol__policy__field_indices_by_name,
  1,  accesscontrol__policy__number_ranges,
  (ProtobufCMessageInit) accesscontrol__policy__init,
  NULL,NULL,NULL    /* reserved[123] */
};
