Author: Paolo Lulli <paolo@lulli.net>
Generate connectors from protobuf
%!v(PANIC=String method: strings: negative Repeat count)
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..f94561f54e0905ce030133fa55d24a3d229ee34b --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +all: rust java python ruby php csharp cpp kotlin objc c go +#.PHONY rust + +rust: yats-grpc.proto + protoc --rust_out ./yats-connector-rust yats-grpc.proto + +java: yats-grpc.proto + protoc --java_out ./yats-connector-java/src/main/java yats-grpc.proto + +python: yats-grpc.proto + protoc --python_out ./yats-connector-python yats-grpc.proto + +ruby: yats-grpc.proto + protoc --ruby_out ./yats-connector-ruby yats-grpc.proto + +php: yats-grpc.proto + protoc --php_out ./yats-connector-php yats-grpc.proto + +csharp: yats-grpc.proto + protoc --csharp_out ./yats-connector-csharp yats-grpc.proto + +cpp: yats-grpc.proto + protoc --cpp_out ./yats-connector-cpp yats-grpc.proto + +kotlin: yats-grpc.proto + protoc --kotlin_out ./yats-connector-kotlin yats-grpc.proto + +objc: yats-grpc.proto + protoc --objc_out ./yats-connector-objc yats-grpc.proto + +c: yats-grpc.proto + protoc --c_out ./yats-connector-c yats-grpc.proto + +go: yats-grpc.proto + protoc --go_out ./yats-connector-go yats-grpc.proto diff --git a/make-server-lib.sh b/make-server-lib.sh new file mode 100755 index 0000000000000000000000000000000000000000..69f443df498445f9ac0f682d38270c203c8f31f3 --- /dev/null +++ b/make-server-lib.sh @@ -0,0 +1,16 @@ +#! /bin/bash -x + +cd $(dirname $0) + +YATS_SERVER_SOURCES=../yats/server +SOURCES="yats-grpc.proto" + +TARGET_DIR="${YATS_SERVER_SOURCES}/proto/" + +for s in ${SOURCES}; do + protoc --go_out=${TARGET_DIR}\ + --go_opt=paths=source_relative\ + --go-grpc_out=${TARGET_DIR}\ + --go-grpc_opt=paths=source_relative\ + ${s} +done diff --git a/yats-connector-c/yats-grpc.pb-c.c b/yats-connector-c/yats-grpc.pb-c.c new file mode 100644 index 0000000000000000000000000000000000000000..94efae35089bdbe6b7326da70b193ef16249b787 --- /dev/null +++ b/yats-connector-c/yats-grpc.pb-c.c @@ -0,0 +1,615 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: yats-grpc.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "yats-grpc.pb-c.h" +void yats__metric__init + (Yats__Metric *message) +{ + static const Yats__Metric init_value = YATS__METRIC__INIT; + *message = init_value; +} +size_t yats__metric__get_packed_size + (const Yats__Metric *message) +{ + assert(message->base.descriptor == &yats__metric__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t yats__metric__pack + (const Yats__Metric *message, + uint8_t *out) +{ + assert(message->base.descriptor == &yats__metric__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t yats__metric__pack_to_buffer + (const Yats__Metric *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &yats__metric__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Yats__Metric * + yats__metric__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Yats__Metric *) + protobuf_c_message_unpack (&yats__metric__descriptor, + allocator, len, data); +} +void yats__metric__free_unpacked + (Yats__Metric *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &yats__metric__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void yats__event__init + (Yats__Event *message) +{ + static const Yats__Event init_value = YATS__EVENT__INIT; + *message = init_value; +} +size_t yats__event__get_packed_size + (const Yats__Event *message) +{ + assert(message->base.descriptor == &yats__event__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t yats__event__pack + (const Yats__Event *message, + uint8_t *out) +{ + assert(message->base.descriptor == &yats__event__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t yats__event__pack_to_buffer + (const Yats__Event *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &yats__event__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Yats__Event * + yats__event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Yats__Event *) + protobuf_c_message_unpack (&yats__event__descriptor, + allocator, len, data); +} +void yats__event__free_unpacked + (Yats__Event *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &yats__event__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void yats__create_metric_request__init + (Yats__CreateMetricRequest *message) +{ + static const Yats__CreateMetricRequest init_value = YATS__CREATE_METRIC_REQUEST__INIT; + *message = init_value; +} +size_t yats__create_metric_request__get_packed_size + (const Yats__CreateMetricRequest *message) +{ + assert(message->base.descriptor == &yats__create_metric_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t yats__create_metric_request__pack + (const Yats__CreateMetricRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &yats__create_metric_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t yats__create_metric_request__pack_to_buffer + (const Yats__CreateMetricRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &yats__create_metric_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Yats__CreateMetricRequest * + yats__create_metric_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Yats__CreateMetricRequest *) + protobuf_c_message_unpack (&yats__create_metric_request__descriptor, + allocator, len, data); +} +void yats__create_metric_request__free_unpacked + (Yats__CreateMetricRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &yats__create_metric_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void yats__create_metric_response__init + (Yats__CreateMetricResponse *message) +{ + static const Yats__CreateMetricResponse init_value = YATS__CREATE_METRIC_RESPONSE__INIT; + *message = init_value; +} +size_t yats__create_metric_response__get_packed_size + (const Yats__CreateMetricResponse *message) +{ + assert(message->base.descriptor == &yats__create_metric_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t yats__create_metric_response__pack + (const Yats__CreateMetricResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &yats__create_metric_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t yats__create_metric_response__pack_to_buffer + (const Yats__CreateMetricResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &yats__create_metric_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Yats__CreateMetricResponse * + yats__create_metric_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Yats__CreateMetricResponse *) + protobuf_c_message_unpack (&yats__create_metric_response__descriptor, + allocator, len, data); +} +void yats__create_metric_response__free_unpacked + (Yats__CreateMetricResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &yats__create_metric_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void yats__create_event_request__init + (Yats__CreateEventRequest *message) +{ + static const Yats__CreateEventRequest init_value = YATS__CREATE_EVENT_REQUEST__INIT; + *message = init_value; +} +size_t yats__create_event_request__get_packed_size + (const Yats__CreateEventRequest *message) +{ + assert(message->base.descriptor == &yats__create_event_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t yats__create_event_request__pack + (const Yats__CreateEventRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &yats__create_event_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t yats__create_event_request__pack_to_buffer + (const Yats__CreateEventRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &yats__create_event_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Yats__CreateEventRequest * + yats__create_event_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Yats__CreateEventRequest *) + protobuf_c_message_unpack (&yats__create_event_request__descriptor, + allocator, len, data); +} +void yats__create_event_request__free_unpacked + (Yats__CreateEventRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &yats__create_event_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void yats__create_event_response__init + (Yats__CreateEventResponse *message) +{ + static const Yats__CreateEventResponse init_value = YATS__CREATE_EVENT_RESPONSE__INIT; + *message = init_value; +} +size_t yats__create_event_response__get_packed_size + (const Yats__CreateEventResponse *message) +{ + assert(message->base.descriptor == &yats__create_event_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t yats__create_event_response__pack + (const Yats__CreateEventResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &yats__create_event_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t yats__create_event_response__pack_to_buffer + (const Yats__CreateEventResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &yats__create_event_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Yats__CreateEventResponse * + yats__create_event_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Yats__CreateEventResponse *) + protobuf_c_message_unpack (&yats__create_event_response__descriptor, + allocator, len, data); +} +void yats__create_event_response__free_unpacked + (Yats__CreateEventResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &yats__create_event_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor yats__metric__field_descriptors[4] = +{ + { + "id_client", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Yats__Metric, id_client), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "mtime", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(Yats__Metric, mtime), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "name", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Yats__Metric, name), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "value", + 4, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Yats__Metric, value), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned yats__metric__field_indices_by_name[] = { + 0, /* field[0] = id_client */ + 1, /* field[1] = mtime */ + 2, /* field[2] = name */ + 3, /* field[3] = value */ +}; +static const ProtobufCIntRange yats__metric__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor yats__metric__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "yats.Metric", + "Metric", + "Yats__Metric", + "yats", + sizeof(Yats__Metric), + 4, + yats__metric__field_descriptors, + yats__metric__field_indices_by_name, + 1, yats__metric__number_ranges, + (ProtobufCMessageInit) yats__metric__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor yats__event__field_descriptors[3] = +{ + { + "id_client", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Yats__Event, id_client), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "etime", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(Yats__Event, etime), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "name", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Yats__Event, name), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned yats__event__field_indices_by_name[] = { + 1, /* field[1] = etime */ + 0, /* field[0] = id_client */ + 2, /* field[2] = name */ +}; +static const ProtobufCIntRange yats__event__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor yats__event__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "yats.Event", + "Event", + "Yats__Event", + "yats", + sizeof(Yats__Event), + 3, + yats__event__field_descriptors, + yats__event__field_indices_by_name, + 1, yats__event__number_ranges, + (ProtobufCMessageInit) yats__event__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor yats__create_metric_request__field_descriptors[1] = +{ + { + "metric", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(Yats__CreateMetricRequest, metric), + &yats__metric__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned yats__create_metric_request__field_indices_by_name[] = { + 0, /* field[0] = metric */ +}; +static const ProtobufCIntRange yats__create_metric_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor yats__create_metric_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "yats.CreateMetricRequest", + "CreateMetricRequest", + "Yats__CreateMetricRequest", + "yats", + sizeof(Yats__CreateMetricRequest), + 1, + yats__create_metric_request__field_descriptors, + yats__create_metric_request__field_indices_by_name, + 1, yats__create_metric_request__number_ranges, + (ProtobufCMessageInit) yats__create_metric_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor yats__create_metric_response__field_descriptors[1] = +{ + { + "metric", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(Yats__CreateMetricResponse, metric), + &yats__metric__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned yats__create_metric_response__field_indices_by_name[] = { + 0, /* field[0] = metric */ +}; +static const ProtobufCIntRange yats__create_metric_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor yats__create_metric_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "yats.CreateMetricResponse", + "CreateMetricResponse", + "Yats__CreateMetricResponse", + "yats", + sizeof(Yats__CreateMetricResponse), + 1, + yats__create_metric_response__field_descriptors, + yats__create_metric_response__field_indices_by_name, + 1, yats__create_metric_response__number_ranges, + (ProtobufCMessageInit) yats__create_metric_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor yats__create_event_request__field_descriptors[1] = +{ + { + "event", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(Yats__CreateEventRequest, event), + &yats__event__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned yats__create_event_request__field_indices_by_name[] = { + 0, /* field[0] = event */ +}; +static const ProtobufCIntRange yats__create_event_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor yats__create_event_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "yats.CreateEventRequest", + "CreateEventRequest", + "Yats__CreateEventRequest", + "yats", + sizeof(Yats__CreateEventRequest), + 1, + yats__create_event_request__field_descriptors, + yats__create_event_request__field_indices_by_name, + 1, yats__create_event_request__number_ranges, + (ProtobufCMessageInit) yats__create_event_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor yats__create_event_response__field_descriptors[1] = +{ + { + "event", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(Yats__CreateEventResponse, event), + &yats__event__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned yats__create_event_response__field_indices_by_name[] = { + 0, /* field[0] = event */ +}; +static const ProtobufCIntRange yats__create_event_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor yats__create_event_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "yats.CreateEventResponse", + "CreateEventResponse", + "Yats__CreateEventResponse", + "yats", + sizeof(Yats__CreateEventResponse), + 1, + yats__create_event_response__field_descriptors, + yats__create_event_response__field_indices_by_name, + 1, yats__create_event_response__number_ranges, + (ProtobufCMessageInit) yats__create_event_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCMethodDescriptor yats__yats_grpc_service__method_descriptors[2] = +{ + { "CreateMetric", &yats__create_metric_request__descriptor, &yats__create_metric_response__descriptor }, + { "CreateEvent", &yats__create_event_request__descriptor, &yats__create_event_response__descriptor }, +}; +const unsigned yats__yats_grpc_service__method_indices_by_name[] = { + 1, /* CreateEvent */ + 0 /* CreateMetric */ +}; +const ProtobufCServiceDescriptor yats__yats_grpc_service__descriptor = +{ + PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC, + "yats.YatsGrpcService", + "YatsGrpcService", + "Yats__YatsGrpcService", + "yats", + 2, + yats__yats_grpc_service__method_descriptors, + yats__yats_grpc_service__method_indices_by_name +}; +void yats__yats_grpc_service__create_metric(ProtobufCService *service, + const Yats__CreateMetricRequest *input, + Yats__CreateMetricResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &yats__yats_grpc_service__descriptor); + service->invoke(service, 0, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void yats__yats_grpc_service__create_event(ProtobufCService *service, + const Yats__CreateEventRequest *input, + Yats__CreateEventResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &yats__yats_grpc_service__descriptor); + service->invoke(service, 1, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void yats__yats_grpc_service__init (Yats__YatsGrpcService_Service *service, + Yats__YatsGrpcService_ServiceDestroy destroy) +{ + protobuf_c_service_generated_init (&service->base, + &yats__yats_grpc_service__descriptor, + (ProtobufCServiceDestroy) destroy); +} diff --git a/yats-connector-c/yats-grpc.pb-c.h b/yats-connector-c/yats-grpc.pb-c.h new file mode 100644 index 0000000000000000000000000000000000000000..98a00aa5dca908ba590e9d3a9546e5524eb7bce5 --- /dev/null +++ b/yats-connector-c/yats-grpc.pb-c.h @@ -0,0 +1,277 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: yats-grpc.proto */ + +#ifndef PROTOBUF_C_yats_2dgrpc_2eproto__INCLUDED +#define PROTOBUF_C_yats_2dgrpc_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 1004001 < 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 Yats__Metric Yats__Metric; +typedef struct Yats__Event Yats__Event; +typedef struct Yats__CreateMetricRequest Yats__CreateMetricRequest; +typedef struct Yats__CreateMetricResponse Yats__CreateMetricResponse; +typedef struct Yats__CreateEventRequest Yats__CreateEventRequest; +typedef struct Yats__CreateEventResponse Yats__CreateEventResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct Yats__Metric +{ + ProtobufCMessage base; + char *id_client; + int64_t mtime; + char *name; + char *value; +}; +#define YATS__METRIC__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&yats__metric__descriptor) \ + , (char *)protobuf_c_empty_string, 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string } + + +struct Yats__Event +{ + ProtobufCMessage base; + char *id_client; + int64_t etime; + char *name; +}; +#define YATS__EVENT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&yats__event__descriptor) \ + , (char *)protobuf_c_empty_string, 0, (char *)protobuf_c_empty_string } + + +struct Yats__CreateMetricRequest +{ + ProtobufCMessage base; + Yats__Metric *metric; +}; +#define YATS__CREATE_METRIC_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&yats__create_metric_request__descriptor) \ + , NULL } + + +struct Yats__CreateMetricResponse +{ + ProtobufCMessage base; + Yats__Metric *metric; +}; +#define YATS__CREATE_METRIC_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&yats__create_metric_response__descriptor) \ + , NULL } + + +struct Yats__CreateEventRequest +{ + ProtobufCMessage base; + Yats__Event *event; +}; +#define YATS__CREATE_EVENT_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&yats__create_event_request__descriptor) \ + , NULL } + + +struct Yats__CreateEventResponse +{ + ProtobufCMessage base; + Yats__Event *event; +}; +#define YATS__CREATE_EVENT_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&yats__create_event_response__descriptor) \ + , NULL } + + +/* Yats__Metric methods */ +void yats__metric__init + (Yats__Metric *message); +size_t yats__metric__get_packed_size + (const Yats__Metric *message); +size_t yats__metric__pack + (const Yats__Metric *message, + uint8_t *out); +size_t yats__metric__pack_to_buffer + (const Yats__Metric *message, + ProtobufCBuffer *buffer); +Yats__Metric * + yats__metric__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void yats__metric__free_unpacked + (Yats__Metric *message, + ProtobufCAllocator *allocator); +/* Yats__Event methods */ +void yats__event__init + (Yats__Event *message); +size_t yats__event__get_packed_size + (const Yats__Event *message); +size_t yats__event__pack + (const Yats__Event *message, + uint8_t *out); +size_t yats__event__pack_to_buffer + (const Yats__Event *message, + ProtobufCBuffer *buffer); +Yats__Event * + yats__event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void yats__event__free_unpacked + (Yats__Event *message, + ProtobufCAllocator *allocator); +/* Yats__CreateMetricRequest methods */ +void yats__create_metric_request__init + (Yats__CreateMetricRequest *message); +size_t yats__create_metric_request__get_packed_size + (const Yats__CreateMetricRequest *message); +size_t yats__create_metric_request__pack + (const Yats__CreateMetricRequest *message, + uint8_t *out); +size_t yats__create_metric_request__pack_to_buffer + (const Yats__CreateMetricRequest *message, + ProtobufCBuffer *buffer); +Yats__CreateMetricRequest * + yats__create_metric_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void yats__create_metric_request__free_unpacked + (Yats__CreateMetricRequest *message, + ProtobufCAllocator *allocator); +/* Yats__CreateMetricResponse methods */ +void yats__create_metric_response__init + (Yats__CreateMetricResponse *message); +size_t yats__create_metric_response__get_packed_size + (const Yats__CreateMetricResponse *message); +size_t yats__create_metric_response__pack + (const Yats__CreateMetricResponse *message, + uint8_t *out); +size_t yats__create_metric_response__pack_to_buffer + (const Yats__CreateMetricResponse *message, + ProtobufCBuffer *buffer); +Yats__CreateMetricResponse * + yats__create_metric_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void yats__create_metric_response__free_unpacked + (Yats__CreateMetricResponse *message, + ProtobufCAllocator *allocator); +/* Yats__CreateEventRequest methods */ +void yats__create_event_request__init + (Yats__CreateEventRequest *message); +size_t yats__create_event_request__get_packed_size + (const Yats__CreateEventRequest *message); +size_t yats__create_event_request__pack + (const Yats__CreateEventRequest *message, + uint8_t *out); +size_t yats__create_event_request__pack_to_buffer + (const Yats__CreateEventRequest *message, + ProtobufCBuffer *buffer); +Yats__CreateEventRequest * + yats__create_event_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void yats__create_event_request__free_unpacked + (Yats__CreateEventRequest *message, + ProtobufCAllocator *allocator); +/* Yats__CreateEventResponse methods */ +void yats__create_event_response__init + (Yats__CreateEventResponse *message); +size_t yats__create_event_response__get_packed_size + (const Yats__CreateEventResponse *message); +size_t yats__create_event_response__pack + (const Yats__CreateEventResponse *message, + uint8_t *out); +size_t yats__create_event_response__pack_to_buffer + (const Yats__CreateEventResponse *message, + ProtobufCBuffer *buffer); +Yats__CreateEventResponse * + yats__create_event_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void yats__create_event_response__free_unpacked + (Yats__CreateEventResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*Yats__Metric_Closure) + (const Yats__Metric *message, + void *closure_data); +typedef void (*Yats__Event_Closure) + (const Yats__Event *message, + void *closure_data); +typedef void (*Yats__CreateMetricRequest_Closure) + (const Yats__CreateMetricRequest *message, + void *closure_data); +typedef void (*Yats__CreateMetricResponse_Closure) + (const Yats__CreateMetricResponse *message, + void *closure_data); +typedef void (*Yats__CreateEventRequest_Closure) + (const Yats__CreateEventRequest *message, + void *closure_data); +typedef void (*Yats__CreateEventResponse_Closure) + (const Yats__CreateEventResponse *message, + void *closure_data); + +/* --- services --- */ + +typedef struct Yats__YatsGrpcService_Service Yats__YatsGrpcService_Service; +struct Yats__YatsGrpcService_Service +{ + ProtobufCService base; + void (*create_metric)(Yats__YatsGrpcService_Service *service, + const Yats__CreateMetricRequest *input, + Yats__CreateMetricResponse_Closure closure, + void *closure_data); + void (*create_event)(Yats__YatsGrpcService_Service *service, + const Yats__CreateEventRequest *input, + Yats__CreateEventResponse_Closure closure, + void *closure_data); +}; +typedef void (*Yats__YatsGrpcService_ServiceDestroy)(Yats__YatsGrpcService_Service *); +void yats__yats_grpc_service__init (Yats__YatsGrpcService_Service *service, + Yats__YatsGrpcService_ServiceDestroy destroy); +#define YATS__YATS_GRPC_SERVICE__BASE_INIT \ + { &yats__yats_grpc_service__descriptor, protobuf_c_service_invoke_internal, NULL } +#define YATS__YATS_GRPC_SERVICE__INIT(function_prefix__) \ + { YATS__YATS_GRPC_SERVICE__BASE_INIT,\ + function_prefix__ ## create_metric,\ + function_prefix__ ## create_event } +void yats__yats_grpc_service__create_metric(ProtobufCService *service, + const Yats__CreateMetricRequest *input, + Yats__CreateMetricResponse_Closure closure, + void *closure_data); +void yats__yats_grpc_service__create_event(ProtobufCService *service, + const Yats__CreateEventRequest *input, + Yats__CreateEventResponse_Closure closure, + void *closure_data); + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor yats__metric__descriptor; +extern const ProtobufCMessageDescriptor yats__event__descriptor; +extern const ProtobufCMessageDescriptor yats__create_metric_request__descriptor; +extern const ProtobufCMessageDescriptor yats__create_metric_response__descriptor; +extern const ProtobufCMessageDescriptor yats__create_event_request__descriptor; +extern const ProtobufCMessageDescriptor yats__create_event_response__descriptor; +extern const ProtobufCServiceDescriptor yats__yats_grpc_service__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_yats_2dgrpc_2eproto__INCLUDED */ diff --git a/yats-connector-cpp/yats-grpc.pb.cc b/yats-connector-cpp/yats-grpc.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..a84880a7c64494588faae8eaa3246ff16e86eae8 --- /dev/null +++ b/yats-connector-cpp/yats-grpc.pb.cc @@ -0,0 +1,1625 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +#include "yats-grpc.pb.h" + +#include <algorithm> + +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/wire_format_lite.h> +#include <google/protobuf/descriptor.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/reflection_ops.h> +#include <google/protobuf/wire_format.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace yats { +PROTOBUF_CONSTEXPR Metric::Metric( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.id_client_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.mtime_)*/int64_t{0} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct MetricDefaultTypeInternal { + PROTOBUF_CONSTEXPR MetricDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~MetricDefaultTypeInternal() {} + union { + Metric _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetricDefaultTypeInternal _Metric_default_instance_; +PROTOBUF_CONSTEXPR Event::Event( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.id_client_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.etime_)*/int64_t{0} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct EventDefaultTypeInternal { + PROTOBUF_CONSTEXPR EventDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EventDefaultTypeInternal() {} + union { + Event _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EventDefaultTypeInternal _Event_default_instance_; +PROTOBUF_CONSTEXPR CreateMetricRequest::CreateMetricRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.metric_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CreateMetricRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateMetricRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateMetricRequestDefaultTypeInternal() {} + union { + CreateMetricRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateMetricRequestDefaultTypeInternal _CreateMetricRequest_default_instance_; +PROTOBUF_CONSTEXPR CreateMetricResponse::CreateMetricResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.metric_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CreateMetricResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateMetricResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateMetricResponseDefaultTypeInternal() {} + union { + CreateMetricResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateMetricResponseDefaultTypeInternal _CreateMetricResponse_default_instance_; +PROTOBUF_CONSTEXPR CreateEventRequest::CreateEventRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.event_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CreateEventRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateEventRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateEventRequestDefaultTypeInternal() {} + union { + CreateEventRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateEventRequestDefaultTypeInternal _CreateEventRequest_default_instance_; +PROTOBUF_CONSTEXPR CreateEventResponse::CreateEventResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.event_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CreateEventResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateEventResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateEventResponseDefaultTypeInternal() {} + union { + CreateEventResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateEventResponseDefaultTypeInternal _CreateEventResponse_default_instance_; +} // namespace yats +static ::_pb::Metadata file_level_metadata_yats_2dgrpc_2eproto[6]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_yats_2dgrpc_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_yats_2dgrpc_2eproto = nullptr; + +const uint32_t TableStruct_yats_2dgrpc_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::yats::Metric, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::yats::Metric, _impl_.id_client_), + PROTOBUF_FIELD_OFFSET(::yats::Metric, _impl_.mtime_), + PROTOBUF_FIELD_OFFSET(::yats::Metric, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::yats::Metric, _impl_.value_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::yats::Event, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::yats::Event, _impl_.id_client_), + PROTOBUF_FIELD_OFFSET(::yats::Event, _impl_.etime_), + PROTOBUF_FIELD_OFFSET(::yats::Event, _impl_.name_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::yats::CreateMetricRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::yats::CreateMetricRequest, _impl_.metric_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::yats::CreateMetricResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::yats::CreateMetricResponse, _impl_.metric_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::yats::CreateEventRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::yats::CreateEventRequest, _impl_.event_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::yats::CreateEventResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::yats::CreateEventResponse, _impl_.event_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::yats::Metric)}, + { 10, -1, -1, sizeof(::yats::Event)}, + { 19, -1, -1, sizeof(::yats::CreateMetricRequest)}, + { 26, -1, -1, sizeof(::yats::CreateMetricResponse)}, + { 33, -1, -1, sizeof(::yats::CreateEventRequest)}, + { 40, -1, -1, sizeof(::yats::CreateEventResponse)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::yats::_Metric_default_instance_._instance, + &::yats::_Event_default_instance_._instance, + &::yats::_CreateMetricRequest_default_instance_._instance, + &::yats::_CreateMetricResponse_default_instance_._instance, + &::yats::_CreateEventRequest_default_instance_._instance, + &::yats::_CreateEventResponse_default_instance_._instance, +}; + +const char descriptor_table_protodef_yats_2dgrpc_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\017yats-grpc.proto\022\004yats\"G\n\006Metric\022\021\n\tid_" + "client\030\001 \001(\t\022\r\n\005mtime\030\002 \001(\003\022\014\n\004name\030\003 \001(" + "\t\022\r\n\005value\030\004 \001(\t\"7\n\005Event\022\021\n\tid_client\030\001" + " \001(\t\022\r\n\005etime\030\002 \001(\003\022\014\n\004name\030\003 \001(\t\"3\n\023Cre" + "ateMetricRequest\022\034\n\006metric\030\001 \001(\0132\014.yats." + "Metric\"4\n\024CreateMetricResponse\022\034\n\006metric" + "\030\001 \001(\0132\014.yats.Metric\"0\n\022CreateEventReque" + "st\022\032\n\005event\030\001 \001(\0132\013.yats.Event\"1\n\023Create" + "EventResponse\022\032\n\005event\030\001 \001(\0132\013.yats.Even" + "t2\234\001\n\017YatsGrpcService\022E\n\014CreateMetric\022\031." + "yats.CreateMetricRequest\032\032.yats.CreateMe" + "tricResponse\022B\n\013CreateEvent\022\030.yats.Creat" + "eEventRequest\032\031.yats.CreateEventResponse" + "B\'\n\027com.kevwe.yats.protobufP\001Z\nyats/prot" + "ob\006proto3" + ; +static ::_pbi::once_flag descriptor_table_yats_2dgrpc_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_yats_2dgrpc_2eproto = { + false, false, 569, descriptor_table_protodef_yats_2dgrpc_2eproto, + "yats-grpc.proto", + &descriptor_table_yats_2dgrpc_2eproto_once, nullptr, 0, 6, + schemas, file_default_instances, TableStruct_yats_2dgrpc_2eproto::offsets, + file_level_metadata_yats_2dgrpc_2eproto, file_level_enum_descriptors_yats_2dgrpc_2eproto, + file_level_service_descriptors_yats_2dgrpc_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_yats_2dgrpc_2eproto_getter() { + return &descriptor_table_yats_2dgrpc_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_yats_2dgrpc_2eproto(&descriptor_table_yats_2dgrpc_2eproto); +namespace yats { + +// =================================================================== + +class Metric::_Internal { + public: +}; + +Metric::Metric(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:yats.Metric) +} +Metric::Metric(const Metric& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Metric* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.id_client_){} + , decltype(_impl_.name_){} + , decltype(_impl_.value_){} + , decltype(_impl_.mtime_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.id_client_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.id_client_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_id_client().empty()) { + _this->_impl_.id_client_.Set(from._internal_id_client(), + _this->GetArenaForAllocation()); + } + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _impl_.value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_value().empty()) { + _this->_impl_.value_.Set(from._internal_value(), + _this->GetArenaForAllocation()); + } + _this->_impl_.mtime_ = from._impl_.mtime_; + // @@protoc_insertion_point(copy_constructor:yats.Metric) +} + +inline void Metric::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.id_client_){} + , decltype(_impl_.name_){} + , decltype(_impl_.value_){} + , decltype(_impl_.mtime_){int64_t{0}} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.id_client_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.id_client_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Metric::~Metric() { + // @@protoc_insertion_point(destructor:yats.Metric) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Metric::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.id_client_.Destroy(); + _impl_.name_.Destroy(); + _impl_.value_.Destroy(); +} + +void Metric::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Metric::Clear() { +// @@protoc_insertion_point(message_clear_start:yats.Metric) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.id_client_.ClearToEmpty(); + _impl_.name_.ClearToEmpty(); + _impl_.value_.ClearToEmpty(); + _impl_.mtime_ = int64_t{0}; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Metric::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string id_client = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_id_client(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "yats.Metric.id_client")); + } else + goto handle_unusual; + continue; + // int64 mtime = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + _impl_.mtime_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string name = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "yats.Metric.name")); + } else + goto handle_unusual; + continue; + // string value = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + auto str = _internal_mutable_value(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "yats.Metric.value")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Metric::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:yats.Metric) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string id_client = 1; + if (!this->_internal_id_client().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_id_client().data(), static_cast<int>(this->_internal_id_client().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "yats.Metric.id_client"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_id_client(), target); + } + + // int64 mtime = 2; + if (this->_internal_mtime() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_mtime(), target); + } + + // string name = 3; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "yats.Metric.name"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_name(), target); + } + + // string value = 4; + if (!this->_internal_value().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_value().data(), static_cast<int>(this->_internal_value().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "yats.Metric.value"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_value(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:yats.Metric) + return target; +} + +size_t Metric::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:yats.Metric) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string id_client = 1; + if (!this->_internal_id_client().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_id_client()); + } + + // string name = 3; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // string value = 4; + if (!this->_internal_value().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_value()); + } + + // int64 mtime = 2; + if (this->_internal_mtime() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_mtime()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Metric::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Metric::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Metric::GetClassData() const { return &_class_data_; } + + +void Metric::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast<Metric*>(&to_msg); + auto& from = static_cast<const Metric&>(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:yats.Metric) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_id_client().empty()) { + _this->_internal_set_id_client(from._internal_id_client()); + } + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (!from._internal_value().empty()) { + _this->_internal_set_value(from._internal_value()); + } + if (from._internal_mtime() != 0) { + _this->_internal_set_mtime(from._internal_mtime()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Metric::CopyFrom(const Metric& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:yats.Metric) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Metric::IsInitialized() const { + return true; +} + +void Metric::InternalSwap(Metric* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.id_client_, lhs_arena, + &other->_impl_.id_client_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.value_, lhs_arena, + &other->_impl_.value_, rhs_arena + ); + swap(_impl_.mtime_, other->_impl_.mtime_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Metric::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_yats_2dgrpc_2eproto_getter, &descriptor_table_yats_2dgrpc_2eproto_once, + file_level_metadata_yats_2dgrpc_2eproto[0]); +} + +// =================================================================== + +class Event::_Internal { + public: +}; + +Event::Event(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:yats.Event) +} +Event::Event(const Event& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Event* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.id_client_){} + , decltype(_impl_.name_){} + , decltype(_impl_.etime_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.id_client_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.id_client_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_id_client().empty()) { + _this->_impl_.id_client_.Set(from._internal_id_client(), + _this->GetArenaForAllocation()); + } + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _this->_impl_.etime_ = from._impl_.etime_; + // @@protoc_insertion_point(copy_constructor:yats.Event) +} + +inline void Event::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.id_client_){} + , decltype(_impl_.name_){} + , decltype(_impl_.etime_){int64_t{0}} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.id_client_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.id_client_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Event::~Event() { + // @@protoc_insertion_point(destructor:yats.Event) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Event::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.id_client_.Destroy(); + _impl_.name_.Destroy(); +} + +void Event::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Event::Clear() { +// @@protoc_insertion_point(message_clear_start:yats.Event) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.id_client_.ClearToEmpty(); + _impl_.name_.ClearToEmpty(); + _impl_.etime_ = int64_t{0}; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Event::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string id_client = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_id_client(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "yats.Event.id_client")); + } else + goto handle_unusual; + continue; + // int64 etime = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + _impl_.etime_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string name = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "yats.Event.name")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Event::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:yats.Event) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string id_client = 1; + if (!this->_internal_id_client().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_id_client().data(), static_cast<int>(this->_internal_id_client().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "yats.Event.id_client"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_id_client(), target); + } + + // int64 etime = 2; + if (this->_internal_etime() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_etime(), target); + } + + // string name = 3; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "yats.Event.name"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_name(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:yats.Event) + return target; +} + +size_t Event::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:yats.Event) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string id_client = 1; + if (!this->_internal_id_client().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_id_client()); + } + + // string name = 3; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // int64 etime = 2; + if (this->_internal_etime() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_etime()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Event::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Event::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Event::GetClassData() const { return &_class_data_; } + + +void Event::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast<Event*>(&to_msg); + auto& from = static_cast<const Event&>(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:yats.Event) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_id_client().empty()) { + _this->_internal_set_id_client(from._internal_id_client()); + } + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (from._internal_etime() != 0) { + _this->_internal_set_etime(from._internal_etime()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Event::CopyFrom(const Event& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:yats.Event) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Event::IsInitialized() const { + return true; +} + +void Event::InternalSwap(Event* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.id_client_, lhs_arena, + &other->_impl_.id_client_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + swap(_impl_.etime_, other->_impl_.etime_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Event::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_yats_2dgrpc_2eproto_getter, &descriptor_table_yats_2dgrpc_2eproto_once, + file_level_metadata_yats_2dgrpc_2eproto[1]); +} + +// =================================================================== + +class CreateMetricRequest::_Internal { + public: + static const ::yats::Metric& metric(const CreateMetricRequest* msg); +}; + +const ::yats::Metric& +CreateMetricRequest::_Internal::metric(const CreateMetricRequest* msg) { + return *msg->_impl_.metric_; +} +CreateMetricRequest::CreateMetricRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:yats.CreateMetricRequest) +} +CreateMetricRequest::CreateMetricRequest(const CreateMetricRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CreateMetricRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.metric_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_metric()) { + _this->_impl_.metric_ = new ::yats::Metric(*from._impl_.metric_); + } + // @@protoc_insertion_point(copy_constructor:yats.CreateMetricRequest) +} + +inline void CreateMetricRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.metric_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +CreateMetricRequest::~CreateMetricRequest() { + // @@protoc_insertion_point(destructor:yats.CreateMetricRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CreateMetricRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.metric_; +} + +void CreateMetricRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CreateMetricRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:yats.CreateMetricRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.metric_ != nullptr) { + delete _impl_.metric_; + } + _impl_.metric_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CreateMetricRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .yats.Metric metric = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_metric(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CreateMetricRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:yats.CreateMetricRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .yats.Metric metric = 1; + if (this->_internal_has_metric()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::metric(this), + _Internal::metric(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:yats.CreateMetricRequest) + return target; +} + +size_t CreateMetricRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:yats.CreateMetricRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .yats.Metric metric = 1; + if (this->_internal_has_metric()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.metric_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CreateMetricRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CreateMetricRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CreateMetricRequest::GetClassData() const { return &_class_data_; } + + +void CreateMetricRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast<CreateMetricRequest*>(&to_msg); + auto& from = static_cast<const CreateMetricRequest&>(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:yats.CreateMetricRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_metric()) { + _this->_internal_mutable_metric()->::yats::Metric::MergeFrom( + from._internal_metric()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CreateMetricRequest::CopyFrom(const CreateMetricRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:yats.CreateMetricRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CreateMetricRequest::IsInitialized() const { + return true; +} + +void CreateMetricRequest::InternalSwap(CreateMetricRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.metric_, other->_impl_.metric_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CreateMetricRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_yats_2dgrpc_2eproto_getter, &descriptor_table_yats_2dgrpc_2eproto_once, + file_level_metadata_yats_2dgrpc_2eproto[2]); +} + +// =================================================================== + +class CreateMetricResponse::_Internal { + public: + static const ::yats::Metric& metric(const CreateMetricResponse* msg); +}; + +const ::yats::Metric& +CreateMetricResponse::_Internal::metric(const CreateMetricResponse* msg) { + return *msg->_impl_.metric_; +} +CreateMetricResponse::CreateMetricResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:yats.CreateMetricResponse) +} +CreateMetricResponse::CreateMetricResponse(const CreateMetricResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CreateMetricResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.metric_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_metric()) { + _this->_impl_.metric_ = new ::yats::Metric(*from._impl_.metric_); + } + // @@protoc_insertion_point(copy_constructor:yats.CreateMetricResponse) +} + +inline void CreateMetricResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.metric_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +CreateMetricResponse::~CreateMetricResponse() { + // @@protoc_insertion_point(destructor:yats.CreateMetricResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CreateMetricResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.metric_; +} + +void CreateMetricResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CreateMetricResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:yats.CreateMetricResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.metric_ != nullptr) { + delete _impl_.metric_; + } + _impl_.metric_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CreateMetricResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .yats.Metric metric = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_metric(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CreateMetricResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:yats.CreateMetricResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .yats.Metric metric = 1; + if (this->_internal_has_metric()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::metric(this), + _Internal::metric(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:yats.CreateMetricResponse) + return target; +} + +size_t CreateMetricResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:yats.CreateMetricResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .yats.Metric metric = 1; + if (this->_internal_has_metric()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.metric_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CreateMetricResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CreateMetricResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CreateMetricResponse::GetClassData() const { return &_class_data_; } + + +void CreateMetricResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast<CreateMetricResponse*>(&to_msg); + auto& from = static_cast<const CreateMetricResponse&>(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:yats.CreateMetricResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_metric()) { + _this->_internal_mutable_metric()->::yats::Metric::MergeFrom( + from._internal_metric()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CreateMetricResponse::CopyFrom(const CreateMetricResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:yats.CreateMetricResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CreateMetricResponse::IsInitialized() const { + return true; +} + +void CreateMetricResponse::InternalSwap(CreateMetricResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.metric_, other->_impl_.metric_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CreateMetricResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_yats_2dgrpc_2eproto_getter, &descriptor_table_yats_2dgrpc_2eproto_once, + file_level_metadata_yats_2dgrpc_2eproto[3]); +} + +// =================================================================== + +class CreateEventRequest::_Internal { + public: + static const ::yats::Event& event(const CreateEventRequest* msg); +}; + +const ::yats::Event& +CreateEventRequest::_Internal::event(const CreateEventRequest* msg) { + return *msg->_impl_.event_; +} +CreateEventRequest::CreateEventRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:yats.CreateEventRequest) +} +CreateEventRequest::CreateEventRequest(const CreateEventRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CreateEventRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.event_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_event()) { + _this->_impl_.event_ = new ::yats::Event(*from._impl_.event_); + } + // @@protoc_insertion_point(copy_constructor:yats.CreateEventRequest) +} + +inline void CreateEventRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.event_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +CreateEventRequest::~CreateEventRequest() { + // @@protoc_insertion_point(destructor:yats.CreateEventRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CreateEventRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.event_; +} + +void CreateEventRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CreateEventRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:yats.CreateEventRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.event_ != nullptr) { + delete _impl_.event_; + } + _impl_.event_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CreateEventRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .yats.Event event = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_event(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CreateEventRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:yats.CreateEventRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .yats.Event event = 1; + if (this->_internal_has_event()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::event(this), + _Internal::event(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:yats.CreateEventRequest) + return target; +} + +size_t CreateEventRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:yats.CreateEventRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .yats.Event event = 1; + if (this->_internal_has_event()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.event_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CreateEventRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CreateEventRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CreateEventRequest::GetClassData() const { return &_class_data_; } + + +void CreateEventRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast<CreateEventRequest*>(&to_msg); + auto& from = static_cast<const CreateEventRequest&>(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:yats.CreateEventRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_event()) { + _this->_internal_mutable_event()->::yats::Event::MergeFrom( + from._internal_event()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CreateEventRequest::CopyFrom(const CreateEventRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:yats.CreateEventRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CreateEventRequest::IsInitialized() const { + return true; +} + +void CreateEventRequest::InternalSwap(CreateEventRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.event_, other->_impl_.event_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CreateEventRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_yats_2dgrpc_2eproto_getter, &descriptor_table_yats_2dgrpc_2eproto_once, + file_level_metadata_yats_2dgrpc_2eproto[4]); +} + +// =================================================================== + +class CreateEventResponse::_Internal { + public: + static const ::yats::Event& event(const CreateEventResponse* msg); +}; + +const ::yats::Event& +CreateEventResponse::_Internal::event(const CreateEventResponse* msg) { + return *msg->_impl_.event_; +} +CreateEventResponse::CreateEventResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:yats.CreateEventResponse) +} +CreateEventResponse::CreateEventResponse(const CreateEventResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CreateEventResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.event_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_event()) { + _this->_impl_.event_ = new ::yats::Event(*from._impl_.event_); + } + // @@protoc_insertion_point(copy_constructor:yats.CreateEventResponse) +} + +inline void CreateEventResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.event_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +CreateEventResponse::~CreateEventResponse() { + // @@protoc_insertion_point(destructor:yats.CreateEventResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CreateEventResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.event_; +} + +void CreateEventResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CreateEventResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:yats.CreateEventResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.event_ != nullptr) { + delete _impl_.event_; + } + _impl_.event_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CreateEventResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .yats.Event event = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_event(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CreateEventResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:yats.CreateEventResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .yats.Event event = 1; + if (this->_internal_has_event()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::event(this), + _Internal::event(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:yats.CreateEventResponse) + return target; +} + +size_t CreateEventResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:yats.CreateEventResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .yats.Event event = 1; + if (this->_internal_has_event()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.event_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CreateEventResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CreateEventResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CreateEventResponse::GetClassData() const { return &_class_data_; } + + +void CreateEventResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast<CreateEventResponse*>(&to_msg); + auto& from = static_cast<const CreateEventResponse&>(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:yats.CreateEventResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_event()) { + _this->_internal_mutable_event()->::yats::Event::MergeFrom( + from._internal_event()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CreateEventResponse::CopyFrom(const CreateEventResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:yats.CreateEventResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CreateEventResponse::IsInitialized() const { + return true; +} + +void CreateEventResponse::InternalSwap(CreateEventResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.event_, other->_impl_.event_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CreateEventResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_yats_2dgrpc_2eproto_getter, &descriptor_table_yats_2dgrpc_2eproto_once, + file_level_metadata_yats_2dgrpc_2eproto[5]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace yats +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::yats::Metric* +Arena::CreateMaybeMessage< ::yats::Metric >(Arena* arena) { + return Arena::CreateMessageInternal< ::yats::Metric >(arena); +} +template<> PROTOBUF_NOINLINE ::yats::Event* +Arena::CreateMaybeMessage< ::yats::Event >(Arena* arena) { + return Arena::CreateMessageInternal< ::yats::Event >(arena); +} +template<> PROTOBUF_NOINLINE ::yats::CreateMetricRequest* +Arena::CreateMaybeMessage< ::yats::CreateMetricRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::yats::CreateMetricRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::yats::CreateMetricResponse* +Arena::CreateMaybeMessage< ::yats::CreateMetricResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::yats::CreateMetricResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::yats::CreateEventRequest* +Arena::CreateMaybeMessage< ::yats::CreateEventRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::yats::CreateEventRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::yats::CreateEventResponse* +Arena::CreateMaybeMessage< ::yats::CreateEventResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::yats::CreateEventResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/yats-connector-cpp/yats-grpc.pb.h b/yats-connector-cpp/yats-grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..09b8148c9a7257b574abb32006e6560df3347887 --- /dev/null +++ b/yats-connector-cpp/yats-grpc.pb.h @@ -0,0 +1,1783 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_yats_2dgrpc_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_yats_2dgrpc_2eproto + +#include <limits> +#include <string> + +#include <google/protobuf/port_def.inc> +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/port_undef.inc> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata_lite.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_yats_2dgrpc_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_yats_2dgrpc_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_yats_2dgrpc_2eproto; +namespace yats { +class CreateEventRequest; +struct CreateEventRequestDefaultTypeInternal; +extern CreateEventRequestDefaultTypeInternal _CreateEventRequest_default_instance_; +class CreateEventResponse; +struct CreateEventResponseDefaultTypeInternal; +extern CreateEventResponseDefaultTypeInternal _CreateEventResponse_default_instance_; +class CreateMetricRequest; +struct CreateMetricRequestDefaultTypeInternal; +extern CreateMetricRequestDefaultTypeInternal _CreateMetricRequest_default_instance_; +class CreateMetricResponse; +struct CreateMetricResponseDefaultTypeInternal; +extern CreateMetricResponseDefaultTypeInternal _CreateMetricResponse_default_instance_; +class Event; +struct EventDefaultTypeInternal; +extern EventDefaultTypeInternal _Event_default_instance_; +class Metric; +struct MetricDefaultTypeInternal; +extern MetricDefaultTypeInternal _Metric_default_instance_; +} // namespace yats +PROTOBUF_NAMESPACE_OPEN +template<> ::yats::CreateEventRequest* Arena::CreateMaybeMessage<::yats::CreateEventRequest>(Arena*); +template<> ::yats::CreateEventResponse* Arena::CreateMaybeMessage<::yats::CreateEventResponse>(Arena*); +template<> ::yats::CreateMetricRequest* Arena::CreateMaybeMessage<::yats::CreateMetricRequest>(Arena*); +template<> ::yats::CreateMetricResponse* Arena::CreateMaybeMessage<::yats::CreateMetricResponse>(Arena*); +template<> ::yats::Event* Arena::CreateMaybeMessage<::yats::Event>(Arena*); +template<> ::yats::Metric* Arena::CreateMaybeMessage<::yats::Metric>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace yats { + +// =================================================================== + +class Metric final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:yats.Metric) */ { + public: + inline Metric() : Metric(nullptr) {} + ~Metric() override; + explicit PROTOBUF_CONSTEXPR Metric(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Metric(const Metric& from); + Metric(Metric&& from) noexcept + : Metric() { + *this = ::std::move(from); + } + + inline Metric& operator=(const Metric& from) { + CopyFrom(from); + return *this; + } + inline Metric& operator=(Metric&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Metric& default_instance() { + return *internal_default_instance(); + } + static inline const Metric* internal_default_instance() { + return reinterpret_cast<const Metric*>( + &_Metric_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Metric& a, Metric& b) { + a.Swap(&b); + } + inline void Swap(Metric* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Metric* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Metric* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<Metric>(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Metric& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Metric& from) { + Metric::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Metric* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "yats.Metric"; + } + protected: + explicit Metric(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIdClientFieldNumber = 1, + kNameFieldNumber = 3, + kValueFieldNumber = 4, + kMtimeFieldNumber = 2, + }; + // string id_client = 1; + void clear_id_client(); + const std::string& id_client() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_id_client(ArgT0&& arg0, ArgT... args); + std::string* mutable_id_client(); + PROTOBUF_NODISCARD std::string* release_id_client(); + void set_allocated_id_client(std::string* id_client); + private: + const std::string& _internal_id_client() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_id_client(const std::string& value); + std::string* _internal_mutable_id_client(); + public: + + // string name = 3; + void clear_name(); + const std::string& name() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string value = 4; + void clear_value(); + const std::string& value() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); + private: + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: + + // int64 mtime = 2; + void clear_mtime(); + int64_t mtime() const; + void set_mtime(int64_t value); + private: + int64_t _internal_mtime() const; + void _internal_set_mtime(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:yats.Metric) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr id_client_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + int64_t mtime_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_yats_2dgrpc_2eproto; +}; +// ------------------------------------------------------------------- + +class Event final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:yats.Event) */ { + public: + inline Event() : Event(nullptr) {} + ~Event() override; + explicit PROTOBUF_CONSTEXPR Event(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Event(const Event& from); + Event(Event&& from) noexcept + : Event() { + *this = ::std::move(from); + } + + inline Event& operator=(const Event& from) { + CopyFrom(from); + return *this; + } + inline Event& operator=(Event&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Event& default_instance() { + return *internal_default_instance(); + } + static inline const Event* internal_default_instance() { + return reinterpret_cast<const Event*>( + &_Event_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Event& a, Event& b) { + a.Swap(&b); + } + inline void Swap(Event* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Event* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Event* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<Event>(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Event& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Event& from) { + Event::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Event* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "yats.Event"; + } + protected: + explicit Event(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIdClientFieldNumber = 1, + kNameFieldNumber = 3, + kEtimeFieldNumber = 2, + }; + // string id_client = 1; + void clear_id_client(); + const std::string& id_client() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_id_client(ArgT0&& arg0, ArgT... args); + std::string* mutable_id_client(); + PROTOBUF_NODISCARD std::string* release_id_client(); + void set_allocated_id_client(std::string* id_client); + private: + const std::string& _internal_id_client() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_id_client(const std::string& value); + std::string* _internal_mutable_id_client(); + public: + + // string name = 3; + void clear_name(); + const std::string& name() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // int64 etime = 2; + void clear_etime(); + int64_t etime() const; + void set_etime(int64_t value); + private: + int64_t _internal_etime() const; + void _internal_set_etime(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:yats.Event) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr id_client_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + int64_t etime_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_yats_2dgrpc_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateMetricRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:yats.CreateMetricRequest) */ { + public: + inline CreateMetricRequest() : CreateMetricRequest(nullptr) {} + ~CreateMetricRequest() override; + explicit PROTOBUF_CONSTEXPR CreateMetricRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateMetricRequest(const CreateMetricRequest& from); + CreateMetricRequest(CreateMetricRequest&& from) noexcept + : CreateMetricRequest() { + *this = ::std::move(from); + } + + inline CreateMetricRequest& operator=(const CreateMetricRequest& from) { + CopyFrom(from); + return *this; + } + inline CreateMetricRequest& operator=(CreateMetricRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateMetricRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CreateMetricRequest* internal_default_instance() { + return reinterpret_cast<const CreateMetricRequest*>( + &_CreateMetricRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(CreateMetricRequest& a, CreateMetricRequest& b) { + a.Swap(&b); + } + inline void Swap(CreateMetricRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateMetricRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateMetricRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<CreateMetricRequest>(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateMetricRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateMetricRequest& from) { + CreateMetricRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateMetricRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "yats.CreateMetricRequest"; + } + protected: + explicit CreateMetricRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMetricFieldNumber = 1, + }; + // .yats.Metric metric = 1; + bool has_metric() const; + private: + bool _internal_has_metric() const; + public: + void clear_metric(); + const ::yats::Metric& metric() const; + PROTOBUF_NODISCARD ::yats::Metric* release_metric(); + ::yats::Metric* mutable_metric(); + void set_allocated_metric(::yats::Metric* metric); + private: + const ::yats::Metric& _internal_metric() const; + ::yats::Metric* _internal_mutable_metric(); + public: + void unsafe_arena_set_allocated_metric( + ::yats::Metric* metric); + ::yats::Metric* unsafe_arena_release_metric(); + + // @@protoc_insertion_point(class_scope:yats.CreateMetricRequest) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::yats::Metric* metric_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_yats_2dgrpc_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateMetricResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:yats.CreateMetricResponse) */ { + public: + inline CreateMetricResponse() : CreateMetricResponse(nullptr) {} + ~CreateMetricResponse() override; + explicit PROTOBUF_CONSTEXPR CreateMetricResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateMetricResponse(const CreateMetricResponse& from); + CreateMetricResponse(CreateMetricResponse&& from) noexcept + : CreateMetricResponse() { + *this = ::std::move(from); + } + + inline CreateMetricResponse& operator=(const CreateMetricResponse& from) { + CopyFrom(from); + return *this; + } + inline CreateMetricResponse& operator=(CreateMetricResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateMetricResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CreateMetricResponse* internal_default_instance() { + return reinterpret_cast<const CreateMetricResponse*>( + &_CreateMetricResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(CreateMetricResponse& a, CreateMetricResponse& b) { + a.Swap(&b); + } + inline void Swap(CreateMetricResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateMetricResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateMetricResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<CreateMetricResponse>(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateMetricResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateMetricResponse& from) { + CreateMetricResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateMetricResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "yats.CreateMetricResponse"; + } + protected: + explicit CreateMetricResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMetricFieldNumber = 1, + }; + // .yats.Metric metric = 1; + bool has_metric() const; + private: + bool _internal_has_metric() const; + public: + void clear_metric(); + const ::yats::Metric& metric() const; + PROTOBUF_NODISCARD ::yats::Metric* release_metric(); + ::yats::Metric* mutable_metric(); + void set_allocated_metric(::yats::Metric* metric); + private: + const ::yats::Metric& _internal_metric() const; + ::yats::Metric* _internal_mutable_metric(); + public: + void unsafe_arena_set_allocated_metric( + ::yats::Metric* metric); + ::yats::Metric* unsafe_arena_release_metric(); + + // @@protoc_insertion_point(class_scope:yats.CreateMetricResponse) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::yats::Metric* metric_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_yats_2dgrpc_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateEventRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:yats.CreateEventRequest) */ { + public: + inline CreateEventRequest() : CreateEventRequest(nullptr) {} + ~CreateEventRequest() override; + explicit PROTOBUF_CONSTEXPR CreateEventRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateEventRequest(const CreateEventRequest& from); + CreateEventRequest(CreateEventRequest&& from) noexcept + : CreateEventRequest() { + *this = ::std::move(from); + } + + inline CreateEventRequest& operator=(const CreateEventRequest& from) { + CopyFrom(from); + return *this; + } + inline CreateEventRequest& operator=(CreateEventRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateEventRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CreateEventRequest* internal_default_instance() { + return reinterpret_cast<const CreateEventRequest*>( + &_CreateEventRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(CreateEventRequest& a, CreateEventRequest& b) { + a.Swap(&b); + } + inline void Swap(CreateEventRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateEventRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateEventRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<CreateEventRequest>(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateEventRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateEventRequest& from) { + CreateEventRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateEventRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "yats.CreateEventRequest"; + } + protected: + explicit CreateEventRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEventFieldNumber = 1, + }; + // .yats.Event event = 1; + bool has_event() const; + private: + bool _internal_has_event() const; + public: + void clear_event(); + const ::yats::Event& event() const; + PROTOBUF_NODISCARD ::yats::Event* release_event(); + ::yats::Event* mutable_event(); + void set_allocated_event(::yats::Event* event); + private: + const ::yats::Event& _internal_event() const; + ::yats::Event* _internal_mutable_event(); + public: + void unsafe_arena_set_allocated_event( + ::yats::Event* event); + ::yats::Event* unsafe_arena_release_event(); + + // @@protoc_insertion_point(class_scope:yats.CreateEventRequest) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::yats::Event* event_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_yats_2dgrpc_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateEventResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:yats.CreateEventResponse) */ { + public: + inline CreateEventResponse() : CreateEventResponse(nullptr) {} + ~CreateEventResponse() override; + explicit PROTOBUF_CONSTEXPR CreateEventResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateEventResponse(const CreateEventResponse& from); + CreateEventResponse(CreateEventResponse&& from) noexcept + : CreateEventResponse() { + *this = ::std::move(from); + } + + inline CreateEventResponse& operator=(const CreateEventResponse& from) { + CopyFrom(from); + return *this; + } + inline CreateEventResponse& operator=(CreateEventResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateEventResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CreateEventResponse* internal_default_instance() { + return reinterpret_cast<const CreateEventResponse*>( + &_CreateEventResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(CreateEventResponse& a, CreateEventResponse& b) { + a.Swap(&b); + } + inline void Swap(CreateEventResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateEventResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateEventResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<CreateEventResponse>(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateEventResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateEventResponse& from) { + CreateEventResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateEventResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "yats.CreateEventResponse"; + } + protected: + explicit CreateEventResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEventFieldNumber = 1, + }; + // .yats.Event event = 1; + bool has_event() const; + private: + bool _internal_has_event() const; + public: + void clear_event(); + const ::yats::Event& event() const; + PROTOBUF_NODISCARD ::yats::Event* release_event(); + ::yats::Event* mutable_event(); + void set_allocated_event(::yats::Event* event); + private: + const ::yats::Event& _internal_event() const; + ::yats::Event* _internal_mutable_event(); + public: + void unsafe_arena_set_allocated_event( + ::yats::Event* event); + ::yats::Event* unsafe_arena_release_event(); + + // @@protoc_insertion_point(class_scope:yats.CreateEventResponse) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::yats::Event* event_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_yats_2dgrpc_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Metric + +// string id_client = 1; +inline void Metric::clear_id_client() { + _impl_.id_client_.ClearToEmpty(); +} +inline const std::string& Metric::id_client() const { + // @@protoc_insertion_point(field_get:yats.Metric.id_client) + return _internal_id_client(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Metric::set_id_client(ArgT0&& arg0, ArgT... args) { + + _impl_.id_client_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:yats.Metric.id_client) +} +inline std::string* Metric::mutable_id_client() { + std::string* _s = _internal_mutable_id_client(); + // @@protoc_insertion_point(field_mutable:yats.Metric.id_client) + return _s; +} +inline const std::string& Metric::_internal_id_client() const { + return _impl_.id_client_.Get(); +} +inline void Metric::_internal_set_id_client(const std::string& value) { + + _impl_.id_client_.Set(value, GetArenaForAllocation()); +} +inline std::string* Metric::_internal_mutable_id_client() { + + return _impl_.id_client_.Mutable(GetArenaForAllocation()); +} +inline std::string* Metric::release_id_client() { + // @@protoc_insertion_point(field_release:yats.Metric.id_client) + return _impl_.id_client_.Release(); +} +inline void Metric::set_allocated_id_client(std::string* id_client) { + if (id_client != nullptr) { + + } else { + + } + _impl_.id_client_.SetAllocated(id_client, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.id_client_.IsDefault()) { + _impl_.id_client_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:yats.Metric.id_client) +} + +// int64 mtime = 2; +inline void Metric::clear_mtime() { + _impl_.mtime_ = int64_t{0}; +} +inline int64_t Metric::_internal_mtime() const { + return _impl_.mtime_; +} +inline int64_t Metric::mtime() const { + // @@protoc_insertion_point(field_get:yats.Metric.mtime) + return _internal_mtime(); +} +inline void Metric::_internal_set_mtime(int64_t value) { + + _impl_.mtime_ = value; +} +inline void Metric::set_mtime(int64_t value) { + _internal_set_mtime(value); + // @@protoc_insertion_point(field_set:yats.Metric.mtime) +} + +// string name = 3; +inline void Metric::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& Metric::name() const { + // @@protoc_insertion_point(field_get:yats.Metric.name) + return _internal_name(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Metric::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:yats.Metric.name) +} +inline std::string* Metric::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:yats.Metric.name) + return _s; +} +inline const std::string& Metric::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Metric::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Metric::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Metric::release_name() { + // @@protoc_insertion_point(field_release:yats.Metric.name) + return _impl_.name_.Release(); +} +inline void Metric::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:yats.Metric.name) +} + +// string value = 4; +inline void Metric::clear_value() { + _impl_.value_.ClearToEmpty(); +} +inline const std::string& Metric::value() const { + // @@protoc_insertion_point(field_get:yats.Metric.value) + return _internal_value(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Metric::set_value(ArgT0&& arg0, ArgT... args) { + + _impl_.value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:yats.Metric.value) +} +inline std::string* Metric::mutable_value() { + std::string* _s = _internal_mutable_value(); + // @@protoc_insertion_point(field_mutable:yats.Metric.value) + return _s; +} +inline const std::string& Metric::_internal_value() const { + return _impl_.value_.Get(); +} +inline void Metric::_internal_set_value(const std::string& value) { + + _impl_.value_.Set(value, GetArenaForAllocation()); +} +inline std::string* Metric::_internal_mutable_value() { + + return _impl_.value_.Mutable(GetArenaForAllocation()); +} +inline std::string* Metric::release_value() { + // @@protoc_insertion_point(field_release:yats.Metric.value) + return _impl_.value_.Release(); +} +inline void Metric::set_allocated_value(std::string* value) { + if (value != nullptr) { + + } else { + + } + _impl_.value_.SetAllocated(value, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:yats.Metric.value) +} + +// ------------------------------------------------------------------- + +// Event + +// string id_client = 1; +inline void Event::clear_id_client() { + _impl_.id_client_.ClearToEmpty(); +} +inline const std::string& Event::id_client() const { + // @@protoc_insertion_point(field_get:yats.Event.id_client) + return _internal_id_client(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Event::set_id_client(ArgT0&& arg0, ArgT... args) { + + _impl_.id_client_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:yats.Event.id_client) +} +inline std::string* Event::mutable_id_client() { + std::string* _s = _internal_mutable_id_client(); + // @@protoc_insertion_point(field_mutable:yats.Event.id_client) + return _s; +} +inline const std::string& Event::_internal_id_client() const { + return _impl_.id_client_.Get(); +} +inline void Event::_internal_set_id_client(const std::string& value) { + + _impl_.id_client_.Set(value, GetArenaForAllocation()); +} +inline std::string* Event::_internal_mutable_id_client() { + + return _impl_.id_client_.Mutable(GetArenaForAllocation()); +} +inline std::string* Event::release_id_client() { + // @@protoc_insertion_point(field_release:yats.Event.id_client) + return _impl_.id_client_.Release(); +} +inline void Event::set_allocated_id_client(std::string* id_client) { + if (id_client != nullptr) { + + } else { + + } + _impl_.id_client_.SetAllocated(id_client, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.id_client_.IsDefault()) { + _impl_.id_client_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:yats.Event.id_client) +} + +// int64 etime = 2; +inline void Event::clear_etime() { + _impl_.etime_ = int64_t{0}; +} +inline int64_t Event::_internal_etime() const { + return _impl_.etime_; +} +inline int64_t Event::etime() const { + // @@protoc_insertion_point(field_get:yats.Event.etime) + return _internal_etime(); +} +inline void Event::_internal_set_etime(int64_t value) { + + _impl_.etime_ = value; +} +inline void Event::set_etime(int64_t value) { + _internal_set_etime(value); + // @@protoc_insertion_point(field_set:yats.Event.etime) +} + +// string name = 3; +inline void Event::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& Event::name() const { + // @@protoc_insertion_point(field_get:yats.Event.name) + return _internal_name(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Event::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:yats.Event.name) +} +inline std::string* Event::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:yats.Event.name) + return _s; +} +inline const std::string& Event::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Event::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Event::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Event::release_name() { + // @@protoc_insertion_point(field_release:yats.Event.name) + return _impl_.name_.Release(); +} +inline void Event::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:yats.Event.name) +} + +// ------------------------------------------------------------------- + +// CreateMetricRequest + +// .yats.Metric metric = 1; +inline bool CreateMetricRequest::_internal_has_metric() const { + return this != internal_default_instance() && _impl_.metric_ != nullptr; +} +inline bool CreateMetricRequest::has_metric() const { + return _internal_has_metric(); +} +inline void CreateMetricRequest::clear_metric() { + if (GetArenaForAllocation() == nullptr && _impl_.metric_ != nullptr) { + delete _impl_.metric_; + } + _impl_.metric_ = nullptr; +} +inline const ::yats::Metric& CreateMetricRequest::_internal_metric() const { + const ::yats::Metric* p = _impl_.metric_; + return p != nullptr ? *p : reinterpret_cast<const ::yats::Metric&>( + ::yats::_Metric_default_instance_); +} +inline const ::yats::Metric& CreateMetricRequest::metric() const { + // @@protoc_insertion_point(field_get:yats.CreateMetricRequest.metric) + return _internal_metric(); +} +inline void CreateMetricRequest::unsafe_arena_set_allocated_metric( + ::yats::Metric* metric) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.metric_); + } + _impl_.metric_ = metric; + if (metric) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:yats.CreateMetricRequest.metric) +} +inline ::yats::Metric* CreateMetricRequest::release_metric() { + + ::yats::Metric* temp = _impl_.metric_; + _impl_.metric_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::yats::Metric* CreateMetricRequest::unsafe_arena_release_metric() { + // @@protoc_insertion_point(field_release:yats.CreateMetricRequest.metric) + + ::yats::Metric* temp = _impl_.metric_; + _impl_.metric_ = nullptr; + return temp; +} +inline ::yats::Metric* CreateMetricRequest::_internal_mutable_metric() { + + if (_impl_.metric_ == nullptr) { + auto* p = CreateMaybeMessage<::yats::Metric>(GetArenaForAllocation()); + _impl_.metric_ = p; + } + return _impl_.metric_; +} +inline ::yats::Metric* CreateMetricRequest::mutable_metric() { + ::yats::Metric* _msg = _internal_mutable_metric(); + // @@protoc_insertion_point(field_mutable:yats.CreateMetricRequest.metric) + return _msg; +} +inline void CreateMetricRequest::set_allocated_metric(::yats::Metric* metric) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.metric_; + } + if (metric) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(metric); + if (message_arena != submessage_arena) { + metric = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, metric, submessage_arena); + } + + } else { + + } + _impl_.metric_ = metric; + // @@protoc_insertion_point(field_set_allocated:yats.CreateMetricRequest.metric) +} + +// ------------------------------------------------------------------- + +// CreateMetricResponse + +// .yats.Metric metric = 1; +inline bool CreateMetricResponse::_internal_has_metric() const { + return this != internal_default_instance() && _impl_.metric_ != nullptr; +} +inline bool CreateMetricResponse::has_metric() const { + return _internal_has_metric(); +} +inline void CreateMetricResponse::clear_metric() { + if (GetArenaForAllocation() == nullptr && _impl_.metric_ != nullptr) { + delete _impl_.metric_; + } + _impl_.metric_ = nullptr; +} +inline const ::yats::Metric& CreateMetricResponse::_internal_metric() const { + const ::yats::Metric* p = _impl_.metric_; + return p != nullptr ? *p : reinterpret_cast<const ::yats::Metric&>( + ::yats::_Metric_default_instance_); +} +inline const ::yats::Metric& CreateMetricResponse::metric() const { + // @@protoc_insertion_point(field_get:yats.CreateMetricResponse.metric) + return _internal_metric(); +} +inline void CreateMetricResponse::unsafe_arena_set_allocated_metric( + ::yats::Metric* metric) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.metric_); + } + _impl_.metric_ = metric; + if (metric) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:yats.CreateMetricResponse.metric) +} +inline ::yats::Metric* CreateMetricResponse::release_metric() { + + ::yats::Metric* temp = _impl_.metric_; + _impl_.metric_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::yats::Metric* CreateMetricResponse::unsafe_arena_release_metric() { + // @@protoc_insertion_point(field_release:yats.CreateMetricResponse.metric) + + ::yats::Metric* temp = _impl_.metric_; + _impl_.metric_ = nullptr; + return temp; +} +inline ::yats::Metric* CreateMetricResponse::_internal_mutable_metric() { + + if (_impl_.metric_ == nullptr) { + auto* p = CreateMaybeMessage<::yats::Metric>(GetArenaForAllocation()); + _impl_.metric_ = p; + } + return _impl_.metric_; +} +inline ::yats::Metric* CreateMetricResponse::mutable_metric() { + ::yats::Metric* _msg = _internal_mutable_metric(); + // @@protoc_insertion_point(field_mutable:yats.CreateMetricResponse.metric) + return _msg; +} +inline void CreateMetricResponse::set_allocated_metric(::yats::Metric* metric) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.metric_; + } + if (metric) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(metric); + if (message_arena != submessage_arena) { + metric = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, metric, submessage_arena); + } + + } else { + + } + _impl_.metric_ = metric; + // @@protoc_insertion_point(field_set_allocated:yats.CreateMetricResponse.metric) +} + +// ------------------------------------------------------------------- + +// CreateEventRequest + +// .yats.Event event = 1; +inline bool CreateEventRequest::_internal_has_event() const { + return this != internal_default_instance() && _impl_.event_ != nullptr; +} +inline bool CreateEventRequest::has_event() const { + return _internal_has_event(); +} +inline void CreateEventRequest::clear_event() { + if (GetArenaForAllocation() == nullptr && _impl_.event_ != nullptr) { + delete _impl_.event_; + } + _impl_.event_ = nullptr; +} +inline const ::yats::Event& CreateEventRequest::_internal_event() const { + const ::yats::Event* p = _impl_.event_; + return p != nullptr ? *p : reinterpret_cast<const ::yats::Event&>( + ::yats::_Event_default_instance_); +} +inline const ::yats::Event& CreateEventRequest::event() const { + // @@protoc_insertion_point(field_get:yats.CreateEventRequest.event) + return _internal_event(); +} +inline void CreateEventRequest::unsafe_arena_set_allocated_event( + ::yats::Event* event) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.event_); + } + _impl_.event_ = event; + if (event) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:yats.CreateEventRequest.event) +} +inline ::yats::Event* CreateEventRequest::release_event() { + + ::yats::Event* temp = _impl_.event_; + _impl_.event_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::yats::Event* CreateEventRequest::unsafe_arena_release_event() { + // @@protoc_insertion_point(field_release:yats.CreateEventRequest.event) + + ::yats::Event* temp = _impl_.event_; + _impl_.event_ = nullptr; + return temp; +} +inline ::yats::Event* CreateEventRequest::_internal_mutable_event() { + + if (_impl_.event_ == nullptr) { + auto* p = CreateMaybeMessage<::yats::Event>(GetArenaForAllocation()); + _impl_.event_ = p; + } + return _impl_.event_; +} +inline ::yats::Event* CreateEventRequest::mutable_event() { + ::yats::Event* _msg = _internal_mutable_event(); + // @@protoc_insertion_point(field_mutable:yats.CreateEventRequest.event) + return _msg; +} +inline void CreateEventRequest::set_allocated_event(::yats::Event* event) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.event_; + } + if (event) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(event); + if (message_arena != submessage_arena) { + event = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, event, submessage_arena); + } + + } else { + + } + _impl_.event_ = event; + // @@protoc_insertion_point(field_set_allocated:yats.CreateEventRequest.event) +} + +// ------------------------------------------------------------------- + +// CreateEventResponse + +// .yats.Event event = 1; +inline bool CreateEventResponse::_internal_has_event() const { + return this != internal_default_instance() && _impl_.event_ != nullptr; +} +inline bool CreateEventResponse::has_event() const { + return _internal_has_event(); +} +inline void CreateEventResponse::clear_event() { + if (GetArenaForAllocation() == nullptr && _impl_.event_ != nullptr) { + delete _impl_.event_; + } + _impl_.event_ = nullptr; +} +inline const ::yats::Event& CreateEventResponse::_internal_event() const { + const ::yats::Event* p = _impl_.event_; + return p != nullptr ? *p : reinterpret_cast<const ::yats::Event&>( + ::yats::_Event_default_instance_); +} +inline const ::yats::Event& CreateEventResponse::event() const { + // @@protoc_insertion_point(field_get:yats.CreateEventResponse.event) + return _internal_event(); +} +inline void CreateEventResponse::unsafe_arena_set_allocated_event( + ::yats::Event* event) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.event_); + } + _impl_.event_ = event; + if (event) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:yats.CreateEventResponse.event) +} +inline ::yats::Event* CreateEventResponse::release_event() { + + ::yats::Event* temp = _impl_.event_; + _impl_.event_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::yats::Event* CreateEventResponse::unsafe_arena_release_event() { + // @@protoc_insertion_point(field_release:yats.CreateEventResponse.event) + + ::yats::Event* temp = _impl_.event_; + _impl_.event_ = nullptr; + return temp; +} +inline ::yats::Event* CreateEventResponse::_internal_mutable_event() { + + if (_impl_.event_ == nullptr) { + auto* p = CreateMaybeMessage<::yats::Event>(GetArenaForAllocation()); + _impl_.event_ = p; + } + return _impl_.event_; +} +inline ::yats::Event* CreateEventResponse::mutable_event() { + ::yats::Event* _msg = _internal_mutable_event(); + // @@protoc_insertion_point(field_mutable:yats.CreateEventResponse.event) + return _msg; +} +inline void CreateEventResponse::set_allocated_event(::yats::Event* event) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.event_; + } + if (event) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(event); + if (message_arena != submessage_arena) { + event = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, event, submessage_arena); + } + + } else { + + } + _impl_.event_ = event; + // @@protoc_insertion_point(field_set_allocated:yats.CreateEventResponse.event) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace yats + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_yats_2dgrpc_2eproto diff --git a/yats-connector-csharp/YatsGrpc.cs b/yats-connector-csharp/YatsGrpc.cs new file mode 100644 index 0000000000000000000000000000000000000000..a05ee41389c7414490354bb037dc12535056cb84 --- /dev/null +++ b/yats-connector-csharp/YatsGrpc.cs @@ -0,0 +1,1414 @@ +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto +// </auto-generated> +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Yats { + + /// <summary>Holder for reflection information generated from yats-grpc.proto</summary> + public static partial class YatsGrpcReflection { + + #region Descriptor + /// <summary>File descriptor for yats-grpc.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static YatsGrpcReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cg95YXRzLWdycGMucHJvdG8SBHlhdHMiRwoGTWV0cmljEhEKCWlkX2NsaWVu", + "dBgBIAEoCRINCgVtdGltZRgCIAEoAxIMCgRuYW1lGAMgASgJEg0KBXZhbHVl", + "GAQgASgJIjcKBUV2ZW50EhEKCWlkX2NsaWVudBgBIAEoCRINCgVldGltZRgC", + "IAEoAxIMCgRuYW1lGAMgASgJIjMKE0NyZWF0ZU1ldHJpY1JlcXVlc3QSHAoG", + "bWV0cmljGAEgASgLMgwueWF0cy5NZXRyaWMiNAoUQ3JlYXRlTWV0cmljUmVz", + "cG9uc2USHAoGbWV0cmljGAEgASgLMgwueWF0cy5NZXRyaWMiMAoSQ3JlYXRl", + "RXZlbnRSZXF1ZXN0EhoKBWV2ZW50GAEgASgLMgsueWF0cy5FdmVudCIxChND", + "cmVhdGVFdmVudFJlc3BvbnNlEhoKBWV2ZW50GAEgASgLMgsueWF0cy5FdmVu", + "dDKcAQoPWWF0c0dycGNTZXJ2aWNlEkUKDENyZWF0ZU1ldHJpYxIZLnlhdHMu", + "Q3JlYXRlTWV0cmljUmVxdWVzdBoaLnlhdHMuQ3JlYXRlTWV0cmljUmVzcG9u", + "c2USQgoLQ3JlYXRlRXZlbnQSGC55YXRzLkNyZWF0ZUV2ZW50UmVxdWVzdBoZ", + "LnlhdHMuQ3JlYXRlRXZlbnRSZXNwb25zZUInChdjb20ua2V2d2UueWF0cy5w", + "cm90b2J1ZlABWgp5YXRzL3Byb3RvYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Yats.Metric), global::Yats.Metric.Parser, new[]{ "IdClient", "Mtime", "Name", "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Yats.Event), global::Yats.Event.Parser, new[]{ "IdClient", "Etime", "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Yats.CreateMetricRequest), global::Yats.CreateMetricRequest.Parser, new[]{ "Metric" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Yats.CreateMetricResponse), global::Yats.CreateMetricResponse.Parser, new[]{ "Metric" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Yats.CreateEventRequest), global::Yats.CreateEventRequest.Parser, new[]{ "Event" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Yats.CreateEventResponse), global::Yats.CreateEventResponse.Parser, new[]{ "Event" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class Metric : pb::IMessage<Metric> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<Metric> _parser = new pb::MessageParser<Metric>(() => new Metric()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<Metric> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Yats.YatsGrpcReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Metric() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Metric(Metric other) : this() { + idClient_ = other.idClient_; + mtime_ = other.mtime_; + name_ = other.name_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Metric Clone() { + return new Metric(this); + } + + /// <summary>Field number for the "id_client" field.</summary> + public const int IdClientFieldNumber = 1; + private string idClient_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IdClient { + get { return idClient_; } + set { + idClient_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "mtime" field.</summary> + public const int MtimeFieldNumber = 2; + private long mtime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Mtime { + get { return mtime_; } + set { + mtime_ = value; + } + } + + /// <summary>Field number for the "name" field.</summary> + public const int NameFieldNumber = 3; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "value" field.</summary> + public const int ValueFieldNumber = 4; + private string value_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Metric); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Metric other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (IdClient != other.IdClient) return false; + if (Mtime != other.Mtime) return false; + if (Name != other.Name) return false; + if (Value != other.Value) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (IdClient.Length != 0) hash ^= IdClient.GetHashCode(); + if (Mtime != 0L) hash ^= Mtime.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (IdClient.Length != 0) { + output.WriteRawTag(10); + output.WriteString(IdClient); + } + if (Mtime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Mtime); + } + if (Name.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Name); + } + if (Value.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (IdClient.Length != 0) { + output.WriteRawTag(10); + output.WriteString(IdClient); + } + if (Mtime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Mtime); + } + if (Name.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Name); + } + if (Value.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (IdClient.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IdClient); + } + if (Mtime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Mtime); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Metric other) { + if (other == null) { + return; + } + if (other.IdClient.Length != 0) { + IdClient = other.IdClient; + } + if (other.Mtime != 0L) { + Mtime = other.Mtime; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + IdClient = input.ReadString(); + break; + } + case 16: { + Mtime = input.ReadInt64(); + break; + } + case 26: { + Name = input.ReadString(); + break; + } + case 34: { + Value = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + IdClient = input.ReadString(); + break; + } + case 16: { + Mtime = input.ReadInt64(); + break; + } + case 26: { + Name = input.ReadString(); + break; + } + case 34: { + Value = input.ReadString(); + break; + } + } + } + } + #endif + + } + + public sealed partial class Event : pb::IMessage<Event> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<Event> _parser = new pb::MessageParser<Event>(() => new Event()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<Event> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Yats.YatsGrpcReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Event() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Event(Event other) : this() { + idClient_ = other.idClient_; + etime_ = other.etime_; + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Event Clone() { + return new Event(this); + } + + /// <summary>Field number for the "id_client" field.</summary> + public const int IdClientFieldNumber = 1; + private string idClient_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IdClient { + get { return idClient_; } + set { + idClient_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "etime" field.</summary> + public const int EtimeFieldNumber = 2; + private long etime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Etime { + get { return etime_; } + set { + etime_ = value; + } + } + + /// <summary>Field number for the "name" field.</summary> + public const int NameFieldNumber = 3; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Event); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Event other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (IdClient != other.IdClient) return false; + if (Etime != other.Etime) return false; + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (IdClient.Length != 0) hash ^= IdClient.GetHashCode(); + if (Etime != 0L) hash ^= Etime.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (IdClient.Length != 0) { + output.WriteRawTag(10); + output.WriteString(IdClient); + } + if (Etime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Etime); + } + if (Name.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (IdClient.Length != 0) { + output.WriteRawTag(10); + output.WriteString(IdClient); + } + if (Etime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Etime); + } + if (Name.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (IdClient.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IdClient); + } + if (Etime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Etime); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Event other) { + if (other == null) { + return; + } + if (other.IdClient.Length != 0) { + IdClient = other.IdClient; + } + if (other.Etime != 0L) { + Etime = other.Etime; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + IdClient = input.ReadString(); + break; + } + case 16: { + Etime = input.ReadInt64(); + break; + } + case 26: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + IdClient = input.ReadString(); + break; + } + case 16: { + Etime = input.ReadInt64(); + break; + } + case 26: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + public sealed partial class CreateMetricRequest : pb::IMessage<CreateMetricRequest> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<CreateMetricRequest> _parser = new pb::MessageParser<CreateMetricRequest>(() => new CreateMetricRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<CreateMetricRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Yats.YatsGrpcReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMetricRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMetricRequest(CreateMetricRequest other) : this() { + metric_ = other.metric_ != null ? other.metric_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMetricRequest Clone() { + return new CreateMetricRequest(this); + } + + /// <summary>Field number for the "metric" field.</summary> + public const int MetricFieldNumber = 1; + private global::Yats.Metric metric_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Yats.Metric Metric { + get { return metric_; } + set { + metric_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateMetricRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateMetricRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Metric, other.Metric)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (metric_ != null) hash ^= Metric.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (metric_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metric); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (metric_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metric); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (metric_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Metric); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateMetricRequest other) { + if (other == null) { + return; + } + if (other.metric_ != null) { + if (metric_ == null) { + Metric = new global::Yats.Metric(); + } + Metric.MergeFrom(other.Metric); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (metric_ == null) { + Metric = new global::Yats.Metric(); + } + input.ReadMessage(Metric); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (metric_ == null) { + Metric = new global::Yats.Metric(); + } + input.ReadMessage(Metric); + break; + } + } + } + } + #endif + + } + + public sealed partial class CreateMetricResponse : pb::IMessage<CreateMetricResponse> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<CreateMetricResponse> _parser = new pb::MessageParser<CreateMetricResponse>(() => new CreateMetricResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<CreateMetricResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Yats.YatsGrpcReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMetricResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMetricResponse(CreateMetricResponse other) : this() { + metric_ = other.metric_ != null ? other.metric_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMetricResponse Clone() { + return new CreateMetricResponse(this); + } + + /// <summary>Field number for the "metric" field.</summary> + public const int MetricFieldNumber = 1; + private global::Yats.Metric metric_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Yats.Metric Metric { + get { return metric_; } + set { + metric_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateMetricResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateMetricResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Metric, other.Metric)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (metric_ != null) hash ^= Metric.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (metric_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metric); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (metric_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metric); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (metric_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Metric); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateMetricResponse other) { + if (other == null) { + return; + } + if (other.metric_ != null) { + if (metric_ == null) { + Metric = new global::Yats.Metric(); + } + Metric.MergeFrom(other.Metric); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (metric_ == null) { + Metric = new global::Yats.Metric(); + } + input.ReadMessage(Metric); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (metric_ == null) { + Metric = new global::Yats.Metric(); + } + input.ReadMessage(Metric); + break; + } + } + } + } + #endif + + } + + public sealed partial class CreateEventRequest : pb::IMessage<CreateEventRequest> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<CreateEventRequest> _parser = new pb::MessageParser<CreateEventRequest>(() => new CreateEventRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<CreateEventRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Yats.YatsGrpcReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateEventRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateEventRequest(CreateEventRequest other) : this() { + event_ = other.event_ != null ? other.event_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateEventRequest Clone() { + return new CreateEventRequest(this); + } + + /// <summary>Field number for the "event" field.</summary> + public const int EventFieldNumber = 1; + private global::Yats.Event event_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Yats.Event Event { + get { return event_; } + set { + event_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateEventRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateEventRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Event, other.Event)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (event_ != null) hash ^= Event.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (event_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Event); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (event_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Event); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (event_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Event); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateEventRequest other) { + if (other == null) { + return; + } + if (other.event_ != null) { + if (event_ == null) { + Event = new global::Yats.Event(); + } + Event.MergeFrom(other.Event); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (event_ == null) { + Event = new global::Yats.Event(); + } + input.ReadMessage(Event); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (event_ == null) { + Event = new global::Yats.Event(); + } + input.ReadMessage(Event); + break; + } + } + } + } + #endif + + } + + public sealed partial class CreateEventResponse : pb::IMessage<CreateEventResponse> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<CreateEventResponse> _parser = new pb::MessageParser<CreateEventResponse>(() => new CreateEventResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<CreateEventResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Yats.YatsGrpcReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateEventResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateEventResponse(CreateEventResponse other) : this() { + event_ = other.event_ != null ? other.event_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateEventResponse Clone() { + return new CreateEventResponse(this); + } + + /// <summary>Field number for the "event" field.</summary> + public const int EventFieldNumber = 1; + private global::Yats.Event event_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Yats.Event Event { + get { return event_; } + set { + event_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateEventResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateEventResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Event, other.Event)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (event_ != null) hash ^= Event.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (event_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Event); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (event_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Event); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (event_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Event); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateEventResponse other) { + if (other == null) { + return; + } + if (other.event_ != null) { + if (event_ == null) { + Event = new global::Yats.Event(); + } + Event.MergeFrom(other.Event); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (event_ == null) { + Event = new global::Yats.Event(); + } + input.ReadMessage(Event); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (event_ == null) { + Event = new global::Yats.Event(); + } + input.ReadMessage(Event); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/yats-connector-go/yats/proto/yats-grpc.pb.go b/yats-connector-go/yats/proto/yats-grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..cd1f73ce4f99c6c104ef0b799206b1d7d7a30483 --- /dev/null +++ b/yats-connector-go/yats/proto/yats-grpc.pb.go @@ -0,0 +1,534 @@ +//* +// Yats - yats +// +// This file is licensed under the Affero General Public License version 3 or +// later. See the COPYING file. +// +// @author Paolo Lulli <kevwe.com> +// @copyright Paolo Lulli 2024 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: yats-grpc.proto + +package proto + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Metric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdClient string `protobuf:"bytes,1,opt,name=id_client,json=idClient,proto3" json:"id_client,omitempty"` + Mtime int64 `protobuf:"varint,2,opt,name=mtime,proto3" json:"mtime,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Metric) Reset() { + *x = Metric{} + if protoimpl.UnsafeEnabled { + mi := &file_yats_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Metric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metric) ProtoMessage() {} + +func (x *Metric) ProtoReflect() protoreflect.Message { + mi := &file_yats_grpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Metric.ProtoReflect.Descriptor instead. +func (*Metric) Descriptor() ([]byte, []int) { + return file_yats_grpc_proto_rawDescGZIP(), []int{0} +} + +func (x *Metric) GetIdClient() string { + if x != nil { + return x.IdClient + } + return "" +} + +func (x *Metric) GetMtime() int64 { + if x != nil { + return x.Mtime + } + return 0 +} + +func (x *Metric) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Metric) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdClient string `protobuf:"bytes,1,opt,name=id_client,json=idClient,proto3" json:"id_client,omitempty"` + Etime int64 `protobuf:"varint,2,opt,name=etime,proto3" json:"etime,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_yats_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_yats_grpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_yats_grpc_proto_rawDescGZIP(), []int{1} +} + +func (x *Event) GetIdClient() string { + if x != nil { + return x.IdClient + } + return "" +} + +func (x *Event) GetEtime() int64 { + if x != nil { + return x.Etime + } + return 0 +} + +func (x *Event) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type CreateMetricRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metric *Metric `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"` +} + +func (x *CreateMetricRequest) Reset() { + *x = CreateMetricRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yats_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateMetricRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateMetricRequest) ProtoMessage() {} + +func (x *CreateMetricRequest) ProtoReflect() protoreflect.Message { + mi := &file_yats_grpc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateMetricRequest.ProtoReflect.Descriptor instead. +func (*CreateMetricRequest) Descriptor() ([]byte, []int) { + return file_yats_grpc_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateMetricRequest) GetMetric() *Metric { + if x != nil { + return x.Metric + } + return nil +} + +type CreateMetricResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metric *Metric `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"` +} + +func (x *CreateMetricResponse) Reset() { + *x = CreateMetricResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yats_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateMetricResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateMetricResponse) ProtoMessage() {} + +func (x *CreateMetricResponse) ProtoReflect() protoreflect.Message { + mi := &file_yats_grpc_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateMetricResponse.ProtoReflect.Descriptor instead. +func (*CreateMetricResponse) Descriptor() ([]byte, []int) { + return file_yats_grpc_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateMetricResponse) GetMetric() *Metric { + if x != nil { + return x.Metric + } + return nil +} + +type CreateEventRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *CreateEventRequest) Reset() { + *x = CreateEventRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_yats_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEventRequest) ProtoMessage() {} + +func (x *CreateEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_yats_grpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEventRequest.ProtoReflect.Descriptor instead. +func (*CreateEventRequest) Descriptor() ([]byte, []int) { + return file_yats_grpc_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateEventRequest) GetEvent() *Event { + if x != nil { + return x.Event + } + return nil +} + +type CreateEventResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *CreateEventResponse) Reset() { + *x = CreateEventResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_yats_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEventResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEventResponse) ProtoMessage() {} + +func (x *CreateEventResponse) ProtoReflect() protoreflect.Message { + mi := &file_yats_grpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEventResponse.ProtoReflect.Descriptor instead. +func (*CreateEventResponse) Descriptor() ([]byte, []int) { + return file_yats_grpc_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateEventResponse) GetEvent() *Event { + if x != nil { + return x.Event + } + return nil +} + +var File_yats_grpc_proto protoreflect.FileDescriptor + +var file_yats_grpc_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x79, 0x61, 0x74, 0x73, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x04, 0x79, 0x61, 0x74, 0x73, 0x22, 0x65, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, + 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4e, + 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3b, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x79, 0x61, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x3c, 0x0a, 0x14, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x79, 0x61, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x37, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x79, 0x61, 0x74, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x79, 0x61, 0x74, 0x73, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x32, 0x9c, 0x01, 0x0a, + 0x0f, 0x59, 0x61, 0x74, 0x73, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x45, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x12, 0x19, 0x2e, 0x79, 0x61, 0x74, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x79, 0x61, + 0x74, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x79, 0x61, 0x74, 0x73, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x79, 0x61, 0x74, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x0a, 0x17, 0x63, + 0x6f, 0x6d, 0x2e, 0x6b, 0x65, 0x76, 0x77, 0x65, 0x2e, 0x79, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x50, 0x01, 0x5a, 0x0a, 0x79, 0x61, 0x74, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_yats_grpc_proto_rawDescOnce sync.Once + file_yats_grpc_proto_rawDescData = file_yats_grpc_proto_rawDesc +) + +func file_yats_grpc_proto_rawDescGZIP() []byte { + file_yats_grpc_proto_rawDescOnce.Do(func() { + file_yats_grpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_yats_grpc_proto_rawDescData) + }) + return file_yats_grpc_proto_rawDescData +} + +var file_yats_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_yats_grpc_proto_goTypes = []interface{}{ + (*Metric)(nil), // 0: yats.Metric + (*Event)(nil), // 1: yats.Event + (*CreateMetricRequest)(nil), // 2: yats.CreateMetricRequest + (*CreateMetricResponse)(nil), // 3: yats.CreateMetricResponse + (*CreateEventRequest)(nil), // 4: yats.CreateEventRequest + (*CreateEventResponse)(nil), // 5: yats.CreateEventResponse +} +var file_yats_grpc_proto_depIdxs = []int32{ + 0, // 0: yats.CreateMetricRequest.metric:type_name -> yats.Metric + 0, // 1: yats.CreateMetricResponse.metric:type_name -> yats.Metric + 1, // 2: yats.CreateEventRequest.event:type_name -> yats.Event + 1, // 3: yats.CreateEventResponse.event:type_name -> yats.Event + 2, // 4: yats.YatsGrpcService.CreateMetric:input_type -> yats.CreateMetricRequest + 4, // 5: yats.YatsGrpcService.CreateEvent:input_type -> yats.CreateEventRequest + 3, // 6: yats.YatsGrpcService.CreateMetric:output_type -> yats.CreateMetricResponse + 5, // 7: yats.YatsGrpcService.CreateEvent:output_type -> yats.CreateEventResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_yats_grpc_proto_init() } +func file_yats_grpc_proto_init() { + if File_yats_grpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_yats_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Metric); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yats_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yats_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateMetricRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yats_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateMetricResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yats_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yats_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEventResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_yats_grpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_yats_grpc_proto_goTypes, + DependencyIndexes: file_yats_grpc_proto_depIdxs, + MessageInfos: file_yats_grpc_proto_msgTypes, + }.Build() + File_yats_grpc_proto = out.File + file_yats_grpc_proto_rawDesc = nil + file_yats_grpc_proto_goTypes = nil + file_yats_grpc_proto_depIdxs = nil +} diff --git a/yats-connector-java/pom.xml b/yats-connector-java/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5663426185744fb4e6f050e5a09f0f28f76402a --- /dev/null +++ b/yats-connector-java/pom.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>com.kevwe.yats</groupId> + <artifactId>yats-protobuf</artifactId> + <version>0.0.1</version> + <packaging>jar</packaging> + + <properties> + <maven.compiler.source>17</maven.compiler.source> + <maven.compiler.target>17</maven.compiler.target> + <grpc.version>1.52.0</grpc.version><!-- CURRENT_GRPC_VERSION --> + <protoc.version>3.21.7</protoc.version> + </properties> + + <!-- gRPC --> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>io.grpc</groupId> + <artifactId>grpc-bom</artifactId> + <version>${grpc.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>io.grpc</groupId> + <artifactId>grpc-protobuf</artifactId> + </dependency> + <dependency> + <groupId>io.grpc</groupId> + <artifactId>grpc-stub</artifactId> + </dependency> + <dependency> + <groupId>io.grpc</groupId> + <artifactId>grpc-services</artifactId> + </dependency> + </dependencies> + <build> + <extensions> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-ssh</artifactId> + <version>3.5.3</version> + </extension> + <extension> + <groupId>kr.motd.maven</groupId> + <artifactId>os-maven-plugin</artifactId> + <version>1.6.2</version> + </extension> + </extensions> + </build> + <distributionManagement> + <repository> + <id>${repository.id}</id> + <name>${repository.name}</name> + <url>${repository.url}</url> + </repository> + <site> + <id>${repository.id}</id> + <name>${repository.name}</name> + <url>${repository.site.url}</url> + </site> + </distributionManagement> +</project> diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventRequest.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventRequest.java new file mode 100644 index 0000000000000000000000000000000000000000..06952e8db22c4e5e0563fe69b3a858b5c49ff9f6 --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventRequest.java @@ -0,0 +1,589 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +/** + * Protobuf type {@code yats.CreateEventRequest} + */ +public final class CreateEventRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:yats.CreateEventRequest) + CreateEventRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateEventRequest.newBuilder() to construct. + private CreateEventRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CreateEventRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateEventRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.CreateEventRequest.class, com.kevwe.yats.protobuf.CreateEventRequest.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + private com.kevwe.yats.protobuf.Event event_; + /** + * <code>.yats.Event event = 1;</code> + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + /** + * <code>.yats.Event event = 1;</code> + * @return The event. + */ + @java.lang.Override + public com.kevwe.yats.protobuf.Event getEvent() { + return event_ == null ? com.kevwe.yats.protobuf.Event.getDefaultInstance() : event_; + } + /** + * <code>.yats.Event event = 1;</code> + */ + @java.lang.Override + public com.kevwe.yats.protobuf.EventOrBuilder getEventOrBuilder() { + return event_ == null ? com.kevwe.yats.protobuf.Event.getDefaultInstance() : event_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getEvent()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kevwe.yats.protobuf.CreateEventRequest)) { + return super.equals(obj); + } + com.kevwe.yats.protobuf.CreateEventRequest other = (com.kevwe.yats.protobuf.CreateEventRequest) obj; + + if (hasEvent() != other.hasEvent()) return false; + if (hasEvent()) { + if (!getEvent() + .equals(other.getEvent())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateEventRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kevwe.yats.protobuf.CreateEventRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code yats.CreateEventRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:yats.CreateEventRequest) + com.kevwe.yats.protobuf.CreateEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.CreateEventRequest.class, com.kevwe.yats.protobuf.CreateEventRequest.Builder.class); + } + + // Construct using com.kevwe.yats.protobuf.CreateEventRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventRequest_descriptor; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateEventRequest getDefaultInstanceForType() { + return com.kevwe.yats.protobuf.CreateEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateEventRequest build() { + com.kevwe.yats.protobuf.CreateEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateEventRequest buildPartial() { + com.kevwe.yats.protobuf.CreateEventRequest result = new com.kevwe.yats.protobuf.CreateEventRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kevwe.yats.protobuf.CreateEventRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null + ? event_ + : eventBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kevwe.yats.protobuf.CreateEventRequest) { + return mergeFrom((com.kevwe.yats.protobuf.CreateEventRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kevwe.yats.protobuf.CreateEventRequest other) { + if (other == com.kevwe.yats.protobuf.CreateEventRequest.getDefaultInstance()) return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getEventFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.kevwe.yats.protobuf.Event event_; + private com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Event, com.kevwe.yats.protobuf.Event.Builder, com.kevwe.yats.protobuf.EventOrBuilder> eventBuilder_; + /** + * <code>.yats.Event event = 1;</code> + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.yats.Event event = 1;</code> + * @return The event. + */ + public com.kevwe.yats.protobuf.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? com.kevwe.yats.protobuf.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + /** + * <code>.yats.Event event = 1;</code> + */ + public Builder setEvent(com.kevwe.yats.protobuf.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + } else { + eventBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Event event = 1;</code> + */ + public Builder setEvent( + com.kevwe.yats.protobuf.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Event event = 1;</code> + */ + public Builder mergeEvent(com.kevwe.yats.protobuf.Event value) { + if (eventBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + event_ != null && + event_ != com.kevwe.yats.protobuf.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); + } else { + event_ = value; + } + } else { + eventBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Event event = 1;</code> + */ + public Builder clearEvent() { + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.yats.Event event = 1;</code> + */ + public com.kevwe.yats.protobuf.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + /** + * <code>.yats.Event event = 1;</code> + */ + public com.kevwe.yats.protobuf.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? + com.kevwe.yats.protobuf.Event.getDefaultInstance() : event_; + } + } + /** + * <code>.yats.Event event = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Event, com.kevwe.yats.protobuf.Event.Builder, com.kevwe.yats.protobuf.EventOrBuilder> + getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Event, com.kevwe.yats.protobuf.Event.Builder, com.kevwe.yats.protobuf.EventOrBuilder>( + getEvent(), + getParentForChildren(), + isClean()); + event_ = null; + } + return eventBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:yats.CreateEventRequest) + } + + // @@protoc_insertion_point(class_scope:yats.CreateEventRequest) + private static final com.kevwe.yats.protobuf.CreateEventRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kevwe.yats.protobuf.CreateEventRequest(); + } + + public static com.kevwe.yats.protobuf.CreateEventRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CreateEventRequest> + PARSER = new com.google.protobuf.AbstractParser<CreateEventRequest>() { + @java.lang.Override + public CreateEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CreateEventRequest> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CreateEventRequest> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateEventRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventRequestOrBuilder.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventRequestOrBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..f70d4c57a2ff0294d7b195f902afbdd4963c8e47 --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventRequestOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +public interface CreateEventRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:yats.CreateEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.yats.Event event = 1;</code> + * @return Whether the event field is set. + */ + boolean hasEvent(); + /** + * <code>.yats.Event event = 1;</code> + * @return The event. + */ + com.kevwe.yats.protobuf.Event getEvent(); + /** + * <code>.yats.Event event = 1;</code> + */ + com.kevwe.yats.protobuf.EventOrBuilder getEventOrBuilder(); +} diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventResponse.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventResponse.java new file mode 100644 index 0000000000000000000000000000000000000000..7576d56e4af0ad81a845edeb36800778bf3450fe --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventResponse.java @@ -0,0 +1,589 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +/** + * Protobuf type {@code yats.CreateEventResponse} + */ +public final class CreateEventResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:yats.CreateEventResponse) + CreateEventResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateEventResponse.newBuilder() to construct. + private CreateEventResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CreateEventResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateEventResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.CreateEventResponse.class, com.kevwe.yats.protobuf.CreateEventResponse.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + private com.kevwe.yats.protobuf.Event event_; + /** + * <code>.yats.Event event = 1;</code> + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + /** + * <code>.yats.Event event = 1;</code> + * @return The event. + */ + @java.lang.Override + public com.kevwe.yats.protobuf.Event getEvent() { + return event_ == null ? com.kevwe.yats.protobuf.Event.getDefaultInstance() : event_; + } + /** + * <code>.yats.Event event = 1;</code> + */ + @java.lang.Override + public com.kevwe.yats.protobuf.EventOrBuilder getEventOrBuilder() { + return event_ == null ? com.kevwe.yats.protobuf.Event.getDefaultInstance() : event_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getEvent()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kevwe.yats.protobuf.CreateEventResponse)) { + return super.equals(obj); + } + com.kevwe.yats.protobuf.CreateEventResponse other = (com.kevwe.yats.protobuf.CreateEventResponse) obj; + + if (hasEvent() != other.hasEvent()) return false; + if (hasEvent()) { + if (!getEvent() + .equals(other.getEvent())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateEventResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kevwe.yats.protobuf.CreateEventResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code yats.CreateEventResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:yats.CreateEventResponse) + com.kevwe.yats.protobuf.CreateEventResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.CreateEventResponse.class, com.kevwe.yats.protobuf.CreateEventResponse.Builder.class); + } + + // Construct using com.kevwe.yats.protobuf.CreateEventResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateEventResponse_descriptor; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateEventResponse getDefaultInstanceForType() { + return com.kevwe.yats.protobuf.CreateEventResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateEventResponse build() { + com.kevwe.yats.protobuf.CreateEventResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateEventResponse buildPartial() { + com.kevwe.yats.protobuf.CreateEventResponse result = new com.kevwe.yats.protobuf.CreateEventResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kevwe.yats.protobuf.CreateEventResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null + ? event_ + : eventBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kevwe.yats.protobuf.CreateEventResponse) { + return mergeFrom((com.kevwe.yats.protobuf.CreateEventResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kevwe.yats.protobuf.CreateEventResponse other) { + if (other == com.kevwe.yats.protobuf.CreateEventResponse.getDefaultInstance()) return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getEventFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.kevwe.yats.protobuf.Event event_; + private com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Event, com.kevwe.yats.protobuf.Event.Builder, com.kevwe.yats.protobuf.EventOrBuilder> eventBuilder_; + /** + * <code>.yats.Event event = 1;</code> + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.yats.Event event = 1;</code> + * @return The event. + */ + public com.kevwe.yats.protobuf.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? com.kevwe.yats.protobuf.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + /** + * <code>.yats.Event event = 1;</code> + */ + public Builder setEvent(com.kevwe.yats.protobuf.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + } else { + eventBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Event event = 1;</code> + */ + public Builder setEvent( + com.kevwe.yats.protobuf.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Event event = 1;</code> + */ + public Builder mergeEvent(com.kevwe.yats.protobuf.Event value) { + if (eventBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + event_ != null && + event_ != com.kevwe.yats.protobuf.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); + } else { + event_ = value; + } + } else { + eventBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Event event = 1;</code> + */ + public Builder clearEvent() { + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.yats.Event event = 1;</code> + */ + public com.kevwe.yats.protobuf.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + /** + * <code>.yats.Event event = 1;</code> + */ + public com.kevwe.yats.protobuf.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? + com.kevwe.yats.protobuf.Event.getDefaultInstance() : event_; + } + } + /** + * <code>.yats.Event event = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Event, com.kevwe.yats.protobuf.Event.Builder, com.kevwe.yats.protobuf.EventOrBuilder> + getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Event, com.kevwe.yats.protobuf.Event.Builder, com.kevwe.yats.protobuf.EventOrBuilder>( + getEvent(), + getParentForChildren(), + isClean()); + event_ = null; + } + return eventBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:yats.CreateEventResponse) + } + + // @@protoc_insertion_point(class_scope:yats.CreateEventResponse) + private static final com.kevwe.yats.protobuf.CreateEventResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kevwe.yats.protobuf.CreateEventResponse(); + } + + public static com.kevwe.yats.protobuf.CreateEventResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CreateEventResponse> + PARSER = new com.google.protobuf.AbstractParser<CreateEventResponse>() { + @java.lang.Override + public CreateEventResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CreateEventResponse> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CreateEventResponse> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateEventResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventResponseOrBuilder.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventResponseOrBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..8b2606c2dc3e1766bb89c66b8af7268286e30a1a --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventResponseOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +public interface CreateEventResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:yats.CreateEventResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.yats.Event event = 1;</code> + * @return Whether the event field is set. + */ + boolean hasEvent(); + /** + * <code>.yats.Event event = 1;</code> + * @return The event. + */ + com.kevwe.yats.protobuf.Event getEvent(); + /** + * <code>.yats.Event event = 1;</code> + */ + com.kevwe.yats.protobuf.EventOrBuilder getEventOrBuilder(); +} diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricRequest.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricRequest.java new file mode 100644 index 0000000000000000000000000000000000000000..77ece679fd73fbe515fa141ea76d7274455972f3 --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricRequest.java @@ -0,0 +1,589 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +/** + * Protobuf type {@code yats.CreateMetricRequest} + */ +public final class CreateMetricRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:yats.CreateMetricRequest) + CreateMetricRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateMetricRequest.newBuilder() to construct. + private CreateMetricRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CreateMetricRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateMetricRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.CreateMetricRequest.class, com.kevwe.yats.protobuf.CreateMetricRequest.Builder.class); + } + + public static final int METRIC_FIELD_NUMBER = 1; + private com.kevwe.yats.protobuf.Metric metric_; + /** + * <code>.yats.Metric metric = 1;</code> + * @return Whether the metric field is set. + */ + @java.lang.Override + public boolean hasMetric() { + return metric_ != null; + } + /** + * <code>.yats.Metric metric = 1;</code> + * @return The metric. + */ + @java.lang.Override + public com.kevwe.yats.protobuf.Metric getMetric() { + return metric_ == null ? com.kevwe.yats.protobuf.Metric.getDefaultInstance() : metric_; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + @java.lang.Override + public com.kevwe.yats.protobuf.MetricOrBuilder getMetricOrBuilder() { + return metric_ == null ? com.kevwe.yats.protobuf.Metric.getDefaultInstance() : metric_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (metric_ != null) { + output.writeMessage(1, getMetric()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (metric_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMetric()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kevwe.yats.protobuf.CreateMetricRequest)) { + return super.equals(obj); + } + com.kevwe.yats.protobuf.CreateMetricRequest other = (com.kevwe.yats.protobuf.CreateMetricRequest) obj; + + if (hasMetric() != other.hasMetric()) return false; + if (hasMetric()) { + if (!getMetric() + .equals(other.getMetric())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMetric()) { + hash = (37 * hash) + METRIC_FIELD_NUMBER; + hash = (53 * hash) + getMetric().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateMetricRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kevwe.yats.protobuf.CreateMetricRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code yats.CreateMetricRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:yats.CreateMetricRequest) + com.kevwe.yats.protobuf.CreateMetricRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.CreateMetricRequest.class, com.kevwe.yats.protobuf.CreateMetricRequest.Builder.class); + } + + // Construct using com.kevwe.yats.protobuf.CreateMetricRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metric_ = null; + if (metricBuilder_ != null) { + metricBuilder_.dispose(); + metricBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricRequest_descriptor; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateMetricRequest getDefaultInstanceForType() { + return com.kevwe.yats.protobuf.CreateMetricRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateMetricRequest build() { + com.kevwe.yats.protobuf.CreateMetricRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateMetricRequest buildPartial() { + com.kevwe.yats.protobuf.CreateMetricRequest result = new com.kevwe.yats.protobuf.CreateMetricRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kevwe.yats.protobuf.CreateMetricRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metric_ = metricBuilder_ == null + ? metric_ + : metricBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kevwe.yats.protobuf.CreateMetricRequest) { + return mergeFrom((com.kevwe.yats.protobuf.CreateMetricRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kevwe.yats.protobuf.CreateMetricRequest other) { + if (other == com.kevwe.yats.protobuf.CreateMetricRequest.getDefaultInstance()) return this; + if (other.hasMetric()) { + mergeMetric(other.getMetric()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getMetricFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.kevwe.yats.protobuf.Metric metric_; + private com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Metric, com.kevwe.yats.protobuf.Metric.Builder, com.kevwe.yats.protobuf.MetricOrBuilder> metricBuilder_; + /** + * <code>.yats.Metric metric = 1;</code> + * @return Whether the metric field is set. + */ + public boolean hasMetric() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.yats.Metric metric = 1;</code> + * @return The metric. + */ + public com.kevwe.yats.protobuf.Metric getMetric() { + if (metricBuilder_ == null) { + return metric_ == null ? com.kevwe.yats.protobuf.Metric.getDefaultInstance() : metric_; + } else { + return metricBuilder_.getMessage(); + } + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public Builder setMetric(com.kevwe.yats.protobuf.Metric value) { + if (metricBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metric_ = value; + } else { + metricBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public Builder setMetric( + com.kevwe.yats.protobuf.Metric.Builder builderForValue) { + if (metricBuilder_ == null) { + metric_ = builderForValue.build(); + } else { + metricBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public Builder mergeMetric(com.kevwe.yats.protobuf.Metric value) { + if (metricBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + metric_ != null && + metric_ != com.kevwe.yats.protobuf.Metric.getDefaultInstance()) { + getMetricBuilder().mergeFrom(value); + } else { + metric_ = value; + } + } else { + metricBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public Builder clearMetric() { + bitField0_ = (bitField0_ & ~0x00000001); + metric_ = null; + if (metricBuilder_ != null) { + metricBuilder_.dispose(); + metricBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public com.kevwe.yats.protobuf.Metric.Builder getMetricBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getMetricFieldBuilder().getBuilder(); + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public com.kevwe.yats.protobuf.MetricOrBuilder getMetricOrBuilder() { + if (metricBuilder_ != null) { + return metricBuilder_.getMessageOrBuilder(); + } else { + return metric_ == null ? + com.kevwe.yats.protobuf.Metric.getDefaultInstance() : metric_; + } + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Metric, com.kevwe.yats.protobuf.Metric.Builder, com.kevwe.yats.protobuf.MetricOrBuilder> + getMetricFieldBuilder() { + if (metricBuilder_ == null) { + metricBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Metric, com.kevwe.yats.protobuf.Metric.Builder, com.kevwe.yats.protobuf.MetricOrBuilder>( + getMetric(), + getParentForChildren(), + isClean()); + metric_ = null; + } + return metricBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:yats.CreateMetricRequest) + } + + // @@protoc_insertion_point(class_scope:yats.CreateMetricRequest) + private static final com.kevwe.yats.protobuf.CreateMetricRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kevwe.yats.protobuf.CreateMetricRequest(); + } + + public static com.kevwe.yats.protobuf.CreateMetricRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CreateMetricRequest> + PARSER = new com.google.protobuf.AbstractParser<CreateMetricRequest>() { + @java.lang.Override + public CreateMetricRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CreateMetricRequest> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CreateMetricRequest> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateMetricRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricRequestOrBuilder.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricRequestOrBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..fa317f65702f6b84aa86b42ba99531dc6a408793 --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricRequestOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +public interface CreateMetricRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:yats.CreateMetricRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.yats.Metric metric = 1;</code> + * @return Whether the metric field is set. + */ + boolean hasMetric(); + /** + * <code>.yats.Metric metric = 1;</code> + * @return The metric. + */ + com.kevwe.yats.protobuf.Metric getMetric(); + /** + * <code>.yats.Metric metric = 1;</code> + */ + com.kevwe.yats.protobuf.MetricOrBuilder getMetricOrBuilder(); +} diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricResponse.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricResponse.java new file mode 100644 index 0000000000000000000000000000000000000000..3e0b5579e1425fa2e731ff587bbd8b43c616b4a0 --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricResponse.java @@ -0,0 +1,589 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +/** + * Protobuf type {@code yats.CreateMetricResponse} + */ +public final class CreateMetricResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:yats.CreateMetricResponse) + CreateMetricResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateMetricResponse.newBuilder() to construct. + private CreateMetricResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CreateMetricResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateMetricResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.CreateMetricResponse.class, com.kevwe.yats.protobuf.CreateMetricResponse.Builder.class); + } + + public static final int METRIC_FIELD_NUMBER = 1; + private com.kevwe.yats.protobuf.Metric metric_; + /** + * <code>.yats.Metric metric = 1;</code> + * @return Whether the metric field is set. + */ + @java.lang.Override + public boolean hasMetric() { + return metric_ != null; + } + /** + * <code>.yats.Metric metric = 1;</code> + * @return The metric. + */ + @java.lang.Override + public com.kevwe.yats.protobuf.Metric getMetric() { + return metric_ == null ? com.kevwe.yats.protobuf.Metric.getDefaultInstance() : metric_; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + @java.lang.Override + public com.kevwe.yats.protobuf.MetricOrBuilder getMetricOrBuilder() { + return metric_ == null ? com.kevwe.yats.protobuf.Metric.getDefaultInstance() : metric_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (metric_ != null) { + output.writeMessage(1, getMetric()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (metric_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMetric()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kevwe.yats.protobuf.CreateMetricResponse)) { + return super.equals(obj); + } + com.kevwe.yats.protobuf.CreateMetricResponse other = (com.kevwe.yats.protobuf.CreateMetricResponse) obj; + + if (hasMetric() != other.hasMetric()) return false; + if (hasMetric()) { + if (!getMetric() + .equals(other.getMetric())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMetric()) { + hash = (37 * hash) + METRIC_FIELD_NUMBER; + hash = (53 * hash) + getMetric().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.CreateMetricResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kevwe.yats.protobuf.CreateMetricResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code yats.CreateMetricResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:yats.CreateMetricResponse) + com.kevwe.yats.protobuf.CreateMetricResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.CreateMetricResponse.class, com.kevwe.yats.protobuf.CreateMetricResponse.Builder.class); + } + + // Construct using com.kevwe.yats.protobuf.CreateMetricResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metric_ = null; + if (metricBuilder_ != null) { + metricBuilder_.dispose(); + metricBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_CreateMetricResponse_descriptor; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateMetricResponse getDefaultInstanceForType() { + return com.kevwe.yats.protobuf.CreateMetricResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateMetricResponse build() { + com.kevwe.yats.protobuf.CreateMetricResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateMetricResponse buildPartial() { + com.kevwe.yats.protobuf.CreateMetricResponse result = new com.kevwe.yats.protobuf.CreateMetricResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kevwe.yats.protobuf.CreateMetricResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metric_ = metricBuilder_ == null + ? metric_ + : metricBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kevwe.yats.protobuf.CreateMetricResponse) { + return mergeFrom((com.kevwe.yats.protobuf.CreateMetricResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kevwe.yats.protobuf.CreateMetricResponse other) { + if (other == com.kevwe.yats.protobuf.CreateMetricResponse.getDefaultInstance()) return this; + if (other.hasMetric()) { + mergeMetric(other.getMetric()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getMetricFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.kevwe.yats.protobuf.Metric metric_; + private com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Metric, com.kevwe.yats.protobuf.Metric.Builder, com.kevwe.yats.protobuf.MetricOrBuilder> metricBuilder_; + /** + * <code>.yats.Metric metric = 1;</code> + * @return Whether the metric field is set. + */ + public boolean hasMetric() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.yats.Metric metric = 1;</code> + * @return The metric. + */ + public com.kevwe.yats.protobuf.Metric getMetric() { + if (metricBuilder_ == null) { + return metric_ == null ? com.kevwe.yats.protobuf.Metric.getDefaultInstance() : metric_; + } else { + return metricBuilder_.getMessage(); + } + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public Builder setMetric(com.kevwe.yats.protobuf.Metric value) { + if (metricBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metric_ = value; + } else { + metricBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public Builder setMetric( + com.kevwe.yats.protobuf.Metric.Builder builderForValue) { + if (metricBuilder_ == null) { + metric_ = builderForValue.build(); + } else { + metricBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public Builder mergeMetric(com.kevwe.yats.protobuf.Metric value) { + if (metricBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + metric_ != null && + metric_ != com.kevwe.yats.protobuf.Metric.getDefaultInstance()) { + getMetricBuilder().mergeFrom(value); + } else { + metric_ = value; + } + } else { + metricBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public Builder clearMetric() { + bitField0_ = (bitField0_ & ~0x00000001); + metric_ = null; + if (metricBuilder_ != null) { + metricBuilder_.dispose(); + metricBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public com.kevwe.yats.protobuf.Metric.Builder getMetricBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getMetricFieldBuilder().getBuilder(); + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public com.kevwe.yats.protobuf.MetricOrBuilder getMetricOrBuilder() { + if (metricBuilder_ != null) { + return metricBuilder_.getMessageOrBuilder(); + } else { + return metric_ == null ? + com.kevwe.yats.protobuf.Metric.getDefaultInstance() : metric_; + } + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Metric, com.kevwe.yats.protobuf.Metric.Builder, com.kevwe.yats.protobuf.MetricOrBuilder> + getMetricFieldBuilder() { + if (metricBuilder_ == null) { + metricBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.kevwe.yats.protobuf.Metric, com.kevwe.yats.protobuf.Metric.Builder, com.kevwe.yats.protobuf.MetricOrBuilder>( + getMetric(), + getParentForChildren(), + isClean()); + metric_ = null; + } + return metricBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:yats.CreateMetricResponse) + } + + // @@protoc_insertion_point(class_scope:yats.CreateMetricResponse) + private static final com.kevwe.yats.protobuf.CreateMetricResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kevwe.yats.protobuf.CreateMetricResponse(); + } + + public static com.kevwe.yats.protobuf.CreateMetricResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CreateMetricResponse> + PARSER = new com.google.protobuf.AbstractParser<CreateMetricResponse>() { + @java.lang.Override + public CreateMetricResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CreateMetricResponse> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CreateMetricResponse> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.CreateMetricResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricResponseOrBuilder.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricResponseOrBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..721ef62180db01bd4fa83472d10a668199ca051b --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricResponseOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +public interface CreateMetricResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:yats.CreateMetricResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.yats.Metric metric = 1;</code> + * @return Whether the metric field is set. + */ + boolean hasMetric(); + /** + * <code>.yats.Metric metric = 1;</code> + * @return The metric. + */ + com.kevwe.yats.protobuf.Metric getMetric(); + /** + * <code>.yats.Metric metric = 1;</code> + */ + com.kevwe.yats.protobuf.MetricOrBuilder getMetricOrBuilder(); +} diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/Event.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/Event.java new file mode 100644 index 0000000000000000000000000000000000000000..c586d228f97e7010658ef953862b0dd4c8d435d4 --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/Event.java @@ -0,0 +1,747 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +/** + * Protobuf type {@code yats.Event} + */ +public final class Event extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:yats.Event) + EventOrBuilder { +private static final long serialVersionUID = 0L; + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private Event() { + idClient_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Event(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.Event.class, com.kevwe.yats.protobuf.Event.Builder.class); + } + + public static final int ID_CLIENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object idClient_ = ""; + /** + * <code>string id_client = 1;</code> + * @return The idClient. + */ + @java.lang.Override + public java.lang.String getIdClient() { + java.lang.Object ref = idClient_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idClient_ = s; + return s; + } + } + /** + * <code>string id_client = 1;</code> + * @return The bytes for idClient. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdClientBytes() { + java.lang.Object ref = idClient_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + idClient_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETIME_FIELD_NUMBER = 2; + private long etime_ = 0L; + /** + * <code>int64 etime = 2;</code> + * @return The etime. + */ + @java.lang.Override + public long getEtime() { + return etime_; + } + + public static final int NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * <code>string name = 3;</code> + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * <code>string name = 3;</code> + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idClient_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, idClient_); + } + if (etime_ != 0L) { + output.writeInt64(2, etime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idClient_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, idClient_); + } + if (etime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, etime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kevwe.yats.protobuf.Event)) { + return super.equals(obj); + } + com.kevwe.yats.protobuf.Event other = (com.kevwe.yats.protobuf.Event) obj; + + if (!getIdClient() + .equals(other.getIdClient())) return false; + if (getEtime() + != other.getEtime()) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_CLIENT_FIELD_NUMBER; + hash = (53 * hash) + getIdClient().hashCode(); + hash = (37 * hash) + ETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEtime()); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kevwe.yats.protobuf.Event parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.Event parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Event parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.Event parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.Event parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.Event parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Event parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.Event parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Event parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.Event parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kevwe.yats.protobuf.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code yats.Event} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:yats.Event) + com.kevwe.yats.protobuf.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.Event.class, com.kevwe.yats.protobuf.Event.Builder.class); + } + + // Construct using com.kevwe.yats.protobuf.Event.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + idClient_ = ""; + etime_ = 0L; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Event_descriptor; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.Event getDefaultInstanceForType() { + return com.kevwe.yats.protobuf.Event.getDefaultInstance(); + } + + @java.lang.Override + public com.kevwe.yats.protobuf.Event build() { + com.kevwe.yats.protobuf.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.Event buildPartial() { + com.kevwe.yats.protobuf.Event result = new com.kevwe.yats.protobuf.Event(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kevwe.yats.protobuf.Event result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.idClient_ = idClient_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etime_ = etime_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kevwe.yats.protobuf.Event) { + return mergeFrom((com.kevwe.yats.protobuf.Event)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kevwe.yats.protobuf.Event other) { + if (other == com.kevwe.yats.protobuf.Event.getDefaultInstance()) return this; + if (!other.getIdClient().isEmpty()) { + idClient_ = other.idClient_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getEtime() != 0L) { + setEtime(other.getEtime()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + idClient_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + etime_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object idClient_ = ""; + /** + * <code>string id_client = 1;</code> + * @return The idClient. + */ + public java.lang.String getIdClient() { + java.lang.Object ref = idClient_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idClient_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string id_client = 1;</code> + * @return The bytes for idClient. + */ + public com.google.protobuf.ByteString + getIdClientBytes() { + java.lang.Object ref = idClient_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + idClient_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string id_client = 1;</code> + * @param value The idClient to set. + * @return This builder for chaining. + */ + public Builder setIdClient( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idClient_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string id_client = 1;</code> + * @return This builder for chaining. + */ + public Builder clearIdClient() { + idClient_ = getDefaultInstance().getIdClient(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string id_client = 1;</code> + * @param value The bytes for idClient to set. + * @return This builder for chaining. + */ + public Builder setIdClientBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idClient_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long etime_ ; + /** + * <code>int64 etime = 2;</code> + * @return The etime. + */ + @java.lang.Override + public long getEtime() { + return etime_; + } + /** + * <code>int64 etime = 2;</code> + * @param value The etime to set. + * @return This builder for chaining. + */ + public Builder setEtime(long value) { + + etime_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>int64 etime = 2;</code> + * @return This builder for chaining. + */ + public Builder clearEtime() { + bitField0_ = (bitField0_ & ~0x00000002); + etime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * <code>string name = 3;</code> + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string name = 3;</code> + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string name = 3;</code> + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string name = 3;</code> + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string name = 3;</code> + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:yats.Event) + } + + // @@protoc_insertion_point(class_scope:yats.Event) + private static final com.kevwe.yats.protobuf.Event DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kevwe.yats.protobuf.Event(); + } + + public static com.kevwe.yats.protobuf.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Event> + PARSER = new com.google.protobuf.AbstractParser<Event>() { + @java.lang.Override + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<Event> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<Event> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/EventOrBuilder.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/EventOrBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..2bc40a54b820a60a219d5a350a53d655c0afa773 --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/EventOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +public interface EventOrBuilder extends + // @@protoc_insertion_point(interface_extends:yats.Event) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string id_client = 1;</code> + * @return The idClient. + */ + java.lang.String getIdClient(); + /** + * <code>string id_client = 1;</code> + * @return The bytes for idClient. + */ + com.google.protobuf.ByteString + getIdClientBytes(); + + /** + * <code>int64 etime = 2;</code> + * @return The etime. + */ + long getEtime(); + + /** + * <code>string name = 3;</code> + * @return The name. + */ + java.lang.String getName(); + /** + * <code>string name = 3;</code> + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/Metric.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/Metric.java new file mode 100644 index 0000000000000000000000000000000000000000..3d37c28140f5685d5bd1774ca68ca72b33a5c8d0 --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/Metric.java @@ -0,0 +1,883 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +/** + * Protobuf type {@code yats.Metric} + */ +public final class Metric extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:yats.Metric) + MetricOrBuilder { +private static final long serialVersionUID = 0L; + // Use Metric.newBuilder() to construct. + private Metric(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private Metric() { + idClient_ = ""; + name_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Metric(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.Metric.class, com.kevwe.yats.protobuf.Metric.Builder.class); + } + + public static final int ID_CLIENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object idClient_ = ""; + /** + * <code>string id_client = 1;</code> + * @return The idClient. + */ + @java.lang.Override + public java.lang.String getIdClient() { + java.lang.Object ref = idClient_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idClient_ = s; + return s; + } + } + /** + * <code>string id_client = 1;</code> + * @return The bytes for idClient. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdClientBytes() { + java.lang.Object ref = idClient_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + idClient_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MTIME_FIELD_NUMBER = 2; + private long mtime_ = 0L; + /** + * <code>int64 mtime = 2;</code> + * @return The mtime. + */ + @java.lang.Override + public long getMtime() { + return mtime_; + } + + public static final int NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * <code>string name = 3;</code> + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * <code>string name = 3;</code> + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * <code>string value = 4;</code> + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + * <code>string value = 4;</code> + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idClient_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, idClient_); + } + if (mtime_ != 0L) { + output.writeInt64(2, mtime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idClient_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, idClient_); + } + if (mtime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, mtime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kevwe.yats.protobuf.Metric)) { + return super.equals(obj); + } + com.kevwe.yats.protobuf.Metric other = (com.kevwe.yats.protobuf.Metric) obj; + + if (!getIdClient() + .equals(other.getIdClient())) return false; + if (getMtime() + != other.getMtime()) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_CLIENT_FIELD_NUMBER; + hash = (53 * hash) + getIdClient().hashCode(); + hash = (37 * hash) + MTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMtime()); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kevwe.yats.protobuf.Metric parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.Metric parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Metric parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.Metric parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Metric parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kevwe.yats.protobuf.Metric parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Metric parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.Metric parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Metric parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.Metric parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kevwe.yats.protobuf.Metric parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.kevwe.yats.protobuf.Metric parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kevwe.yats.protobuf.Metric prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code yats.Metric} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:yats.Metric) + com.kevwe.yats.protobuf.MetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kevwe.yats.protobuf.Metric.class, com.kevwe.yats.protobuf.Metric.Builder.class); + } + + // Construct using com.kevwe.yats.protobuf.Metric.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + idClient_ = ""; + mtime_ = 0L; + name_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kevwe.yats.protobuf.YatsGrpc.internal_static_yats_Metric_descriptor; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.Metric getDefaultInstanceForType() { + return com.kevwe.yats.protobuf.Metric.getDefaultInstance(); + } + + @java.lang.Override + public com.kevwe.yats.protobuf.Metric build() { + com.kevwe.yats.protobuf.Metric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.Metric buildPartial() { + com.kevwe.yats.protobuf.Metric result = new com.kevwe.yats.protobuf.Metric(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kevwe.yats.protobuf.Metric result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.idClient_ = idClient_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mtime_ = mtime_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kevwe.yats.protobuf.Metric) { + return mergeFrom((com.kevwe.yats.protobuf.Metric)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kevwe.yats.protobuf.Metric other) { + if (other == com.kevwe.yats.protobuf.Metric.getDefaultInstance()) return this; + if (!other.getIdClient().isEmpty()) { + idClient_ = other.idClient_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getMtime() != 0L) { + setMtime(other.getMtime()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + idClient_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + mtime_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object idClient_ = ""; + /** + * <code>string id_client = 1;</code> + * @return The idClient. + */ + public java.lang.String getIdClient() { + java.lang.Object ref = idClient_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idClient_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string id_client = 1;</code> + * @return The bytes for idClient. + */ + public com.google.protobuf.ByteString + getIdClientBytes() { + java.lang.Object ref = idClient_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + idClient_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string id_client = 1;</code> + * @param value The idClient to set. + * @return This builder for chaining. + */ + public Builder setIdClient( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idClient_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string id_client = 1;</code> + * @return This builder for chaining. + */ + public Builder clearIdClient() { + idClient_ = getDefaultInstance().getIdClient(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string id_client = 1;</code> + * @param value The bytes for idClient to set. + * @return This builder for chaining. + */ + public Builder setIdClientBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idClient_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long mtime_ ; + /** + * <code>int64 mtime = 2;</code> + * @return The mtime. + */ + @java.lang.Override + public long getMtime() { + return mtime_; + } + /** + * <code>int64 mtime = 2;</code> + * @param value The mtime to set. + * @return This builder for chaining. + */ + public Builder setMtime(long value) { + + mtime_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>int64 mtime = 2;</code> + * @return This builder for chaining. + */ + public Builder clearMtime() { + bitField0_ = (bitField0_ & ~0x00000002); + mtime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * <code>string name = 3;</code> + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string name = 3;</code> + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string name = 3;</code> + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string name = 3;</code> + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string name = 3;</code> + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * <code>string value = 4;</code> + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string value = 4;</code> + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string value = 4;</code> + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string value = 4;</code> + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string value = 4;</code> + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:yats.Metric) + } + + // @@protoc_insertion_point(class_scope:yats.Metric) + private static final com.kevwe.yats.protobuf.Metric DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kevwe.yats.protobuf.Metric(); + } + + public static com.kevwe.yats.protobuf.Metric getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Metric> + PARSER = new com.google.protobuf.AbstractParser<Metric>() { + @java.lang.Override + public Metric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<Metric> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<Metric> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kevwe.yats.protobuf.Metric getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/MetricOrBuilder.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/MetricOrBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..b53e047514ba52e4639d1ced363b8b8d2967588e --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/MetricOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +public interface MetricOrBuilder extends + // @@protoc_insertion_point(interface_extends:yats.Metric) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string id_client = 1;</code> + * @return The idClient. + */ + java.lang.String getIdClient(); + /** + * <code>string id_client = 1;</code> + * @return The bytes for idClient. + */ + com.google.protobuf.ByteString + getIdClientBytes(); + + /** + * <code>int64 mtime = 2;</code> + * @return The mtime. + */ + long getMtime(); + + /** + * <code>string name = 3;</code> + * @return The name. + */ + java.lang.String getName(); + /** + * <code>string name = 3;</code> + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * <code>string value = 4;</code> + * @return The value. + */ + java.lang.String getValue(); + /** + * <code>string value = 4;</code> + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); +} diff --git a/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/YatsGrpc.java b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/YatsGrpc.java new file mode 100644 index 0000000000000000000000000000000000000000..3c69dc8c4d223fdc0da996db9369b7106d745767 --- /dev/null +++ b/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/YatsGrpc.java @@ -0,0 +1,115 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +public final class YatsGrpc { + private YatsGrpc() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_yats_Metric_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_yats_Metric_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_yats_Event_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_yats_Event_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_yats_CreateMetricRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_yats_CreateMetricRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_yats_CreateMetricResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_yats_CreateMetricResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_yats_CreateEventRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_yats_CreateEventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_yats_CreateEventResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_yats_CreateEventResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\017yats-grpc.proto\022\004yats\"G\n\006Metric\022\021\n\tid_" + + "client\030\001 \001(\t\022\r\n\005mtime\030\002 \001(\003\022\014\n\004name\030\003 \001(" + + "\t\022\r\n\005value\030\004 \001(\t\"7\n\005Event\022\021\n\tid_client\030\001" + + " \001(\t\022\r\n\005etime\030\002 \001(\003\022\014\n\004name\030\003 \001(\t\"3\n\023Cre" + + "ateMetricRequest\022\034\n\006metric\030\001 \001(\0132\014.yats." + + "Metric\"4\n\024CreateMetricResponse\022\034\n\006metric" + + "\030\001 \001(\0132\014.yats.Metric\"0\n\022CreateEventReque" + + "st\022\032\n\005event\030\001 \001(\0132\013.yats.Event\"1\n\023Create" + + "EventResponse\022\032\n\005event\030\001 \001(\0132\013.yats.Even" + + "t2\234\001\n\017YatsGrpcService\022E\n\014CreateMetric\022\031." + + "yats.CreateMetricRequest\032\032.yats.CreateMe" + + "tricResponse\022B\n\013CreateEvent\022\030.yats.Creat" + + "eEventRequest\032\031.yats.CreateEventResponse" + + "B\'\n\027com.kevwe.yats.protobufP\001Z\nyats/prot" + + "ob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_yats_Metric_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_yats_Metric_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_yats_Metric_descriptor, + new java.lang.String[] { "IdClient", "Mtime", "Name", "Value", }); + internal_static_yats_Event_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_yats_Event_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_yats_Event_descriptor, + new java.lang.String[] { "IdClient", "Etime", "Name", }); + internal_static_yats_CreateMetricRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_yats_CreateMetricRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_yats_CreateMetricRequest_descriptor, + new java.lang.String[] { "Metric", }); + internal_static_yats_CreateMetricResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_yats_CreateMetricResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_yats_CreateMetricResponse_descriptor, + new java.lang.String[] { "Metric", }); + internal_static_yats_CreateEventRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_yats_CreateEventRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_yats_CreateEventRequest_descriptor, + new java.lang.String[] { "Event", }); + internal_static_yats_CreateEventResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_yats_CreateEventResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_yats_CreateEventResponse_descriptor, + new java.lang.String[] { "Event", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequest$1.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequest$1.class new file mode 100644 index 0000000000000000000000000000000000000000..d066e260b45fa2b2fd232a558353d950331bbf86 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequest$1.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequest$Builder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequest$Builder.class new file mode 100644 index 0000000000000000000000000000000000000000..74addaf196290632e5e2f043b5d640dfc654e0e2 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequest$Builder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequest.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequest.class new file mode 100644 index 0000000000000000000000000000000000000000..9e9567f470b835091f0319ac361025c1c45649e7 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequest.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequestOrBuilder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequestOrBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..28450ac1bf910ef1d3e10ddbd5d1ede3dfa246b1 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventRequestOrBuilder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponse$1.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponse$1.class new file mode 100644 index 0000000000000000000000000000000000000000..68d026b00f7b7ed51997179f219f3ceaaa5bfb5d Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponse$1.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponse$Builder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponse$Builder.class new file mode 100644 index 0000000000000000000000000000000000000000..ac2db07230525f0cadd3ac6b3dc4d41c46007425 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponse$Builder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponse.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponse.class new file mode 100644 index 0000000000000000000000000000000000000000..20a37a2b685c4b18de2463c501f66c9a2c4312cb Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponse.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponseOrBuilder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponseOrBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..14cd80fdb701514f620452c0bf9fc811853d397c Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateEventResponseOrBuilder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequest$1.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequest$1.class new file mode 100644 index 0000000000000000000000000000000000000000..f9077c906868460448220d7e07a6b3ba95dcaff5 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequest$1.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequest$Builder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequest$Builder.class new file mode 100644 index 0000000000000000000000000000000000000000..3742f60373243cd03b72da9100c145b6aa8419d7 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequest$Builder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequest.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequest.class new file mode 100644 index 0000000000000000000000000000000000000000..4176bf2731751823c2a7b609b047b87ed448fe98 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequest.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequestOrBuilder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequestOrBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..71c7412c562d7383163347a18e275fad78177bec Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricRequestOrBuilder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponse$1.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponse$1.class new file mode 100644 index 0000000000000000000000000000000000000000..e3218c727b721d9a75f291fa37b58c58cbc04128 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponse$1.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponse$Builder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponse$Builder.class new file mode 100644 index 0000000000000000000000000000000000000000..95bc88b9d3b8de99704385817c4ebf15480d657c Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponse$Builder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponse.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponse.class new file mode 100644 index 0000000000000000000000000000000000000000..4ef1a6b41d93a347ff8f2f3bca3a106602340f34 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponse.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponseOrBuilder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponseOrBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..351cbdf0df7410e8459a1c71de3efe28c22e1a1f Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/CreateMetricResponseOrBuilder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Event$1.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Event$1.class new file mode 100644 index 0000000000000000000000000000000000000000..cec5cfdcab37a19b5ab5d14ddcd25dac1264d0e4 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Event$1.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Event$Builder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Event$Builder.class new file mode 100644 index 0000000000000000000000000000000000000000..e240f62e559f4da0b4710d6595634c9f739aacbf Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Event$Builder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Event.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Event.class new file mode 100644 index 0000000000000000000000000000000000000000..e4adb6f900a32ee8388f5a96af6211b4297eb203 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Event.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/EventOrBuilder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/EventOrBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..012de4ee84cd5586099c558db73887de9f924b86 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/EventOrBuilder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Metric$1.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Metric$1.class new file mode 100644 index 0000000000000000000000000000000000000000..15080411d4f15fa78a9090000aca11b7ae623a4c Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Metric$1.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Metric$Builder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Metric$Builder.class new file mode 100644 index 0000000000000000000000000000000000000000..32779f9dd39762e6c551878cc967c2a332e00d87 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Metric$Builder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Metric.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Metric.class new file mode 100644 index 0000000000000000000000000000000000000000..31691ddbb95c6b62fc3751dffc7599fc76ec4f22 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/Metric.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/MetricOrBuilder.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/MetricOrBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..a2af8a5603f6882d41291657191bd5fb4074dcb3 Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/MetricOrBuilder.class differ diff --git a/yats-connector-java/target/classes/com/kevwe/yats/protobuf/YatsGrpc.class b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/YatsGrpc.class new file mode 100644 index 0000000000000000000000000000000000000000..1ae970e644e1ba80560e8d4bc07c4453b9e26ecd Binary files /dev/null and b/yats-connector-java/target/classes/com/kevwe/yats/protobuf/YatsGrpc.class differ diff --git a/yats-connector-java/target/maven-archiver/pom.properties b/yats-connector-java/target/maven-archiver/pom.properties new file mode 100644 index 0000000000000000000000000000000000000000..379bc7c14a68995c300f82ec0f04197674265868 --- /dev/null +++ b/yats-connector-java/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Wed Jul 10 23:15:04 BST 2024 +groupId=com.kevwe.yats +artifactId=yats-protobuf +version=0.0.1 diff --git a/yats-connector-java/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/yats-connector-java/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000000000000000000000000000000000000..5e50b4d4dcd925b5fea0c921120c43d02c5d515e --- /dev/null +++ b/yats-connector-java/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,25 @@ +com/kevwe/yats/protobuf/CreateEventRequestOrBuilder.class +com/kevwe/yats/protobuf/CreateMetricRequest.class +com/kevwe/yats/protobuf/CreateMetricRequest$1.class +com/kevwe/yats/protobuf/YatsGrpc.class +com/kevwe/yats/protobuf/Event$1.class +com/kevwe/yats/protobuf/CreateMetricResponse.class +com/kevwe/yats/protobuf/Metric$1.class +com/kevwe/yats/protobuf/CreateMetricResponseOrBuilder.class +com/kevwe/yats/protobuf/CreateMetricRequestOrBuilder.class +com/kevwe/yats/protobuf/MetricOrBuilder.class +com/kevwe/yats/protobuf/CreateMetricResponse$1.class +com/kevwe/yats/protobuf/EventOrBuilder.class +com/kevwe/yats/protobuf/CreateMetricResponse$Builder.class +com/kevwe/yats/protobuf/CreateEventRequest$1.class +com/kevwe/yats/protobuf/CreateEventResponse$1.class +com/kevwe/yats/protobuf/CreateEventRequest.class +com/kevwe/yats/protobuf/Event.class +com/kevwe/yats/protobuf/CreateEventResponseOrBuilder.class +com/kevwe/yats/protobuf/Metric$Builder.class +com/kevwe/yats/protobuf/Event$Builder.class +com/kevwe/yats/protobuf/CreateEventRequest$Builder.class +com/kevwe/yats/protobuf/CreateEventResponse.class +com/kevwe/yats/protobuf/CreateMetricRequest$Builder.class +com/kevwe/yats/protobuf/CreateEventResponse$Builder.class +com/kevwe/yats/protobuf/Metric.class diff --git a/yats-connector-java/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/yats-connector-java/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000000000000000000000000000000000000..64b3bfd88f9bf71f65eb42004b9ca62f988b2785 --- /dev/null +++ b/yats-connector-java/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,13 @@ +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricRequest.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricResponseOrBuilder.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/Event.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/YatsGrpc.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/MetricOrBuilder.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventRequest.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventResponseOrBuilder.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricRequestOrBuilder.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventRequestOrBuilder.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/Metric.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateEventResponse.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/EventOrBuilder.java +/home/paolo/dev/simple/yats-connectors/yats-connector-java/src/main/java/com/kevwe/yats/protobuf/CreateMetricResponse.java diff --git a/yats-connector-java/target/yats-protobuf-0.0.1.jar b/yats-connector-java/target/yats-protobuf-0.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..754517d2ae1b205ddf68f0c262775bda69a30e48 Binary files /dev/null and b/yats-connector-java/target/yats-protobuf-0.0.1.jar differ diff --git a/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateEventRequestKt.kt b/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateEventRequestKt.kt new file mode 100644 index 0000000000000000000000000000000000000000..1dfe139836b43eea8b21f545f5a757d737bfea5c --- /dev/null +++ b/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateEventRequestKt.kt @@ -0,0 +1,56 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +@kotlin.jvm.JvmName("-initializecreateEventRequest") +public inline fun createEventRequest(block: com.kevwe.yats.protobuf.CreateEventRequestKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateEventRequest = + com.kevwe.yats.protobuf.CreateEventRequestKt.Dsl._create(com.kevwe.yats.protobuf.CreateEventRequest.newBuilder()).apply { block() }._build() +public object CreateEventRequestKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.kevwe.yats.protobuf.CreateEventRequest.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.kevwe.yats.protobuf.CreateEventRequest.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.kevwe.yats.protobuf.CreateEventRequest = _builder.build() + + /** + * <code>.yats.Event event = 1;</code> + */ + public var event: com.kevwe.yats.protobuf.Event + @JvmName("getEvent") + get() = _builder.getEvent() + @JvmName("setEvent") + set(value) { + _builder.setEvent(value) + } + /** + * <code>.yats.Event event = 1;</code> + */ + public fun clearEvent() { + _builder.clearEvent() + } + /** + * <code>.yats.Event event = 1;</code> + * @return Whether the event field is set. + */ + public fun hasEvent(): kotlin.Boolean { + return _builder.hasEvent() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.kevwe.yats.protobuf.CreateEventRequest.copy(block: com.kevwe.yats.protobuf.CreateEventRequestKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateEventRequest = + com.kevwe.yats.protobuf.CreateEventRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val com.kevwe.yats.protobuf.CreateEventRequestOrBuilder.eventOrNull: com.kevwe.yats.protobuf.Event? + get() = if (hasEvent()) getEvent() else null + diff --git a/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateEventResponseKt.kt b/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateEventResponseKt.kt new file mode 100644 index 0000000000000000000000000000000000000000..161e11ca6c5f452b087544ef751226e54931824a --- /dev/null +++ b/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateEventResponseKt.kt @@ -0,0 +1,56 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +@kotlin.jvm.JvmName("-initializecreateEventResponse") +public inline fun createEventResponse(block: com.kevwe.yats.protobuf.CreateEventResponseKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateEventResponse = + com.kevwe.yats.protobuf.CreateEventResponseKt.Dsl._create(com.kevwe.yats.protobuf.CreateEventResponse.newBuilder()).apply { block() }._build() +public object CreateEventResponseKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.kevwe.yats.protobuf.CreateEventResponse.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.kevwe.yats.protobuf.CreateEventResponse.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.kevwe.yats.protobuf.CreateEventResponse = _builder.build() + + /** + * <code>.yats.Event event = 1;</code> + */ + public var event: com.kevwe.yats.protobuf.Event + @JvmName("getEvent") + get() = _builder.getEvent() + @JvmName("setEvent") + set(value) { + _builder.setEvent(value) + } + /** + * <code>.yats.Event event = 1;</code> + */ + public fun clearEvent() { + _builder.clearEvent() + } + /** + * <code>.yats.Event event = 1;</code> + * @return Whether the event field is set. + */ + public fun hasEvent(): kotlin.Boolean { + return _builder.hasEvent() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.kevwe.yats.protobuf.CreateEventResponse.copy(block: com.kevwe.yats.protobuf.CreateEventResponseKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateEventResponse = + com.kevwe.yats.protobuf.CreateEventResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val com.kevwe.yats.protobuf.CreateEventResponseOrBuilder.eventOrNull: com.kevwe.yats.protobuf.Event? + get() = if (hasEvent()) getEvent() else null + diff --git a/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateMetricRequestKt.kt b/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateMetricRequestKt.kt new file mode 100644 index 0000000000000000000000000000000000000000..bda05c9bb3810fede875dc176243ed475d7a30d7 --- /dev/null +++ b/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateMetricRequestKt.kt @@ -0,0 +1,56 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +@kotlin.jvm.JvmName("-initializecreateMetricRequest") +public inline fun createMetricRequest(block: com.kevwe.yats.protobuf.CreateMetricRequestKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateMetricRequest = + com.kevwe.yats.protobuf.CreateMetricRequestKt.Dsl._create(com.kevwe.yats.protobuf.CreateMetricRequest.newBuilder()).apply { block() }._build() +public object CreateMetricRequestKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.kevwe.yats.protobuf.CreateMetricRequest.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.kevwe.yats.protobuf.CreateMetricRequest.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.kevwe.yats.protobuf.CreateMetricRequest = _builder.build() + + /** + * <code>.yats.Metric metric = 1;</code> + */ + public var metric: com.kevwe.yats.protobuf.Metric + @JvmName("getMetric") + get() = _builder.getMetric() + @JvmName("setMetric") + set(value) { + _builder.setMetric(value) + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public fun clearMetric() { + _builder.clearMetric() + } + /** + * <code>.yats.Metric metric = 1;</code> + * @return Whether the metric field is set. + */ + public fun hasMetric(): kotlin.Boolean { + return _builder.hasMetric() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.kevwe.yats.protobuf.CreateMetricRequest.copy(block: com.kevwe.yats.protobuf.CreateMetricRequestKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateMetricRequest = + com.kevwe.yats.protobuf.CreateMetricRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val com.kevwe.yats.protobuf.CreateMetricRequestOrBuilder.metricOrNull: com.kevwe.yats.protobuf.Metric? + get() = if (hasMetric()) getMetric() else null + diff --git a/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateMetricResponseKt.kt b/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateMetricResponseKt.kt new file mode 100644 index 0000000000000000000000000000000000000000..be604cc1b6f9cc22d70f25c4dd6562e18d7f1d83 --- /dev/null +++ b/yats-connector-kotlin/com/kevwe/yats/protobuf/CreateMetricResponseKt.kt @@ -0,0 +1,56 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +@kotlin.jvm.JvmName("-initializecreateMetricResponse") +public inline fun createMetricResponse(block: com.kevwe.yats.protobuf.CreateMetricResponseKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateMetricResponse = + com.kevwe.yats.protobuf.CreateMetricResponseKt.Dsl._create(com.kevwe.yats.protobuf.CreateMetricResponse.newBuilder()).apply { block() }._build() +public object CreateMetricResponseKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.kevwe.yats.protobuf.CreateMetricResponse.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.kevwe.yats.protobuf.CreateMetricResponse.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.kevwe.yats.protobuf.CreateMetricResponse = _builder.build() + + /** + * <code>.yats.Metric metric = 1;</code> + */ + public var metric: com.kevwe.yats.protobuf.Metric + @JvmName("getMetric") + get() = _builder.getMetric() + @JvmName("setMetric") + set(value) { + _builder.setMetric(value) + } + /** + * <code>.yats.Metric metric = 1;</code> + */ + public fun clearMetric() { + _builder.clearMetric() + } + /** + * <code>.yats.Metric metric = 1;</code> + * @return Whether the metric field is set. + */ + public fun hasMetric(): kotlin.Boolean { + return _builder.hasMetric() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.kevwe.yats.protobuf.CreateMetricResponse.copy(block: com.kevwe.yats.protobuf.CreateMetricResponseKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateMetricResponse = + com.kevwe.yats.protobuf.CreateMetricResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val com.kevwe.yats.protobuf.CreateMetricResponseOrBuilder.metricOrNull: com.kevwe.yats.protobuf.Metric? + get() = if (hasMetric()) getMetric() else null + diff --git a/yats-connector-kotlin/com/kevwe/yats/protobuf/EventKt.kt b/yats-connector-kotlin/com/kevwe/yats/protobuf/EventKt.kt new file mode 100644 index 0000000000000000000000000000000000000000..a74f9461d6b09e6360a44becdffaaea7b270bdf4 --- /dev/null +++ b/yats-connector-kotlin/com/kevwe/yats/protobuf/EventKt.kt @@ -0,0 +1,80 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +@kotlin.jvm.JvmName("-initializeevent") +public inline fun event(block: com.kevwe.yats.protobuf.EventKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.Event = + com.kevwe.yats.protobuf.EventKt.Dsl._create(com.kevwe.yats.protobuf.Event.newBuilder()).apply { block() }._build() +public object EventKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.kevwe.yats.protobuf.Event.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.kevwe.yats.protobuf.Event.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.kevwe.yats.protobuf.Event = _builder.build() + + /** + * <code>string id_client = 1;</code> + */ + public var idClient: kotlin.String + @JvmName("getIdClient") + get() = _builder.getIdClient() + @JvmName("setIdClient") + set(value) { + _builder.setIdClient(value) + } + /** + * <code>string id_client = 1;</code> + */ + public fun clearIdClient() { + _builder.clearIdClient() + } + + /** + * <code>int64 etime = 2;</code> + */ + public var etime: kotlin.Long + @JvmName("getEtime") + get() = _builder.getEtime() + @JvmName("setEtime") + set(value) { + _builder.setEtime(value) + } + /** + * <code>int64 etime = 2;</code> + */ + public fun clearEtime() { + _builder.clearEtime() + } + + /** + * <code>string name = 3;</code> + */ + public var name: kotlin.String + @JvmName("getName") + get() = _builder.getName() + @JvmName("setName") + set(value) { + _builder.setName(value) + } + /** + * <code>string name = 3;</code> + */ + public fun clearName() { + _builder.clearName() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.kevwe.yats.protobuf.Event.copy(block: com.kevwe.yats.protobuf.EventKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.Event = + com.kevwe.yats.protobuf.EventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/yats-connector-kotlin/com/kevwe/yats/protobuf/MetricKt.kt b/yats-connector-kotlin/com/kevwe/yats/protobuf/MetricKt.kt new file mode 100644 index 0000000000000000000000000000000000000000..53188ad8cd743543c4641cac439c3ff921bae9a2 --- /dev/null +++ b/yats-connector-kotlin/com/kevwe/yats/protobuf/MetricKt.kt @@ -0,0 +1,97 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +package com.kevwe.yats.protobuf; + +@kotlin.jvm.JvmName("-initializemetric") +public inline fun metric(block: com.kevwe.yats.protobuf.MetricKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.Metric = + com.kevwe.yats.protobuf.MetricKt.Dsl._create(com.kevwe.yats.protobuf.Metric.newBuilder()).apply { block() }._build() +public object MetricKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.kevwe.yats.protobuf.Metric.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.kevwe.yats.protobuf.Metric.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.kevwe.yats.protobuf.Metric = _builder.build() + + /** + * <code>string id_client = 1;</code> + */ + public var idClient: kotlin.String + @JvmName("getIdClient") + get() = _builder.getIdClient() + @JvmName("setIdClient") + set(value) { + _builder.setIdClient(value) + } + /** + * <code>string id_client = 1;</code> + */ + public fun clearIdClient() { + _builder.clearIdClient() + } + + /** + * <code>int64 mtime = 2;</code> + */ + public var mtime: kotlin.Long + @JvmName("getMtime") + get() = _builder.getMtime() + @JvmName("setMtime") + set(value) { + _builder.setMtime(value) + } + /** + * <code>int64 mtime = 2;</code> + */ + public fun clearMtime() { + _builder.clearMtime() + } + + /** + * <code>string name = 3;</code> + */ + public var name: kotlin.String + @JvmName("getName") + get() = _builder.getName() + @JvmName("setName") + set(value) { + _builder.setName(value) + } + /** + * <code>string name = 3;</code> + */ + public fun clearName() { + _builder.clearName() + } + + /** + * <code>string value = 4;</code> + */ + public var value: kotlin.String + @JvmName("getValue") + get() = _builder.getValue() + @JvmName("setValue") + set(value) { + _builder.setValue(value) + } + /** + * <code>string value = 4;</code> + */ + public fun clearValue() { + _builder.clearValue() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.kevwe.yats.protobuf.Metric.copy(block: com.kevwe.yats.protobuf.MetricKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.Metric = + com.kevwe.yats.protobuf.MetricKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/yats-connector-kotlin/com/kevwe/yats/protobuf/YatsGrpcKt.kt b/yats-connector-kotlin/com/kevwe/yats/protobuf/YatsGrpcKt.kt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 Binary files /dev/null and b/yats-connector-kotlin/com/kevwe/yats/protobuf/YatsGrpcKt.kt differ diff --git a/yats-connector-objc/YatsGrpc.pbobjc.h b/yats-connector-objc/YatsGrpc.pbobjc.h new file mode 100644 index 0000000000000000000000000000000000000000..aa5d91c632417863d30a871e2a522bf6584d7099 --- /dev/null +++ b/yats-connector-objc/YatsGrpc.pbobjc.h @@ -0,0 +1,151 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import <Protobuf/GPBProtocolBuffers.h> +#else + #import "GPBProtocolBuffers.h" +#endif + +#if GOOGLE_PROTOBUF_OBJC_VERSION < 30004 +#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. +#endif +#if 30004 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION +#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. +#endif + +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +CF_EXTERN_C_BEGIN + +@class Event; +@class Metric; + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - YatsGrpcRoot + +/** + * Exposes the extension registry for this file. + * + * The base class provides: + * @code + * + (GPBExtensionRegistry *)extensionRegistry; + * @endcode + * which is a @c GPBExtensionRegistry that includes all the extensions defined by + * this file and all files that it depends on. + **/ +GPB_FINAL @interface YatsGrpcRoot : GPBRootObject +@end + +#pragma mark - Metric + +typedef GPB_ENUM(Metric_FieldNumber) { + Metric_FieldNumber_IdClient = 1, + Metric_FieldNumber_Mtime = 2, + Metric_FieldNumber_Name = 3, + Metric_FieldNumber_Value = 4, +}; + +GPB_FINAL @interface Metric : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *idClient; + +@property(nonatomic, readwrite) int64_t mtime; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *value; + +@end + +#pragma mark - Event + +typedef GPB_ENUM(Event_FieldNumber) { + Event_FieldNumber_IdClient = 1, + Event_FieldNumber_Etime = 2, + Event_FieldNumber_Name = 3, +}; + +GPB_FINAL @interface Event : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *idClient; + +@property(nonatomic, readwrite) int64_t etime; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; + +@end + +#pragma mark - CreateMetricRequest + +typedef GPB_ENUM(CreateMetricRequest_FieldNumber) { + CreateMetricRequest_FieldNumber_Metric = 1, +}; + +GPB_FINAL @interface CreateMetricRequest : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) Metric *metric; +/** Test to see if @c metric has been set. */ +@property(nonatomic, readwrite) BOOL hasMetric; + +@end + +#pragma mark - CreateMetricResponse + +typedef GPB_ENUM(CreateMetricResponse_FieldNumber) { + CreateMetricResponse_FieldNumber_Metric = 1, +}; + +GPB_FINAL @interface CreateMetricResponse : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) Metric *metric; +/** Test to see if @c metric has been set. */ +@property(nonatomic, readwrite) BOOL hasMetric; + +@end + +#pragma mark - CreateEventRequest + +typedef GPB_ENUM(CreateEventRequest_FieldNumber) { + CreateEventRequest_FieldNumber_Event = 1, +}; + +GPB_FINAL @interface CreateEventRequest : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) Event *event; +/** Test to see if @c event has been set. */ +@property(nonatomic, readwrite) BOOL hasEvent; + +@end + +#pragma mark - CreateEventResponse + +typedef GPB_ENUM(CreateEventResponse_FieldNumber) { + CreateEventResponse_FieldNumber_Event = 1, +}; + +GPB_FINAL @interface CreateEventResponse : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) Event *event; +/** Test to see if @c event has been set. */ +@property(nonatomic, readwrite) BOOL hasEvent; + +@end + +NS_ASSUME_NONNULL_END + +CF_EXTERN_C_END + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/yats-connector-objc/YatsGrpc.pbobjc.m b/yats-connector-objc/YatsGrpc.pbobjc.m new file mode 100644 index 0000000000000000000000000000000000000000..0083137b0f3545ee9c548e5329003572b809f43e --- /dev/null +++ b/yats-connector-objc/YatsGrpc.pbobjc.m @@ -0,0 +1,381 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: yats-grpc.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h> +#else + #import "GPBProtocolBuffers_RuntimeSupport.h" +#endif + +#import "YatsGrpc.pbobjc.h" +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#pragma mark - Objective C Class declarations +// Forward declarations of Objective C classes that we can use as +// static values in struct initializers. +// We don't use [Foo class] because it is not a static value. +GPBObjCClassDeclaration(Event); +GPBObjCClassDeclaration(Metric); + +#pragma mark - YatsGrpcRoot + +@implementation YatsGrpcRoot + +// No extensions in the file and no imports, so no need to generate +// +extensionRegistry. + +@end + +#pragma mark - YatsGrpcRoot_FileDescriptor + +static GPBFileDescriptor *YatsGrpcRoot_FileDescriptor(void) { + // This is called by +initialize so there is no need to worry + // about thread safety of the singleton. + static GPBFileDescriptor *descriptor = NULL; + if (!descriptor) { + GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"yats" + syntax:GPBFileSyntaxProto3]; + } + return descriptor; +} + +#pragma mark - Metric + +@implementation Metric + +@dynamic idClient; +@dynamic mtime; +@dynamic name; +@dynamic value; + +typedef struct Metric__storage_ { + uint32_t _has_storage_[1]; + NSString *idClient; + NSString *name; + NSString *value; + int64_t mtime; +} Metric__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "idClient", + .dataTypeSpecific.clazz = Nil, + .number = Metric_FieldNumber_IdClient, + .hasIndex = 0, + .offset = (uint32_t)offsetof(Metric__storage_, idClient), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + { + .name = "mtime", + .dataTypeSpecific.clazz = Nil, + .number = Metric_FieldNumber_Mtime, + .hasIndex = 1, + .offset = (uint32_t)offsetof(Metric__storage_, mtime), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeInt64, + }, + { + .name = "name", + .dataTypeSpecific.clazz = Nil, + .number = Metric_FieldNumber_Name, + .hasIndex = 2, + .offset = (uint32_t)offsetof(Metric__storage_, name), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + { + .name = "value", + .dataTypeSpecific.clazz = Nil, + .number = Metric_FieldNumber_Value, + .hasIndex = 3, + .offset = (uint32_t)offsetof(Metric__storage_, value), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[Metric class] + rootClass:[YatsGrpcRoot class] + file:YatsGrpcRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(Metric__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - Event + +@implementation Event + +@dynamic idClient; +@dynamic etime; +@dynamic name; + +typedef struct Event__storage_ { + uint32_t _has_storage_[1]; + NSString *idClient; + NSString *name; + int64_t etime; +} Event__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "idClient", + .dataTypeSpecific.clazz = Nil, + .number = Event_FieldNumber_IdClient, + .hasIndex = 0, + .offset = (uint32_t)offsetof(Event__storage_, idClient), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + { + .name = "etime", + .dataTypeSpecific.clazz = Nil, + .number = Event_FieldNumber_Etime, + .hasIndex = 1, + .offset = (uint32_t)offsetof(Event__storage_, etime), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeInt64, + }, + { + .name = "name", + .dataTypeSpecific.clazz = Nil, + .number = Event_FieldNumber_Name, + .hasIndex = 2, + .offset = (uint32_t)offsetof(Event__storage_, name), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[Event class] + rootClass:[YatsGrpcRoot class] + file:YatsGrpcRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(Event__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - CreateMetricRequest + +@implementation CreateMetricRequest + +@dynamic hasMetric, metric; + +typedef struct CreateMetricRequest__storage_ { + uint32_t _has_storage_[1]; + Metric *metric; +} CreateMetricRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "metric", + .dataTypeSpecific.clazz = GPBObjCClass(Metric), + .number = CreateMetricRequest_FieldNumber_Metric, + .hasIndex = 0, + .offset = (uint32_t)offsetof(CreateMetricRequest__storage_, metric), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[CreateMetricRequest class] + rootClass:[YatsGrpcRoot class] + file:YatsGrpcRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(CreateMetricRequest__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - CreateMetricResponse + +@implementation CreateMetricResponse + +@dynamic hasMetric, metric; + +typedef struct CreateMetricResponse__storage_ { + uint32_t _has_storage_[1]; + Metric *metric; +} CreateMetricResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "metric", + .dataTypeSpecific.clazz = GPBObjCClass(Metric), + .number = CreateMetricResponse_FieldNumber_Metric, + .hasIndex = 0, + .offset = (uint32_t)offsetof(CreateMetricResponse__storage_, metric), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[CreateMetricResponse class] + rootClass:[YatsGrpcRoot class] + file:YatsGrpcRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(CreateMetricResponse__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - CreateEventRequest + +@implementation CreateEventRequest + +@dynamic hasEvent, event; + +typedef struct CreateEventRequest__storage_ { + uint32_t _has_storage_[1]; + Event *event; +} CreateEventRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "event", + .dataTypeSpecific.clazz = GPBObjCClass(Event), + .number = CreateEventRequest_FieldNumber_Event, + .hasIndex = 0, + .offset = (uint32_t)offsetof(CreateEventRequest__storage_, event), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[CreateEventRequest class] + rootClass:[YatsGrpcRoot class] + file:YatsGrpcRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(CreateEventRequest__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - CreateEventResponse + +@implementation CreateEventResponse + +@dynamic hasEvent, event; + +typedef struct CreateEventResponse__storage_ { + uint32_t _has_storage_[1]; + Event *event; +} CreateEventResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "event", + .dataTypeSpecific.clazz = GPBObjCClass(Event), + .number = CreateEventResponse_FieldNumber_Event, + .hasIndex = 0, + .offset = (uint32_t)offsetof(CreateEventResponse__storage_, event), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[CreateEventResponse class] + rootClass:[YatsGrpcRoot class] + file:YatsGrpcRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(CreateEventResponse__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/yats-connector-php/GPBMetadata/YatsGrpc.php b/yats-connector-php/GPBMetadata/YatsGrpc.php new file mode 100644 index 0000000000000000000000000000000000000000..9032e2e4ab995f9b68d9c6fc041c2e9fd0ed080c --- /dev/null +++ b/yats-connector-php/GPBMetadata/YatsGrpc.php @@ -0,0 +1,48 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: yats-grpc.proto + +namespace GPBMetadata; + +class YatsGrpc +{ + public static $is_initialized = false; + + public static function initOnce() { + $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); + + if (static::$is_initialized == true) { + return; + } + $pool->internalAddGeneratedFile( + ' +¹ +yats-grpc.protoyats"G +Metric + id_client ( +mtime ( +name ( +value ( "7 +Event + id_client ( +etime ( +name ( "3 +CreateMetricRequest +metric (2.yats.Metric"4 +CreateMetricResponse +metric (2.yats.Metric"0 +CreateEventRequest +event (2.yats.Event"1 +CreateEventResponse +event (2.yats.Event2œ +YatsGrpcServiceE +CreateMetric.yats.CreateMetricRequest.yats.CreateMetricResponseB +CreateEvent.yats.CreateEventRequest.yats.CreateEventResponseB\' +com.kevwe.yats.protobufPZ +yats/protobproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/yats-connector-php/Yats/CreateEventRequest.php b/yats-connector-php/Yats/CreateEventRequest.php new file mode 100644 index 0000000000000000000000000000000000000000..ee304232a25395095d271e39823d731f0107d118 --- /dev/null +++ b/yats-connector-php/Yats/CreateEventRequest.php @@ -0,0 +1,68 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: yats-grpc.proto + +namespace Yats; + +use Google\Protobuf\Internal\GPBType; +use Google\Protobuf\Internal\RepeatedField; +use Google\Protobuf\Internal\GPBUtil; + +/** + * Generated from protobuf message <code>yats.CreateEventRequest</code> + */ +class CreateEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field <code>.yats.Event event = 1;</code> + */ + protected $event = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Yats\Event $event + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\YatsGrpc::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field <code>.yats.Event event = 1;</code> + * @return \Yats\Event|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Generated from protobuf field <code>.yats.Event event = 1;</code> + * @param \Yats\Event $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Yats\Event::class); + $this->event = $var; + + return $this; + } + +} + diff --git a/yats-connector-php/Yats/CreateEventResponse.php b/yats-connector-php/Yats/CreateEventResponse.php new file mode 100644 index 0000000000000000000000000000000000000000..4495de3b2ec50f05117a0b7f622e58bea4516da4 --- /dev/null +++ b/yats-connector-php/Yats/CreateEventResponse.php @@ -0,0 +1,68 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: yats-grpc.proto + +namespace Yats; + +use Google\Protobuf\Internal\GPBType; +use Google\Protobuf\Internal\RepeatedField; +use Google\Protobuf\Internal\GPBUtil; + +/** + * Generated from protobuf message <code>yats.CreateEventResponse</code> + */ +class CreateEventResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field <code>.yats.Event event = 1;</code> + */ + protected $event = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Yats\Event $event + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\YatsGrpc::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field <code>.yats.Event event = 1;</code> + * @return \Yats\Event|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Generated from protobuf field <code>.yats.Event event = 1;</code> + * @param \Yats\Event $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Yats\Event::class); + $this->event = $var; + + return $this; + } + +} + diff --git a/yats-connector-php/Yats/CreateMetricRequest.php b/yats-connector-php/Yats/CreateMetricRequest.php new file mode 100644 index 0000000000000000000000000000000000000000..acc3c63862ccef4dc0d6d33d559f6dcec334d01f --- /dev/null +++ b/yats-connector-php/Yats/CreateMetricRequest.php @@ -0,0 +1,68 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: yats-grpc.proto + +namespace Yats; + +use Google\Protobuf\Internal\GPBType; +use Google\Protobuf\Internal\RepeatedField; +use Google\Protobuf\Internal\GPBUtil; + +/** + * Generated from protobuf message <code>yats.CreateMetricRequest</code> + */ +class CreateMetricRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field <code>.yats.Metric metric = 1;</code> + */ + protected $metric = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Yats\Metric $metric + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\YatsGrpc::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field <code>.yats.Metric metric = 1;</code> + * @return \Yats\Metric|null + */ + public function getMetric() + { + return $this->metric; + } + + public function hasMetric() + { + return isset($this->metric); + } + + public function clearMetric() + { + unset($this->metric); + } + + /** + * Generated from protobuf field <code>.yats.Metric metric = 1;</code> + * @param \Yats\Metric $var + * @return $this + */ + public function setMetric($var) + { + GPBUtil::checkMessage($var, \Yats\Metric::class); + $this->metric = $var; + + return $this; + } + +} + diff --git a/yats-connector-php/Yats/CreateMetricResponse.php b/yats-connector-php/Yats/CreateMetricResponse.php new file mode 100644 index 0000000000000000000000000000000000000000..02fc69db92492bd0fb2e0ea7920a0b7d041547e9 --- /dev/null +++ b/yats-connector-php/Yats/CreateMetricResponse.php @@ -0,0 +1,68 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: yats-grpc.proto + +namespace Yats; + +use Google\Protobuf\Internal\GPBType; +use Google\Protobuf\Internal\RepeatedField; +use Google\Protobuf\Internal\GPBUtil; + +/** + * Generated from protobuf message <code>yats.CreateMetricResponse</code> + */ +class CreateMetricResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field <code>.yats.Metric metric = 1;</code> + */ + protected $metric = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Yats\Metric $metric + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\YatsGrpc::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field <code>.yats.Metric metric = 1;</code> + * @return \Yats\Metric|null + */ + public function getMetric() + { + return $this->metric; + } + + public function hasMetric() + { + return isset($this->metric); + } + + public function clearMetric() + { + unset($this->metric); + } + + /** + * Generated from protobuf field <code>.yats.Metric metric = 1;</code> + * @param \Yats\Metric $var + * @return $this + */ + public function setMetric($var) + { + GPBUtil::checkMessage($var, \Yats\Metric::class); + $this->metric = $var; + + return $this; + } + +} + diff --git a/yats-connector-php/Yats/Event.php b/yats-connector-php/Yats/Event.php new file mode 100644 index 0000000000000000000000000000000000000000..e436eef95324a9aec91b5bd378c0de1e6376108c --- /dev/null +++ b/yats-connector-php/Yats/Event.php @@ -0,0 +1,112 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: yats-grpc.proto + +namespace Yats; + +use Google\Protobuf\Internal\GPBType; +use Google\Protobuf\Internal\RepeatedField; +use Google\Protobuf\Internal\GPBUtil; + +/** + * Generated from protobuf message <code>yats.Event</code> + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field <code>string id_client = 1;</code> + */ + protected $id_client = ''; + /** + * Generated from protobuf field <code>int64 etime = 2;</code> + */ + protected $etime = 0; + /** + * Generated from protobuf field <code>string name = 3;</code> + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id_client + * @type int|string $etime + * @type string $name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\YatsGrpc::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field <code>string id_client = 1;</code> + * @return string + */ + public function getIdClient() + { + return $this->id_client; + } + + /** + * Generated from protobuf field <code>string id_client = 1;</code> + * @param string $var + * @return $this + */ + public function setIdClient($var) + { + GPBUtil::checkString($var, True); + $this->id_client = $var; + + return $this; + } + + /** + * Generated from protobuf field <code>int64 etime = 2;</code> + * @return int|string + */ + public function getEtime() + { + return $this->etime; + } + + /** + * Generated from protobuf field <code>int64 etime = 2;</code> + * @param int|string $var + * @return $this + */ + public function setEtime($var) + { + GPBUtil::checkInt64($var); + $this->etime = $var; + + return $this; + } + + /** + * Generated from protobuf field <code>string name = 3;</code> + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Generated from protobuf field <code>string name = 3;</code> + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/yats-connector-php/Yats/Metric.php b/yats-connector-php/Yats/Metric.php new file mode 100644 index 0000000000000000000000000000000000000000..c80f4006f218cc721b8b48f4d3d550205945beb0 --- /dev/null +++ b/yats-connector-php/Yats/Metric.php @@ -0,0 +1,139 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: yats-grpc.proto + +namespace Yats; + +use Google\Protobuf\Internal\GPBType; +use Google\Protobuf\Internal\RepeatedField; +use Google\Protobuf\Internal\GPBUtil; + +/** + * Generated from protobuf message <code>yats.Metric</code> + */ +class Metric extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field <code>string id_client = 1;</code> + */ + protected $id_client = ''; + /** + * Generated from protobuf field <code>int64 mtime = 2;</code> + */ + protected $mtime = 0; + /** + * Generated from protobuf field <code>string name = 3;</code> + */ + protected $name = ''; + /** + * Generated from protobuf field <code>string value = 4;</code> + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id_client + * @type int|string $mtime + * @type string $name + * @type string $value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\YatsGrpc::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field <code>string id_client = 1;</code> + * @return string + */ + public function getIdClient() + { + return $this->id_client; + } + + /** + * Generated from protobuf field <code>string id_client = 1;</code> + * @param string $var + * @return $this + */ + public function setIdClient($var) + { + GPBUtil::checkString($var, True); + $this->id_client = $var; + + return $this; + } + + /** + * Generated from protobuf field <code>int64 mtime = 2;</code> + * @return int|string + */ + public function getMtime() + { + return $this->mtime; + } + + /** + * Generated from protobuf field <code>int64 mtime = 2;</code> + * @param int|string $var + * @return $this + */ + public function setMtime($var) + { + GPBUtil::checkInt64($var); + $this->mtime = $var; + + return $this; + } + + /** + * Generated from protobuf field <code>string name = 3;</code> + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Generated from protobuf field <code>string name = 3;</code> + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Generated from protobuf field <code>string value = 4;</code> + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Generated from protobuf field <code>string value = 4;</code> + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/yats-connector-python/yats_grpc_pb2.py b/yats-connector-python/yats_grpc_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..bc3a50203f14e56fb08bd2035489d86db34b7589 --- /dev/null +++ b/yats-connector-python/yats_grpc_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: yats-grpc.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0fyats-grpc.proto\x12\x04yats\"G\n\x06Metric\x12\x11\n\tid_client\x18\x01 \x01(\t\x12\r\n\x05mtime\x18\x02 \x01(\x03\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05value\x18\x04 \x01(\t\"7\n\x05\x45vent\x12\x11\n\tid_client\x18\x01 \x01(\t\x12\r\n\x05\x65time\x18\x02 \x01(\x03\x12\x0c\n\x04name\x18\x03 \x01(\t\"3\n\x13\x43reateMetricRequest\x12\x1c\n\x06metric\x18\x01 \x01(\x0b\x32\x0c.yats.Metric\"4\n\x14\x43reateMetricResponse\x12\x1c\n\x06metric\x18\x01 \x01(\x0b\x32\x0c.yats.Metric\"0\n\x12\x43reateEventRequest\x12\x1a\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0b.yats.Event\"1\n\x13\x43reateEventResponse\x12\x1a\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0b.yats.Event2\x9c\x01\n\x0fYatsGrpcService\x12\x45\n\x0c\x43reateMetric\x12\x19.yats.CreateMetricRequest\x1a\x1a.yats.CreateMetricResponse\x12\x42\n\x0b\x43reateEvent\x12\x18.yats.CreateEventRequest\x1a\x19.yats.CreateEventResponseB\'\n\x17\x63om.kevwe.yats.protobufP\x01Z\nyats/protob\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'yats_grpc_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\027com.kevwe.yats.protobufP\001Z\nyats/proto' + _METRIC._serialized_start=25 + _METRIC._serialized_end=96 + _EVENT._serialized_start=98 + _EVENT._serialized_end=153 + _CREATEMETRICREQUEST._serialized_start=155 + _CREATEMETRICREQUEST._serialized_end=206 + _CREATEMETRICRESPONSE._serialized_start=208 + _CREATEMETRICRESPONSE._serialized_end=260 + _CREATEEVENTREQUEST._serialized_start=262 + _CREATEEVENTREQUEST._serialized_end=310 + _CREATEEVENTRESPONSE._serialized_start=312 + _CREATEEVENTRESPONSE._serialized_end=361 + _YATSGRPCSERVICE._serialized_start=364 + _YATSGRPCSERVICE._serialized_end=520 +# @@protoc_insertion_point(module_scope) diff --git a/yats-connector-ruby/yats-grpc_pb.rb b/yats-connector-ruby/yats-grpc_pb.rb new file mode 100644 index 0000000000000000000000000000000000000000..b6dab3b52084abb42da46c9d00dd39a702ee7171 --- /dev/null +++ b/yats-connector-ruby/yats-grpc_pb.rb @@ -0,0 +1,41 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: yats-grpc.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_file("yats-grpc.proto", :syntax => :proto3) do + add_message "yats.Metric" do + optional :id_client, :string, 1 + optional :mtime, :int64, 2 + optional :name, :string, 3 + optional :value, :string, 4 + end + add_message "yats.Event" do + optional :id_client, :string, 1 + optional :etime, :int64, 2 + optional :name, :string, 3 + end + add_message "yats.CreateMetricRequest" do + optional :metric, :message, 1, "yats.Metric" + end + add_message "yats.CreateMetricResponse" do + optional :metric, :message, 1, "yats.Metric" + end + add_message "yats.CreateEventRequest" do + optional :event, :message, 1, "yats.Event" + end + add_message "yats.CreateEventResponse" do + optional :event, :message, 1, "yats.Event" + end + end +end + +module Yats + Metric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("yats.Metric").msgclass + Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("yats.Event").msgclass + CreateMetricRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("yats.CreateMetricRequest").msgclass + CreateMetricResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("yats.CreateMetricResponse").msgclass + CreateEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("yats.CreateEventRequest").msgclass + CreateEventResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("yats.CreateEventResponse").msgclass +end diff --git a/yats-connector-rust/mod.rs b/yats-connector-rust/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..76fb47ce7a2a8e99a12a9c9044cab9d0e12d4eed --- /dev/null +++ b/yats-connector-rust/mod.rs @@ -0,0 +1,3 @@ +// @generated + +pub mod yats_grpc; diff --git a/yats-connector-rust/yats_grpc.rs b/yats-connector-rust/yats_grpc.rs new file mode 100644 index 0000000000000000000000000000000000000000..e4a8772d6d27dbea49c84e95d4a2f74a910e8e0a --- /dev/null +++ b/yats-connector-rust/yats_grpc.rs @@ -0,0 +1,954 @@ +// This file is generated by rust-protobuf 3.5.0. Do not edit +// .proto file is parsed by protoc --rust_out=... +// @generated + +// https://github.com/rust-lang/rust-clippy/issues/702 +#![allow(unknown_lints)] +#![allow(clippy::all)] + +#![allow(unused_attributes)] +#![cfg_attr(rustfmt, rustfmt::skip)] + +#![allow(box_pointers)] +#![allow(dead_code)] +#![allow(missing_docs)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(non_upper_case_globals)] +#![allow(trivial_casts)] +#![allow(unused_results)] +#![allow(unused_mut)] + +//! Generated file from `yats-grpc.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_5_0; + +// @@protoc_insertion_point(message:yats.Metric) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Metric { + // message fields + // @@protoc_insertion_point(field:yats.Metric.id_client) + pub id_client: ::std::string::String, + // @@protoc_insertion_point(field:yats.Metric.mtime) + pub mtime: i64, + // @@protoc_insertion_point(field:yats.Metric.name) + pub name: ::std::string::String, + // @@protoc_insertion_point(field:yats.Metric.value) + pub value: ::std::string::String, + // special fields + // @@protoc_insertion_point(special_field:yats.Metric.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a Metric { + fn default() -> &'a Metric { + <Metric as ::protobuf::Message>::default_instance() + } +} + +impl Metric { + pub fn new() -> Metric { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(4); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "id_client", + |m: &Metric| { &m.id_client }, + |m: &mut Metric| { &mut m.id_client }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "mtime", + |m: &Metric| { &m.mtime }, + |m: &mut Metric| { &mut m.mtime }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name", + |m: &Metric| { &m.name }, + |m: &mut Metric| { &mut m.name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "value", + |m: &Metric| { &m.value }, + |m: &mut Metric| { &mut m.value }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Metric>( + "Metric", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for Metric { + const NAME: &'static str = "Metric"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.id_client = is.read_string()?; + }, + 16 => { + self.mtime = is.read_int64()?; + }, + 26 => { + self.name = is.read_string()?; + }, + 34 => { + self.value = is.read_string()?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if !self.id_client.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.id_client); + } + if self.mtime != 0 { + my_size += ::protobuf::rt::int64_size(2, self.mtime); + } + if !self.name.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.name); + } + if !self.value.is_empty() { + my_size += ::protobuf::rt::string_size(4, &self.value); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.id_client.is_empty() { + os.write_string(1, &self.id_client)?; + } + if self.mtime != 0 { + os.write_int64(2, self.mtime)?; + } + if !self.name.is_empty() { + os.write_string(3, &self.name)?; + } + if !self.value.is_empty() { + os.write_string(4, &self.value)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> Metric { + Metric::new() + } + + fn clear(&mut self) { + self.id_client.clear(); + self.mtime = 0; + self.name.clear(); + self.value.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static Metric { + static instance: Metric = Metric { + id_client: ::std::string::String::new(), + mtime: 0, + name: ::std::string::String::new(), + value: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for Metric { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Metric").unwrap()).clone() + } +} + +impl ::std::fmt::Display for Metric { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for Metric { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; +} + +// @@protoc_insertion_point(message:yats.Event) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Event { + // message fields + // @@protoc_insertion_point(field:yats.Event.id_client) + pub id_client: ::std::string::String, + // @@protoc_insertion_point(field:yats.Event.etime) + pub etime: i64, + // @@protoc_insertion_point(field:yats.Event.name) + pub name: ::std::string::String, + // special fields + // @@protoc_insertion_point(special_field:yats.Event.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a Event { + fn default() -> &'a Event { + <Event as ::protobuf::Message>::default_instance() + } +} + +impl Event { + pub fn new() -> Event { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "id_client", + |m: &Event| { &m.id_client }, + |m: &mut Event| { &mut m.id_client }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "etime", + |m: &Event| { &m.etime }, + |m: &mut Event| { &mut m.etime }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name", + |m: &Event| { &m.name }, + |m: &mut Event| { &mut m.name }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Event>( + "Event", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for Event { + const NAME: &'static str = "Event"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.id_client = is.read_string()?; + }, + 16 => { + self.etime = is.read_int64()?; + }, + 26 => { + self.name = is.read_string()?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if !self.id_client.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.id_client); + } + if self.etime != 0 { + my_size += ::protobuf::rt::int64_size(2, self.etime); + } + if !self.name.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.name); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.id_client.is_empty() { + os.write_string(1, &self.id_client)?; + } + if self.etime != 0 { + os.write_int64(2, self.etime)?; + } + if !self.name.is_empty() { + os.write_string(3, &self.name)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> Event { + Event::new() + } + + fn clear(&mut self) { + self.id_client.clear(); + self.etime = 0; + self.name.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static Event { + static instance: Event = Event { + id_client: ::std::string::String::new(), + etime: 0, + name: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for Event { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Event").unwrap()).clone() + } +} + +impl ::std::fmt::Display for Event { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for Event { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; +} + +// @@protoc_insertion_point(message:yats.CreateMetricRequest) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CreateMetricRequest { + // message fields + // @@protoc_insertion_point(field:yats.CreateMetricRequest.metric) + pub metric: ::protobuf::MessageField<Metric>, + // special fields + // @@protoc_insertion_point(special_field:yats.CreateMetricRequest.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a CreateMetricRequest { + fn default() -> &'a CreateMetricRequest { + <CreateMetricRequest as ::protobuf::Message>::default_instance() + } +} + +impl CreateMetricRequest { + pub fn new() -> CreateMetricRequest { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Metric>( + "metric", + |m: &CreateMetricRequest| { &m.metric }, + |m: &mut CreateMetricRequest| { &mut m.metric }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CreateMetricRequest>( + "CreateMetricRequest", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for CreateMetricRequest { + const NAME: &'static str = "CreateMetricRequest"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.metric)?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.metric.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.metric.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> CreateMetricRequest { + CreateMetricRequest::new() + } + + fn clear(&mut self) { + self.metric.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static CreateMetricRequest { + static instance: CreateMetricRequest = CreateMetricRequest { + metric: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for CreateMetricRequest { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateMetricRequest").unwrap()).clone() + } +} + +impl ::std::fmt::Display for CreateMetricRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateMetricRequest { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; +} + +// @@protoc_insertion_point(message:yats.CreateMetricResponse) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CreateMetricResponse { + // message fields + // @@protoc_insertion_point(field:yats.CreateMetricResponse.metric) + pub metric: ::protobuf::MessageField<Metric>, + // special fields + // @@protoc_insertion_point(special_field:yats.CreateMetricResponse.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a CreateMetricResponse { + fn default() -> &'a CreateMetricResponse { + <CreateMetricResponse as ::protobuf::Message>::default_instance() + } +} + +impl CreateMetricResponse { + pub fn new() -> CreateMetricResponse { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Metric>( + "metric", + |m: &CreateMetricResponse| { &m.metric }, + |m: &mut CreateMetricResponse| { &mut m.metric }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CreateMetricResponse>( + "CreateMetricResponse", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for CreateMetricResponse { + const NAME: &'static str = "CreateMetricResponse"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.metric)?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.metric.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.metric.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> CreateMetricResponse { + CreateMetricResponse::new() + } + + fn clear(&mut self) { + self.metric.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static CreateMetricResponse { + static instance: CreateMetricResponse = CreateMetricResponse { + metric: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for CreateMetricResponse { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateMetricResponse").unwrap()).clone() + } +} + +impl ::std::fmt::Display for CreateMetricResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateMetricResponse { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; +} + +// @@protoc_insertion_point(message:yats.CreateEventRequest) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CreateEventRequest { + // message fields + // @@protoc_insertion_point(field:yats.CreateEventRequest.event) + pub event: ::protobuf::MessageField<Event>, + // special fields + // @@protoc_insertion_point(special_field:yats.CreateEventRequest.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a CreateEventRequest { + fn default() -> &'a CreateEventRequest { + <CreateEventRequest as ::protobuf::Message>::default_instance() + } +} + +impl CreateEventRequest { + pub fn new() -> CreateEventRequest { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Event>( + "event", + |m: &CreateEventRequest| { &m.event }, + |m: &mut CreateEventRequest| { &mut m.event }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CreateEventRequest>( + "CreateEventRequest", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for CreateEventRequest { + const NAME: &'static str = "CreateEventRequest"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.event)?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.event.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.event.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> CreateEventRequest { + CreateEventRequest::new() + } + + fn clear(&mut self) { + self.event.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static CreateEventRequest { + static instance: CreateEventRequest = CreateEventRequest { + event: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for CreateEventRequest { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateEventRequest").unwrap()).clone() + } +} + +impl ::std::fmt::Display for CreateEventRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateEventRequest { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; +} + +// @@protoc_insertion_point(message:yats.CreateEventResponse) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CreateEventResponse { + // message fields + // @@protoc_insertion_point(field:yats.CreateEventResponse.event) + pub event: ::protobuf::MessageField<Event>, + // special fields + // @@protoc_insertion_point(special_field:yats.CreateEventResponse.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a CreateEventResponse { + fn default() -> &'a CreateEventResponse { + <CreateEventResponse as ::protobuf::Message>::default_instance() + } +} + +impl CreateEventResponse { + pub fn new() -> CreateEventResponse { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Event>( + "event", + |m: &CreateEventResponse| { &m.event }, + |m: &mut CreateEventResponse| { &mut m.event }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CreateEventResponse>( + "CreateEventResponse", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for CreateEventResponse { + const NAME: &'static str = "CreateEventResponse"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.event)?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.event.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.event.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> CreateEventResponse { + CreateEventResponse::new() + } + + fn clear(&mut self) { + self.event.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static CreateEventResponse { + static instance: CreateEventResponse = CreateEventResponse { + event: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for CreateEventResponse { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateEventResponse").unwrap()).clone() + } +} + +impl ::std::fmt::Display for CreateEventResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateEventResponse { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; +} + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n\x0fyats-grpc.proto\x12\x04yats\"e\n\x06Metric\x12\x1b\n\tid_client\ + \x18\x01\x20\x01(\tR\x08idClient\x12\x14\n\x05mtime\x18\x02\x20\x01(\x03\ + R\x05mtime\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\x14\n\x05va\ + lue\x18\x04\x20\x01(\tR\x05value\"N\n\x05Event\x12\x1b\n\tid_client\x18\ + \x01\x20\x01(\tR\x08idClient\x12\x14\n\x05etime\x18\x02\x20\x01(\x03R\ + \x05etime\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\";\n\x13CreateMe\ + tricRequest\x12$\n\x06metric\x18\x01\x20\x01(\x0b2\x0c.yats.MetricR\x06m\ + etric\"<\n\x14CreateMetricResponse\x12$\n\x06metric\x18\x01\x20\x01(\x0b\ + 2\x0c.yats.MetricR\x06metric\"7\n\x12CreateEventRequest\x12!\n\x05event\ + \x18\x01\x20\x01(\x0b2\x0b.yats.EventR\x05event\"8\n\x13CreateEventRespo\ + nse\x12!\n\x05event\x18\x01\x20\x01(\x0b2\x0b.yats.EventR\x05event2\x9c\ + \x01\n\x0fYatsGrpcService\x12E\n\x0cCreateMetric\x12\x19.yats.CreateMetr\ + icRequest\x1a\x1a.yats.CreateMetricResponse\x12B\n\x0bCreateEvent\x12\ + \x18.yats.CreateEventRequest\x1a\x19.yats.CreateEventResponseB'\n\x17com\ + .kevwe.yats.protobufP\x01Z\nyats/protoJ\x8b\t\n\x06\x12\x04\n\01\x01\n\ + \xc4\x01\n\x01\x0c\x12\x03\n\0\x122\xb9\x01*\n\x20Yats\x20-\x20yats\n\n\ + \x20This\x20file\x20is\x20licensed\x20under\x20the\x20Affero\x20General\ + \x20Public\x20License\x20version\x203\x20or\n\x20later.\x20See\x20the\ + \x20COPYING\x20file.\n\n\x20@author\x20Paolo\x20Lulli\x20<kevwe.com>\n\ + \x20@copyright\x20Paolo\x20Lulli\x202024\n\n\x08\n\x01\x02\x12\x03\x0b\0\ + \r\n\x08\n\x01\x08\x12\x03\r\00\n\t\n\x02\x08\x01\x12\x03\r\00\n\x08\n\ + \x01\x08\x12\x03\x0e\0\"\n\t\n\x02\x08\n\x12\x03\x0e\0\"\n\x08\n\x01\x08\ + \x12\x03\x0f\0!\n\t\n\x02\x08\x0b\x12\x03\x0f\0!\n\n\n\x02\x04\0\x12\x04\ + \x11\0\x16\x01\n\n\n\x03\x04\0\x01\x12\x03\x11\x08\x0e\n\x0b\n\x04\x04\0\ + \x02\0\x12\x03\x12\x02\x17\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x12\x02\ + \x08\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x12\t\x12\n\x0c\n\x05\x04\0\x02\ + \0\x03\x12\x03\x12\x15\x16\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x13\x02\x12\ + \n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x13\x02\x07\n\x0c\n\x05\x04\0\x02\ + \x01\x01\x12\x03\x13\x08\r\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x13\x10\ + \x11\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x14\x02\x12\n\x0c\n\x05\x04\0\x02\ + \x02\x05\x12\x03\x14\x02\x08\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x14\t\ + \r\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x14\x10\x11\n\x0b\n\x04\x04\0\ + \x02\x03\x12\x03\x15\x02\x13\n\x0c\n\x05\x04\0\x02\x03\x05\x12\x03\x15\ + \x02\x08\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x15\t\x0e\n\x0c\n\x05\x04\ + \0\x02\x03\x03\x12\x03\x15\x11\x12\n\n\n\x02\x04\x01\x12\x04\x18\0\x1c\ + \x01\n\n\n\x03\x04\x01\x01\x12\x03\x18\x08\r\n\x0b\n\x04\x04\x01\x02\0\ + \x12\x03\x19\x02\x17\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x19\x02\x08\n\ + \x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x19\t\x12\n\x0c\n\x05\x04\x01\x02\0\ + \x03\x12\x03\x19\x15\x16\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x1a\x02\x12\ + \n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x1a\x02\x07\n\x0c\n\x05\x04\x01\ + \x02\x01\x01\x12\x03\x1a\x08\r\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\ + \x1a\x10\x11\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\x1b\x02\x12\n\x0c\n\x05\ + \x04\x01\x02\x02\x05\x12\x03\x1b\x02\x08\n\x0c\n\x05\x04\x01\x02\x02\x01\ + \x12\x03\x1b\t\r\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x1b\x10\x11\n\n\ + \n\x02\x04\x02\x12\x04\x1e\0\x20\x01\n\n\n\x03\x04\x02\x01\x12\x03\x1e\ + \x08\x1b\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x1f\x02\x14\n\x0c\n\x05\x04\ + \x02\x02\0\x06\x12\x03\x1f\x02\x08\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\ + \x1f\t\x0f\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x1f\x12\x13\n\n\n\x02\ + \x04\x03\x12\x04\"\0$\x01\n\n\n\x03\x04\x03\x01\x12\x03\"\x08\x1c\n\x0b\ + \n\x04\x04\x03\x02\0\x12\x03#\x02\x14\n\x0c\n\x05\x04\x03\x02\0\x06\x12\ + \x03#\x02\x08\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03#\t\x0f\n\x0c\n\x05\ + \x04\x03\x02\0\x03\x12\x03#\x12\x13\n\n\n\x02\x04\x04\x12\x04&\0(\x01\n\ + \n\n\x03\x04\x04\x01\x12\x03&\x08\x1a\n\x0b\n\x04\x04\x04\x02\0\x12\x03'\ + \x02\x12\n\x0c\n\x05\x04\x04\x02\0\x06\x12\x03'\x02\x07\n\x0c\n\x05\x04\ + \x04\x02\0\x01\x12\x03'\x08\r\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03'\x10\ + \x11\n\n\n\x02\x04\x05\x12\x04*\0,\x01\n\n\n\x03\x04\x05\x01\x12\x03*\ + \x08\x1b\n\x0b\n\x04\x04\x05\x02\0\x12\x03+\x02\x12\n\x0c\n\x05\x04\x05\ + \x02\0\x06\x12\x03+\x02\x07\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03+\x08\r\ + \n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03+\x10\x11\n\n\n\x02\x06\0\x12\x04.\ + \01\x01\n\n\n\x03\x06\0\x01\x12\x03.\x08\x17\n\x0b\n\x04\x06\0\x02\0\x12\ + \x03/\x02G\n\x0c\n\x05\x06\0\x02\0\x01\x12\x03/\x06\x12\n\x0c\n\x05\x06\ + \0\x02\0\x02\x12\x03/\x13&\n\x0c\n\x05\x06\0\x02\0\x03\x12\x03/1E\n\x0b\ + \n\x04\x06\0\x02\x01\x12\x030\x02D\n\x0c\n\x05\x06\0\x02\x01\x01\x12\x03\ + 0\x06\x11\n\x0c\n\x05\x06\0\x02\x01\x02\x12\x030\x12$\n\x0c\n\x05\x06\0\ + \x02\x01\x03\x12\x030/Bb\x06proto3\ +"; + +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) +} + +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(6); + messages.push(Metric::generated_message_descriptor_data()); + messages.push(Event::generated_message_descriptor_data()); + messages.push(CreateMetricRequest::generated_message_descriptor_data()); + messages.push(CreateMetricResponse::generated_message_descriptor_data()); + messages.push(CreateEventRequest::generated_message_descriptor_data()); + messages.push(CreateEventResponse::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) + }) +} diff --git a/yats-grpc.proto b/yats-grpc.proto new file mode 100644 index 0000000000000000000000000000000000000000..474973f269d9216238e3bef2b5cf057ebb983320 --- /dev/null +++ b/yats-grpc.proto @@ -0,0 +1,50 @@ +/** + * Yats - yats + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Paolo Lulli <kevwe.com> + * @copyright Paolo Lulli 2024 + */ + +syntax = "proto3"; +package yats; + +option java_package = "com.kevwe.yats.protobuf"; +option java_multiple_files = true; +option go_package = "yats/proto"; + +message Metric { + string id_client = 1; + int64 mtime = 2; + string name = 3; + string value = 4; +} + +message Event { + string id_client = 1; + int64 etime = 2; + string name = 3; +} + +message CreateMetricRequest { + Metric metric = 1; +} + +message CreateMetricResponse { + Metric metric = 1; +} + +message CreateEventRequest { + Event event = 1; +} + +message CreateEventResponse { + Event event = 1; +} + +service YatsGrpcService { + rpc CreateMetric(CreateMetricRequest) returns (CreateMetricResponse); + rpc CreateEvent(CreateEventRequest) returns (CreateEventResponse); +}