/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: opentelemetry/proto/collector/metrics/v1/metrics_service.proto */

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

#include "opentelemetry/proto/collector/metrics/v1/metrics_service.pb-c.h"
void   opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__init
                     (Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest         *message)
{
  static const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest init_value = OPENTELEMETRY__PROTO__COLLECTOR__METRICS__V1__EXPORT_METRICS_SERVICE_REQUEST__INIT;
  *message = init_value;
}
size_t opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__get_packed_size
                     (const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest *message)
{
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__pack
                     (const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__pack_to_buffer
                     (const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest *
       opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest *)
     protobuf_c_message_unpack (&opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__descriptor,
                                allocator, len, data);
}
void   opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__free_unpacked
                     (Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__init
                     (Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse         *message)
{
  static const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse init_value = OPENTELEMETRY__PROTO__COLLECTOR__METRICS__V1__EXPORT_METRICS_SERVICE_RESPONSE__INIT;
  *message = init_value;
}
size_t opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__get_packed_size
                     (const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse *message)
{
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__pack
                     (const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__pack_to_buffer
                     (const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse *
       opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse *)
     protobuf_c_message_unpack (&opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__descriptor,
                                allocator, len, data);
}
void   opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__free_unpacked
                     (Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__init
                     (Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess         *message)
{
  static const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess init_value = OPENTELEMETRY__PROTO__COLLECTOR__METRICS__V1__EXPORT_METRICS_PARTIAL_SUCCESS__INIT;
  *message = init_value;
}
size_t opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__get_packed_size
                     (const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess *message)
{
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__pack
                     (const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__pack_to_buffer
                     (const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess *
       opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess *)
     protobuf_c_message_unpack (&opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__descriptor,
                                allocator, len, data);
}
void   opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__free_unpacked
                     (Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__field_descriptors[1] =
{
  {
    "resource_metrics",
    1,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest, n_resource_metrics),
    offsetof(Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest, resource_metrics),
    &opentelemetry__proto__metrics__v1__resource_metrics__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__field_indices_by_name[] = {
  0,   /* field[0] = resource_metrics */
};
static const ProtobufCIntRange opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 1 }
};
const ProtobufCMessageDescriptor opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest",
  "ExportMetricsServiceRequest",
  "Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest",
  "opentelemetry.proto.collector.metrics.v1",
  sizeof(Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest),
  1,
  opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__field_descriptors,
  opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__field_indices_by_name,
  1,  opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__number_ranges,
  (ProtobufCMessageInit) opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__field_descriptors[1] =
{
  {
    "partial_success",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse, partial_success),
    &opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__field_indices_by_name[] = {
  0,   /* field[0] = partial_success */
};
static const ProtobufCIntRange opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 1 }
};
const ProtobufCMessageDescriptor opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse",
  "ExportMetricsServiceResponse",
  "Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse",
  "opentelemetry.proto.collector.metrics.v1",
  sizeof(Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse),
  1,
  opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__field_descriptors,
  opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__field_indices_by_name,
  1,  opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__number_ranges,
  (ProtobufCMessageInit) opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__field_descriptors[2] =
{
  {
    "rejected_data_points",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT64,
    0,   /* quantifier_offset */
    offsetof(Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess, rejected_data_points),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "error_message",
    2,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess, error_message),
    NULL,
    &protobuf_c_empty_string,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__field_indices_by_name[] = {
  1,   /* field[1] = error_message */
  0,   /* field[0] = rejected_data_points */
};
static const ProtobufCIntRange opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 2 }
};
const ProtobufCMessageDescriptor opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess",
  "ExportMetricsPartialSuccess",
  "Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess",
  "opentelemetry.proto.collector.metrics.v1",
  sizeof(Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsPartialSuccess),
  2,
  opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__field_descriptors,
  opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__field_indices_by_name,
  1,  opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__number_ranges,
  (ProtobufCMessageInit) opentelemetry__proto__collector__metrics__v1__export_metrics_partial_success__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCMethodDescriptor opentelemetry__proto__collector__metrics__v1__metrics_service__method_descriptors[1] =
{
  { "Export", &opentelemetry__proto__collector__metrics__v1__export_metrics_service_request__descriptor, &opentelemetry__proto__collector__metrics__v1__export_metrics_service_response__descriptor },
};
const unsigned opentelemetry__proto__collector__metrics__v1__metrics_service__method_indices_by_name[] = {
  0         /* Export */
};
const ProtobufCServiceDescriptor opentelemetry__proto__collector__metrics__v1__metrics_service__descriptor =
{
  PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC,
  "opentelemetry.proto.collector.metrics.v1.MetricsService",
  "MetricsService",
  "Opentelemetry__Proto__Collector__Metrics__V1__MetricsService",
  "opentelemetry.proto.collector.metrics.v1",
  1,
  opentelemetry__proto__collector__metrics__v1__metrics_service__method_descriptors,
  opentelemetry__proto__collector__metrics__v1__metrics_service__method_indices_by_name
};
void opentelemetry__proto__collector__metrics__v1__metrics_service__export(ProtobufCService *service,
                                                                           const Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceRequest *input,
                                                                           Opentelemetry__Proto__Collector__Metrics__V1__ExportMetricsServiceResponse_Closure closure,
                                                                           void *closure_data)
{
  assert(service->descriptor == &opentelemetry__proto__collector__metrics__v1__metrics_service__descriptor);
  service->invoke(service, 0, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data);
}
void opentelemetry__proto__collector__metrics__v1__metrics_service__init (Opentelemetry__Proto__Collector__Metrics__V1__MetricsService_Service *service,
                                                                          Opentelemetry__Proto__Collector__Metrics__V1__MetricsService_ServiceDestroy destroy)
{
  protobuf_c_service_generated_init (&service->base,
                                     &opentelemetry__proto__collector__metrics__v1__metrics_service__descriptor,
                                     (ProtobufCServiceDestroy) destroy);
}
