/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: data/google-migration.proto */

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

#include "google-migration.pb-c.h"
void   migration_payload__otp_parameters__init
                     (MigrationPayload__OtpParameters         *message)
{
  static const MigrationPayload__OtpParameters init_value = MIGRATION_PAYLOAD__OTP_PARAMETERS__INIT;
  *message = init_value;
}
void   migration_payload__init
                     (MigrationPayload         *message)
{
  static const MigrationPayload init_value = MIGRATION_PAYLOAD__INIT;
  *message = init_value;
}
size_t migration_payload__get_packed_size
                     (const MigrationPayload *message)
{
  assert(message->base.descriptor == &migration_payload__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t migration_payload__pack
                     (const MigrationPayload *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &migration_payload__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t migration_payload__pack_to_buffer
                     (const MigrationPayload *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &migration_payload__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
MigrationPayload *
       migration_payload__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (MigrationPayload *)
     protobuf_c_message_unpack (&migration_payload__descriptor,
                                allocator, len, data);
}
void   migration_payload__free_unpacked
                     (MigrationPayload *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &migration_payload__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor migration_payload__otp_parameters__field_descriptors[7] =
{
  {
    "secret",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_BYTES,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload__OtpParameters, secret),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "name",
    2,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload__OtpParameters, name),
    NULL,
    &protobuf_c_empty_string,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "issuer",
    3,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload__OtpParameters, issuer),
    NULL,
    &protobuf_c_empty_string,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "algorithm",
    4,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_ENUM,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload__OtpParameters, algorithm),
    &migration_payload__algorithm__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "digits",
    5,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_ENUM,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload__OtpParameters, digits),
    &migration_payload__digit_count__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "type",
    6,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_ENUM,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload__OtpParameters, type),
    &migration_payload__otp_type__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "counter",
    7,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT64,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload__OtpParameters, counter),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned migration_payload__otp_parameters__field_indices_by_name[] = {
  3,   /* field[3] = algorithm */
  6,   /* field[6] = counter */
  4,   /* field[4] = digits */
  2,   /* field[2] = issuer */
  1,   /* field[1] = name */
  0,   /* field[0] = secret */
  5,   /* field[5] = type */
};
static const ProtobufCIntRange migration_payload__otp_parameters__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 7 }
};
const ProtobufCMessageDescriptor migration_payload__otp_parameters__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "MigrationPayload.OtpParameters",
  "OtpParameters",
  "MigrationPayload__OtpParameters",
  "",
  sizeof(MigrationPayload__OtpParameters),
  7,
  migration_payload__otp_parameters__field_descriptors,
  migration_payload__otp_parameters__field_indices_by_name,
  1,  migration_payload__otp_parameters__number_ranges,
  (ProtobufCMessageInit) migration_payload__otp_parameters__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCEnumValue migration_payload__algorithm__enum_values_by_number[5] =
{
  { "ALGORITHM_UNSPECIFIED", "MIGRATION_PAYLOAD__ALGORITHM__ALGORITHM_UNSPECIFIED", 0 },
  { "ALGORITHM_SHA1", "MIGRATION_PAYLOAD__ALGORITHM__ALGORITHM_SHA1", 1 },
  { "ALGORITHM_SHA256", "MIGRATION_PAYLOAD__ALGORITHM__ALGORITHM_SHA256", 2 },
  { "ALGORITHM_SHA512", "MIGRATION_PAYLOAD__ALGORITHM__ALGORITHM_SHA512", 3 },
  { "ALGORITHM_MD5", "MIGRATION_PAYLOAD__ALGORITHM__ALGORITHM_MD5", 4 },
};
static const ProtobufCIntRange migration_payload__algorithm__value_ranges[] = {
{0, 0},{0, 5}
};
static const ProtobufCEnumValueIndex migration_payload__algorithm__enum_values_by_name[5] =
{
  { "ALGORITHM_MD5", 4 },
  { "ALGORITHM_SHA1", 1 },
  { "ALGORITHM_SHA256", 2 },
  { "ALGORITHM_SHA512", 3 },
  { "ALGORITHM_UNSPECIFIED", 0 },
};
const ProtobufCEnumDescriptor migration_payload__algorithm__descriptor =
{
  PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
  "MigrationPayload.Algorithm",
  "Algorithm",
  "MigrationPayload__Algorithm",
  "",
  5,
  migration_payload__algorithm__enum_values_by_number,
  5,
  migration_payload__algorithm__enum_values_by_name,
  1,
  migration_payload__algorithm__value_ranges,
  NULL,NULL,NULL,NULL   /* reserved[1234] */
};
static const ProtobufCEnumValue migration_payload__digit_count__enum_values_by_number[3] =
{
  { "DIGIT_COUNT_UNSPECIFIED", "MIGRATION_PAYLOAD__DIGIT_COUNT__DIGIT_COUNT_UNSPECIFIED", 0 },
  { "DIGIT_COUNT_SIX", "MIGRATION_PAYLOAD__DIGIT_COUNT__DIGIT_COUNT_SIX", 1 },
  { "DIGIT_COUNT_EIGHT", "MIGRATION_PAYLOAD__DIGIT_COUNT__DIGIT_COUNT_EIGHT", 2 },
};
static const ProtobufCIntRange migration_payload__digit_count__value_ranges[] = {
{0, 0},{0, 3}
};
static const ProtobufCEnumValueIndex migration_payload__digit_count__enum_values_by_name[3] =
{
  { "DIGIT_COUNT_EIGHT", 2 },
  { "DIGIT_COUNT_SIX", 1 },
  { "DIGIT_COUNT_UNSPECIFIED", 0 },
};
const ProtobufCEnumDescriptor migration_payload__digit_count__descriptor =
{
  PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
  "MigrationPayload.DigitCount",
  "DigitCount",
  "MigrationPayload__DigitCount",
  "",
  3,
  migration_payload__digit_count__enum_values_by_number,
  3,
  migration_payload__digit_count__enum_values_by_name,
  1,
  migration_payload__digit_count__value_ranges,
  NULL,NULL,NULL,NULL   /* reserved[1234] */
};
static const ProtobufCEnumValue migration_payload__otp_type__enum_values_by_number[3] =
{
  { "OTP_TYPE_UNSPECIFIED", "MIGRATION_PAYLOAD__OTP_TYPE__OTP_TYPE_UNSPECIFIED", 0 },
  { "OTP_TYPE_HOTP", "MIGRATION_PAYLOAD__OTP_TYPE__OTP_TYPE_HOTP", 1 },
  { "OTP_TYPE_TOTP", "MIGRATION_PAYLOAD__OTP_TYPE__OTP_TYPE_TOTP", 2 },
};
static const ProtobufCIntRange migration_payload__otp_type__value_ranges[] = {
{0, 0},{0, 3}
};
static const ProtobufCEnumValueIndex migration_payload__otp_type__enum_values_by_name[3] =
{
  { "OTP_TYPE_HOTP", 1 },
  { "OTP_TYPE_TOTP", 2 },
  { "OTP_TYPE_UNSPECIFIED", 0 },
};
const ProtobufCEnumDescriptor migration_payload__otp_type__descriptor =
{
  PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
  "MigrationPayload.OtpType",
  "OtpType",
  "MigrationPayload__OtpType",
  "",
  3,
  migration_payload__otp_type__enum_values_by_number,
  3,
  migration_payload__otp_type__enum_values_by_name,
  1,
  migration_payload__otp_type__value_ranges,
  NULL,NULL,NULL,NULL   /* reserved[1234] */
};
static const ProtobufCFieldDescriptor migration_payload__field_descriptors[5] =
{
  {
    "otp_parameters",
    1,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(MigrationPayload, n_otp_parameters),
    offsetof(MigrationPayload, otp_parameters),
    &migration_payload__otp_parameters__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "version",
    2,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT32,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload, version),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "batch_size",
    3,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT32,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload, batch_size),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "batch_index",
    4,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT32,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload, batch_index),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "batch_id",
    5,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT32,
    0,   /* quantifier_offset */
    offsetof(MigrationPayload, batch_id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned migration_payload__field_indices_by_name[] = {
  4,   /* field[4] = batch_id */
  3,   /* field[3] = batch_index */
  2,   /* field[2] = batch_size */
  0,   /* field[0] = otp_parameters */
  1,   /* field[1] = version */
};
static const ProtobufCIntRange migration_payload__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 5 }
};
const ProtobufCMessageDescriptor migration_payload__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "MigrationPayload",
  "MigrationPayload",
  "MigrationPayload",
  "",
  sizeof(MigrationPayload),
  5,
  migration_payload__field_descriptors,
  migration_payload__field_indices_by_name,
  1,  migration_payload__number_ranges,
  (ProtobufCMessageInit) migration_payload__init,
  NULL,NULL,NULL    /* reserved[123] */
};
