tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 5c048492bfaa82c71487eec14b702a74213d7472
parent 320e5eb2de540f6f07ed402d96ffd62e5c53d009
Author: Michael van Straten <mvanstraten@mozilla.com>
Date:   Mon,  6 Oct 2025 13:02:55 +0000

Bug 1991427 - Apply mozilla patches for opentelemetry-proto r=jari

Differential Revision: https://phabricator.services.mozilla.com/D266668

Diffstat:
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.collector.trace.v1.rs | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.common.v1.rs | 123+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.resource.v1.rs | 32++++++++++++++++++++++++++++++++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.trace.v1.rs | 468+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.cc | 715+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.h | 734+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mthird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto | 2++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.cc | 1895+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.h | 2284+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mthird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto | 2++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.pb.cc | 315+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.pb.h | 353+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mthird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto | 2++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.pb.cc | 2798+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.pb.h | 3082+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mthird_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto | 2++
16 files changed, 12861 insertions(+), 0 deletions(-)

diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.collector.trace.v1.rs b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.collector.trace.v1.rs @@ -0,0 +1,54 @@ +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportTraceServiceRequest { + /// An array of ResourceSpans. + /// For data coming from a single resource this array will typically contain one + /// element. Intermediary nodes (such as OpenTelemetry Collector) that receive + /// data from multiple origins typically batch the data before forwarding further and + /// in that case this array will contain multiple elements. + #[prost(message, repeated, tag = "1")] + pub resource_spans: ::prost::alloc::vec::Vec< + super::super::super::trace::v1::ResourceSpans, + >, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportTraceServiceResponse { + /// The details of a partially successful export request. + /// + /// If the request is only partially accepted + /// (i.e. when the server accepts only parts of the data and rejects the rest) + /// the server MUST initialize the `partial_success` field and MUST + /// set the `rejected_<signal>` with the number of items it rejected. + /// + /// Servers MAY also make use of the `partial_success` field to convey + /// warnings/suggestions to senders even when the request was fully accepted. + /// In such cases, the `rejected_<signal>` MUST have a value of `0` and + /// the `error_message` MUST be non-empty. + /// + /// A `partial_success` message with an empty value (rejected_<signal> = 0 and + /// `error_message` = "") is equivalent to it not being set/present. Senders + /// SHOULD interpret it the same way as in the full success case. + #[prost(message, optional, tag = "1")] + pub partial_success: ::core::option::Option<ExportTracePartialSuccess>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportTracePartialSuccess { + /// The number of rejected spans. + /// + /// A `rejected_<signal>` field holding a `0` value indicates that the + /// request was fully accepted. + #[prost(int64, tag = "1")] + pub rejected_spans: i64, + /// A developer-facing human-readable message in English. It should be used + /// either to explain why the server rejected parts of the data during a partial + /// success or to convey warnings/suggestions during a full success. The message + /// should offer guidance on how users can address such issues. + /// + /// error_message is an optional field. An error_message with an empty value + /// is equivalent to it not being set. + #[prost(string, tag = "2")] + pub error_message: ::prost::alloc::string::String, +} diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.common.v1.rs b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.common.v1.rs @@ -0,0 +1,123 @@ +// This file is @generated by prost-build. +/// AnyValue is used to represent any type of attribute value. AnyValue may contain a +/// primitive value such as a string or integer or it may contain an arbitrary nested +/// object containing arrays, key-value lists and primitives. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AnyValue { + /// The value is one of the listed fields. It is valid for all values to be unspecified + /// in which case this AnyValue is considered to be "empty". + #[prost(oneof = "any_value::Value", tags = "1, 2, 3, 4, 5, 6, 7")] + pub value: ::core::option::Option<any_value::Value>, +} +/// Nested message and enum types in `AnyValue`. +pub mod any_value { + /// The value is one of the listed fields. It is valid for all values to be unspecified + /// in which case this AnyValue is considered to be "empty". + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(string, tag = "1")] + StringValue(::prost::alloc::string::String), + #[prost(bool, tag = "2")] + BoolValue(bool), + #[prost(int64, tag = "3")] + IntValue(i64), + #[prost(double, tag = "4")] + DoubleValue(f64), + #[prost(message, tag = "5")] + ArrayValue(super::ArrayValue), + #[prost(message, tag = "6")] + KvlistValue(super::KeyValueList), + #[prost(bytes, tag = "7")] + BytesValue(::prost::alloc::vec::Vec<u8>), + } +} +/// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message +/// since oneof in AnyValue does not allow repeated fields. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ArrayValue { + /// Array of values. The array may be empty (contain 0 elements). + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec<AnyValue>, +} +/// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message +/// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need +/// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to +/// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches +/// are semantically equivalent. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct KeyValueList { + /// A collection of key/value pairs of key-value pairs. The list may be empty (may + /// contain 0 elements). + /// The keys MUST be unique (it is not allowed to have more than one + /// value with the same key). + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec<KeyValue>, +} +/// KeyValue is a key-value pair that is used to store Span attributes, Link +/// attributes, etc. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct KeyValue { + #[prost(string, tag = "1")] + pub key: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub value: ::core::option::Option<AnyValue>, +} +/// InstrumentationScope is a message representing the instrumentation scope information +/// such as the fully qualified name and version. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InstrumentationScope { + /// An empty instrumentation scope name means the name is unknown. + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub version: ::prost::alloc::string::String, + /// Additional attributes that describe the scope. \[Optional\]. + /// Attribute keys MUST be unique (it is not allowed to have more than one + /// attribute with the same key). + #[prost(message, repeated, tag = "3")] + pub attributes: ::prost::alloc::vec::Vec<KeyValue>, + #[prost(uint32, tag = "4")] + pub dropped_attributes_count: u32, +} +/// A reference to an Entity. +/// Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs. +/// +/// Status: \[Development\] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EntityRef { + /// The Schema URL, if known. This is the identifier of the Schema that the entity data + /// is recorded in. To learn more about Schema URL see + /// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url> + /// + /// This schema_url applies to the data in this message and to the Resource attributes + /// referenced by id_keys and description_keys. + /// TODO: discuss if we are happy with this somewhat complicated definition of what + /// the schema_url applies to. + /// + /// This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs. + #[prost(string, tag = "1")] + pub schema_url: ::prost::alloc::string::String, + /// Defines the type of the entity. MUST not change during the lifetime of the entity. + /// For example: "service" or "host". This field is required and MUST not be empty + /// for valid entities. + #[prost(string, tag = "2")] + pub r#type: ::prost::alloc::string::String, + /// Attribute Keys that identify the entity. + /// MUST not change during the lifetime of the entity. The Id must contain at least one attribute. + /// These keys MUST exist in the containing {message}.attributes. + #[prost(string, repeated, tag = "3")] + pub id_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Descriptive (non-identifying) attribute keys of the entity. + /// MAY change over the lifetime of the entity. MAY be empty. + /// These attribute keys are not part of entity's identity. + /// These keys MUST exist in the containing {message}.attributes. + #[prost(string, repeated, tag = "4")] + pub description_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.resource.v1.rs b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.resource.v1.rs @@ -0,0 +1,32 @@ +// This file is @generated by prost-build. +/// Resource information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Resource { + /// Set of attributes that describe the resource. + /// Attribute keys MUST be unique (it is not allowed to have more than one + /// attribute with the same key). + /// + /// The attribute values SHOULD NOT contain empty values. + /// The attribute values SHOULD NOT contain bytes values. + /// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, + /// double values. + /// The attribute values SHOULD NOT contain kvlist values. + /// The behavior of software that receives attributes containing such values can be unpredictable. + /// These restrictions can change in a minor release. + /// The restrictions take origin from the OpenTelemetry specification: + /// <https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.> + #[prost(message, repeated, tag = "1")] + pub attributes: ::prost::alloc::vec::Vec<super::super::common::v1::KeyValue>, + /// dropped_attributes_count is the number of dropped attributes. If the value is 0, then + /// no attributes were dropped. + #[prost(uint32, tag = "2")] + pub dropped_attributes_count: u32, + /// Set of entities that participate in this Resource. + /// + /// Note: keys in the references MUST exist in attributes of this message. + /// + /// Status: \[Development\] + #[prost(message, repeated, tag = "3")] + pub entity_refs: ::prost::alloc::vec::Vec<super::super::common::v1::EntityRef>, +} diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.trace.v1.rs b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.trace.v1.rs @@ -0,0 +1,468 @@ +// This file is @generated by prost-build. +/// TracesData represents the traces data that can be stored in a persistent storage, +/// OR can be embedded by other protocols that transfer OTLP traces data but do +/// not implement the OTLP protocol. +/// +/// The main difference between this message and collector protocol is that +/// in this message there will not be any "control" or "metadata" specific to +/// OTLP protocol. +/// +/// When new fields are added into this message, the OTLP request MUST be updated +/// as well. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TracesData { + /// An array of ResourceSpans. + /// For data coming from a single resource this array will typically contain + /// one element. Intermediary nodes that receive data from multiple origins + /// typically batch the data before forwarding further and in that case this + /// array will contain multiple elements. + #[prost(message, repeated, tag = "1")] + pub resource_spans: ::prost::alloc::vec::Vec<ResourceSpans>, +} +/// A collection of ScopeSpans from a Resource. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResourceSpans { + /// The resource for the spans in this message. + /// If this field is not set then no resource info is known. + #[prost(message, optional, tag = "1")] + pub resource: ::core::option::Option<super::super::resource::v1::Resource>, + /// A list of ScopeSpans that originate from a resource. + #[prost(message, repeated, tag = "2")] + pub scope_spans: ::prost::alloc::vec::Vec<ScopeSpans>, + /// The Schema URL, if known. This is the identifier of the Schema that the resource data + /// is recorded in. Notably, the last part of the URL path is the version number of the + /// schema: http\[s\]://server\[:port\]/path/<version>. To learn more about Schema URL see + /// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url> + /// This schema_url applies to the data in the "resource" field. It does not apply + /// to the data in the "scope_spans" field which have their own schema_url field. + #[prost(string, tag = "3")] + pub schema_url: ::prost::alloc::string::String, +} +/// A collection of Spans produced by an InstrumentationScope. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ScopeSpans { + /// The instrumentation scope information for the spans in this message. + /// Semantically when InstrumentationScope isn't set, it is equivalent with + /// an empty instrumentation scope name (unknown). + #[prost(message, optional, tag = "1")] + pub scope: ::core::option::Option<super::super::common::v1::InstrumentationScope>, + /// A list of Spans that originate from an instrumentation scope. + #[prost(message, repeated, tag = "2")] + pub spans: ::prost::alloc::vec::Vec<Span>, + /// The Schema URL, if known. This is the identifier of the Schema that the span data + /// is recorded in. Notably, the last part of the URL path is the version number of the + /// schema: http\[s\]://server\[:port\]/path/<version>. To learn more about Schema URL see + /// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url> + /// This schema_url applies to all spans and span events in the "spans" field. + #[prost(string, tag = "3")] + pub schema_url: ::prost::alloc::string::String, +} +/// A Span represents a single operation performed by a single component of the system. +/// +/// The next available field id is 17. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Span { + /// A unique identifier for a trace. All spans from the same trace share + /// the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR + /// of length other than 16 bytes is considered invalid (empty string in OTLP/JSON + /// is zero-length and thus is also invalid). + /// + /// This field is required. + #[prost(bytes = "vec", tag = "1")] + pub trace_id: ::prost::alloc::vec::Vec<u8>, + /// A unique identifier for a span within a trace, assigned when the span + /// is created. The ID is an 8-byte array. An ID with all zeroes OR of length + /// other than 8 bytes is considered invalid (empty string in OTLP/JSON + /// is zero-length and thus is also invalid). + /// + /// This field is required. + #[prost(bytes = "vec", tag = "2")] + pub span_id: ::prost::alloc::vec::Vec<u8>, + /// trace_state conveys information about request position in multiple distributed tracing graphs. + /// It is a trace_state in w3c-trace-context format: <https://www.w3.org/TR/trace-context/#tracestate-header> + /// See also <https://github.com/w3c/distributed-tracing> for more details about this field. + #[prost(string, tag = "3")] + pub trace_state: ::prost::alloc::string::String, + /// The `span_id` of this span's parent span. If this is a root span, then this + /// field must be empty. The ID is an 8-byte array. + #[prost(bytes = "vec", tag = "4")] + pub parent_span_id: ::prost::alloc::vec::Vec<u8>, + /// Flags, a bit field. + /// + /// Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace + /// Context specification. To read the 8-bit W3C trace flag, use + /// `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. + /// + /// See <https://www.w3.org/TR/trace-context-2/#trace-flags> for the flag definitions. + /// + /// Bits 8 and 9 represent the 3 states of whether a span's parent + /// is remote. The states are (unknown, is not remote, is remote). + /// To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. + /// To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. + /// + /// When creating span messages, if the message is logically forwarded from another source + /// with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD + /// be copied as-is. If creating from a source that does not have an equivalent flags field + /// (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST + /// be set to zero. + /// Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. + /// + /// \[Optional\]. + #[prost(fixed32, tag = "16")] + pub flags: u32, + /// A description of the span's operation. + /// + /// For example, the name can be a qualified method name or a file name + /// and a line number where the operation is called. A best practice is to use + /// the same display name at the same call point in an application. + /// This makes it easier to correlate spans in different traces. + /// + /// This field is semantically required to be set to non-empty string. + /// Empty value is equivalent to an unknown span name. + /// + /// This field is required. + #[prost(string, tag = "5")] + pub name: ::prost::alloc::string::String, + /// Distinguishes between spans generated in a particular context. For example, + /// two spans with the same name may be distinguished using `CLIENT` (caller) + /// and `SERVER` (callee) to identify queueing latency associated with the span. + #[prost(enumeration = "span::SpanKind", tag = "6")] + pub kind: i32, + /// start_time_unix_nano is the start time of the span. On the client side, this is the time + /// kept by the local machine where the span execution starts. On the server side, this + /// is the time when the server's application handler starts running. + /// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + /// + /// This field is semantically required and it is expected that end_time >= start_time. + #[prost(fixed64, tag = "7")] + pub start_time_unix_nano: u64, + /// end_time_unix_nano is the end time of the span. On the client side, this is the time + /// kept by the local machine where the span execution ends. On the server side, this + /// is the time when the server application handler stops running. + /// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + /// + /// This field is semantically required and it is expected that end_time >= start_time. + #[prost(fixed64, tag = "8")] + pub end_time_unix_nano: u64, + /// attributes is a collection of key/value pairs. Note, global attributes + /// like server name can be set using the resource API. Examples of attributes: + /// + /// "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" + /// "/http/server_latency": 300 + /// "example.com/myattribute": true + /// "example.com/score": 10.239 + /// + /// Attribute keys MUST be unique (it is not allowed to have more than one + /// attribute with the same key). + /// + /// The attribute values SHOULD NOT contain empty values. + /// The attribute values SHOULD NOT contain bytes values. + /// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, + /// double values. + /// The attribute values SHOULD NOT contain kvlist values. + /// The behavior of software that receives attributes containing such values can be unpredictable. + /// These restrictions can change in a minor release. + /// The restrictions take origin from the OpenTelemetry specification: + /// <https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.> + #[prost(message, repeated, tag = "9")] + pub attributes: ::prost::alloc::vec::Vec<super::super::common::v1::KeyValue>, + /// dropped_attributes_count is the number of attributes that were discarded. Attributes + /// can be discarded because their keys are too long or because there are too many + /// attributes. If this value is 0, then no attributes were dropped. + #[prost(uint32, tag = "10")] + pub dropped_attributes_count: u32, + /// events is a collection of Event items. + #[prost(message, repeated, tag = "11")] + pub events: ::prost::alloc::vec::Vec<span::Event>, + /// dropped_events_count is the number of dropped events. If the value is 0, then no + /// events were dropped. + #[prost(uint32, tag = "12")] + pub dropped_events_count: u32, + /// links is a collection of Links, which are references from this span to a span + /// in the same or different trace. + #[prost(message, repeated, tag = "13")] + pub links: ::prost::alloc::vec::Vec<span::Link>, + /// dropped_links_count is the number of dropped links after the maximum size was + /// enforced. If this value is 0, then no links were dropped. + #[prost(uint32, tag = "14")] + pub dropped_links_count: u32, + /// An optional final status for this span. Semantically when Status isn't set, it means + /// span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0). + #[prost(message, optional, tag = "15")] + pub status: ::core::option::Option<Status>, +} +/// Nested message and enum types in `Span`. +pub mod span { + /// Event is a time-stamped annotation of the span, consisting of user-supplied + /// text description and key-value pairs. + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Event { + /// time_unix_nano is the time the event occurred. + #[prost(fixed64, tag = "1")] + pub time_unix_nano: u64, + /// name of the event. + /// This field is semantically required to be set to non-empty string. + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + /// attributes is a collection of attribute key/value pairs on the event. + /// Attribute keys MUST be unique (it is not allowed to have more than one + /// attribute with the same key). + /// + /// The attribute values SHOULD NOT contain empty values. + /// The attribute values SHOULD NOT contain bytes values. + /// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, + /// double values. + /// The attribute values SHOULD NOT contain kvlist values. + /// The behavior of software that receives attributes containing such values can be unpredictable. + /// These restrictions can change in a minor release. + /// The restrictions take origin from the OpenTelemetry specification: + /// <https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.> + #[prost(message, repeated, tag = "3")] + pub attributes: ::prost::alloc::vec::Vec< + super::super::super::common::v1::KeyValue, + >, + /// dropped_attributes_count is the number of dropped attributes. If the value is 0, + /// then no attributes were dropped. + #[prost(uint32, tag = "4")] + pub dropped_attributes_count: u32, + } + /// A pointer from the current span to another span in the same trace or in a + /// different trace. For example, this can be used in batching operations, + /// where a single batch handler processes multiple requests from different + /// traces or when the handler receives a request from a different project. + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Link { + /// A unique identifier of a trace that this linked span is part of. The ID is a + /// 16-byte array. + #[prost(bytes = "vec", tag = "1")] + pub trace_id: ::prost::alloc::vec::Vec<u8>, + /// A unique identifier for the linked span. The ID is an 8-byte array. + #[prost(bytes = "vec", tag = "2")] + pub span_id: ::prost::alloc::vec::Vec<u8>, + /// The trace_state associated with the link. + #[prost(string, tag = "3")] + pub trace_state: ::prost::alloc::string::String, + /// attributes is a collection of attribute key/value pairs on the link. + /// Attribute keys MUST be unique (it is not allowed to have more than one + /// attribute with the same key). + /// + /// The attribute values SHOULD NOT contain empty values. + /// The attribute values SHOULD NOT contain bytes values. + /// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, + /// double values. + /// The attribute values SHOULD NOT contain kvlist values. + /// The behavior of software that receives attributes containing such values can be unpredictable. + /// These restrictions can change in a minor release. + /// The restrictions take origin from the OpenTelemetry specification: + /// <https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.> + #[prost(message, repeated, tag = "4")] + pub attributes: ::prost::alloc::vec::Vec< + super::super::super::common::v1::KeyValue, + >, + /// dropped_attributes_count is the number of dropped attributes. If the value is 0, + /// then no attributes were dropped. + #[prost(uint32, tag = "5")] + pub dropped_attributes_count: u32, + /// Flags, a bit field. + /// + /// Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace + /// Context specification. To read the 8-bit W3C trace flag, use + /// `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. + /// + /// See <https://www.w3.org/TR/trace-context-2/#trace-flags> for the flag definitions. + /// + /// Bits 8 and 9 represent the 3 states of whether the link is remote. + /// The states are (unknown, is not remote, is remote). + /// To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. + /// To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. + /// + /// Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. + /// When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero. + /// + /// \[Optional\]. + #[prost(fixed32, tag = "6")] + pub flags: u32, + } + /// SpanKind is the type of span. Can be used to specify additional relationships between spans + /// in addition to a parent/child relationship. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum SpanKind { + /// Unspecified. Do NOT use as default. + /// Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED. + Unspecified = 0, + /// Indicates that the span represents an internal operation within an application, + /// as opposed to an operation happening at the boundaries. Default value. + Internal = 1, + /// Indicates that the span covers server-side handling of an RPC or other + /// remote network request. + Server = 2, + /// Indicates that the span describes a request to some remote service. + Client = 3, + /// Indicates that the span describes a producer sending a message to a broker. + /// Unlike CLIENT and SERVER, there is often no direct critical path latency relationship + /// between producer and consumer spans. A PRODUCER span ends when the message was accepted + /// by the broker while the logical processing of the message might span a much longer time. + Producer = 4, + /// Indicates that the span describes consumer receiving a message from a broker. + /// Like the PRODUCER kind, there is often no direct critical path latency relationship + /// between producer and consumer spans. + Consumer = 5, + } + impl SpanKind { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SpanKind::Unspecified => "SPAN_KIND_UNSPECIFIED", + SpanKind::Internal => "SPAN_KIND_INTERNAL", + SpanKind::Server => "SPAN_KIND_SERVER", + SpanKind::Client => "SPAN_KIND_CLIENT", + SpanKind::Producer => "SPAN_KIND_PRODUCER", + SpanKind::Consumer => "SPAN_KIND_CONSUMER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { + match value { + "SPAN_KIND_UNSPECIFIED" => Some(Self::Unspecified), + "SPAN_KIND_INTERNAL" => Some(Self::Internal), + "SPAN_KIND_SERVER" => Some(Self::Server), + "SPAN_KIND_CLIENT" => Some(Self::Client), + "SPAN_KIND_PRODUCER" => Some(Self::Producer), + "SPAN_KIND_CONSUMER" => Some(Self::Consumer), + _ => None, + } + } + } +} +/// The Status type defines a logical error model that is suitable for different +/// programming environments, including REST APIs and RPC APIs. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Status { + /// A developer-facing human readable error message. + #[prost(string, tag = "2")] + pub message: ::prost::alloc::string::String, + /// The status code. + #[prost(enumeration = "status::StatusCode", tag = "3")] + pub code: i32, +} +/// Nested message and enum types in `Status`. +pub mod status { + /// For the semantics of status codes see + /// <https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status> + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum StatusCode { + /// The default status. + Unset = 0, + /// The Span has been validated by an Application developer or Operator to + /// have completed successfully. + Ok = 1, + /// The Span contains an error. + Error = 2, + } + impl StatusCode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + StatusCode::Unset => "STATUS_CODE_UNSET", + StatusCode::Ok => "STATUS_CODE_OK", + StatusCode::Error => "STATUS_CODE_ERROR", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { + match value { + "STATUS_CODE_UNSET" => Some(Self::Unset), + "STATUS_CODE_OK" => Some(Self::Ok), + "STATUS_CODE_ERROR" => Some(Self::Error), + _ => None, + } + } + } +} +/// SpanFlags represents constants used to interpret the +/// Span.flags field, which is protobuf 'fixed32' type and is to +/// be used as bit-fields. Each non-zero value defined in this enum is +/// a bit-mask. To extract the bit-field, for example, use an +/// expression like: +/// +/// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) +/// +/// See <https://www.w3.org/TR/trace-context-2/#trace-flags> for the flag definitions. +/// +/// Note that Span flags were introduced in version 1.1 of the +/// OpenTelemetry protocol. Older Span producers do not set this +/// field, consequently consumers should not rely on the absence of a +/// particular flag bit to indicate the presence of a particular feature. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SpanFlags { + /// The zero value for the enum. Should not be used for comparisons. + /// Instead use bitwise "and" with the appropriate mask as shown above. + DoNotUse = 0, + /// Bits 0-7 are used for trace flags. + TraceFlagsMask = 255, + /// Bits 8 and 9 are used to indicate that the parent span or link span is remote. + /// Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known. + /// Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote. + ContextHasIsRemoteMask = 256, + ContextIsRemoteMask = 512, +} +impl SpanFlags { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SpanFlags::DoNotUse => "SPAN_FLAGS_DO_NOT_USE", + SpanFlags::TraceFlagsMask => "SPAN_FLAGS_TRACE_FLAGS_MASK", + SpanFlags::ContextHasIsRemoteMask => "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK", + SpanFlags::ContextIsRemoteMask => "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { + match value { + "SPAN_FLAGS_DO_NOT_USE" => Some(Self::DoNotUse), + "SPAN_FLAGS_TRACE_FLAGS_MASK" => Some(Self::TraceFlagsMask), + "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK" => Some(Self::ContextHasIsRemoteMask), + "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK" => Some(Self::ContextIsRemoteMask), + _ => None, + } + } +} diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.cc b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.cc @@ -0,0 +1,715 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opentelemetry/proto/collector/trace/v1/trace_service.proto + +#include "opentelemetry/proto/collector/trace/v1/trace_service.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/io/zero_copy_stream_impl_lite.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 opentelemetry { +namespace proto { +namespace collector { +namespace trace { +namespace v1 { +PROTOBUF_CONSTEXPR ExportTraceServiceRequest::ExportTraceServiceRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.resource_spans_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ExportTraceServiceRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR ExportTraceServiceRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ExportTraceServiceRequestDefaultTypeInternal() {} + union { + ExportTraceServiceRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExportTraceServiceRequestDefaultTypeInternal _ExportTraceServiceRequest_default_instance_; +PROTOBUF_CONSTEXPR ExportTraceServiceResponse::ExportTraceServiceResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.partial_success_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ExportTraceServiceResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ExportTraceServiceResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ExportTraceServiceResponseDefaultTypeInternal() {} + union { + ExportTraceServiceResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExportTraceServiceResponseDefaultTypeInternal _ExportTraceServiceResponse_default_instance_; +PROTOBUF_CONSTEXPR ExportTracePartialSuccess::ExportTracePartialSuccess( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.error_message_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.rejected_spans_)*/int64_t{0} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ExportTracePartialSuccessDefaultTypeInternal { + PROTOBUF_CONSTEXPR ExportTracePartialSuccessDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ExportTracePartialSuccessDefaultTypeInternal() {} + union { + ExportTracePartialSuccess _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExportTracePartialSuccessDefaultTypeInternal _ExportTracePartialSuccess_default_instance_; +} // namespace v1 +} // namespace trace +} // namespace collector +} // namespace proto +} // namespace opentelemetry +namespace opentelemetry { +namespace proto { +namespace collector { +namespace trace { +namespace v1 { + +// =================================================================== + +class ExportTraceServiceRequest::_Internal { + public: +}; + +void ExportTraceServiceRequest::clear_resource_spans() { + _impl_.resource_spans_.Clear(); +} +ExportTraceServiceRequest::ExportTraceServiceRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) +} +ExportTraceServiceRequest::ExportTraceServiceRequest(const ExportTraceServiceRequest& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ExportTraceServiceRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.resource_spans_){from._impl_.resource_spans_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) +} + +inline void ExportTraceServiceRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.resource_spans_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ExportTraceServiceRequest::~ExportTraceServiceRequest() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ExportTraceServiceRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.resource_spans_.~RepeatedPtrField(); +} + +void ExportTraceServiceRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ExportTraceServiceRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.resource_spans_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ExportTraceServiceRequest::_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) { + // repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_resource_spans(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ExportTraceServiceRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_resource_spans_size()); i < n; i++) { + const auto& repfield = this->_internal_resource_spans(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + return target; +} + +size_t ExportTraceServiceRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; + total_size += 1UL * this->_internal_resource_spans_size(); + for (const auto& msg : this->_impl_.resource_spans_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ExportTraceServiceRequest::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ExportTraceServiceRequest*>( + &from)); +} + +void ExportTraceServiceRequest::MergeFrom(const ExportTraceServiceRequest& from) { + ExportTraceServiceRequest* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.resource_spans_.MergeFrom(from._impl_.resource_spans_); + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ExportTraceServiceRequest::CopyFrom(const ExportTraceServiceRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ExportTraceServiceRequest::IsInitialized() const { + return true; +} + +void ExportTraceServiceRequest::InternalSwap(ExportTraceServiceRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.resource_spans_.InternalSwap(&other->_impl_.resource_spans_); +} + +std::string ExportTraceServiceRequest::GetTypeName() const { + return "opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"; +} + + +// =================================================================== + +class ExportTraceServiceResponse::_Internal { + public: + static const ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess& partial_success(const ExportTraceServiceResponse* msg); +}; + +const ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess& +ExportTraceServiceResponse::_Internal::partial_success(const ExportTraceServiceResponse* msg) { + return *msg->_impl_.partial_success_; +} +ExportTraceServiceResponse::ExportTraceServiceResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) +} +ExportTraceServiceResponse::ExportTraceServiceResponse(const ExportTraceServiceResponse& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ExportTraceServiceResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.partial_success_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + if (from._internal_has_partial_success()) { + _this->_impl_.partial_success_ = new ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess(*from._impl_.partial_success_); + } + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) +} + +inline void ExportTraceServiceResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.partial_success_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ExportTraceServiceResponse::~ExportTraceServiceResponse() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ExportTraceServiceResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.partial_success_; +} + +void ExportTraceServiceResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ExportTraceServiceResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.partial_success_ != nullptr) { + delete _impl_.partial_success_; + } + _impl_.partial_success_ = nullptr; + _internal_metadata_.Clear<std::string>(); +} + +const char* ExportTraceServiceResponse::_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) { + // .opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_partial_success(), 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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ExportTraceServiceResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1; + if (this->_internal_has_partial_success()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::partial_success(this), + _Internal::partial_success(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + return target; +} + +size_t ExportTraceServiceResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1; + if (this->_internal_has_partial_success()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.partial_success_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ExportTraceServiceResponse::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ExportTraceServiceResponse*>( + &from)); +} + +void ExportTraceServiceResponse::MergeFrom(const ExportTraceServiceResponse& from) { + ExportTraceServiceResponse* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_partial_success()) { + _this->_internal_mutable_partial_success()->::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess::MergeFrom( + from._internal_partial_success()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ExportTraceServiceResponse::CopyFrom(const ExportTraceServiceResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ExportTraceServiceResponse::IsInitialized() const { + return true; +} + +void ExportTraceServiceResponse::InternalSwap(ExportTraceServiceResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.partial_success_, other->_impl_.partial_success_); +} + +std::string ExportTraceServiceResponse::GetTypeName() const { + return "opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"; +} + + +// =================================================================== + +class ExportTracePartialSuccess::_Internal { + public: +}; + +ExportTracePartialSuccess::ExportTracePartialSuccess(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) +} +ExportTracePartialSuccess::ExportTracePartialSuccess(const ExportTracePartialSuccess& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ExportTracePartialSuccess* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.error_message_){} + , decltype(_impl_.rejected_spans_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.error_message_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.error_message_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_error_message().empty()) { + _this->_impl_.error_message_.Set(from._internal_error_message(), + _this->GetArenaForAllocation()); + } + _this->_impl_.rejected_spans_ = from._impl_.rejected_spans_; + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) +} + +inline void ExportTracePartialSuccess::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.error_message_){} + , decltype(_impl_.rejected_spans_){int64_t{0}} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.error_message_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.error_message_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ExportTracePartialSuccess::~ExportTracePartialSuccess() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ExportTracePartialSuccess::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.error_message_.Destroy(); +} + +void ExportTracePartialSuccess::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ExportTracePartialSuccess::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.error_message_.ClearToEmpty(); + _impl_.rejected_spans_ = int64_t{0}; + _internal_metadata_.Clear<std::string>(); +} + +const char* ExportTracePartialSuccess::_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) { + // int64 rejected_spans = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + _impl_.rejected_spans_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string error_message = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_error_message(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } 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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ExportTracePartialSuccess::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // int64 rejected_spans = 1; + if (this->_internal_rejected_spans() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_rejected_spans(), target); + } + + // string error_message = 2; + if (!this->_internal_error_message().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_error_message().data(), static_cast<int>(this->_internal_error_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.error_message"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_error_message(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + return target; +} + +size_t ExportTracePartialSuccess::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + 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 error_message = 2; + if (!this->_internal_error_message().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_error_message()); + } + + // int64 rejected_spans = 1; + if (this->_internal_rejected_spans() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_rejected_spans()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ExportTracePartialSuccess::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ExportTracePartialSuccess*>( + &from)); +} + +void ExportTracePartialSuccess::MergeFrom(const ExportTracePartialSuccess& from) { + ExportTracePartialSuccess* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_error_message().empty()) { + _this->_internal_set_error_message(from._internal_error_message()); + } + if (from._internal_rejected_spans() != 0) { + _this->_internal_set_rejected_spans(from._internal_rejected_spans()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ExportTracePartialSuccess::CopyFrom(const ExportTracePartialSuccess& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ExportTracePartialSuccess::IsInitialized() const { + return true; +} + +void ExportTracePartialSuccess::InternalSwap(ExportTracePartialSuccess* 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_.error_message_, lhs_arena, + &other->_impl_.error_message_, rhs_arena + ); + swap(_impl_.rejected_spans_, other->_impl_.rejected_spans_); +} + +std::string ExportTracePartialSuccess::GetTypeName() const { + return "opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace trace +} // namespace collector +} // namespace proto +} // namespace opentelemetry +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::collector::trace::v1::ExportTraceServiceRequest* +Arena::CreateMaybeMessage< ::opentelemetry::proto::collector::trace::v1::ExportTraceServiceRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::collector::trace::v1::ExportTraceServiceRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::collector::trace::v1::ExportTraceServiceResponse* +Arena::CreateMaybeMessage< ::opentelemetry::proto::collector::trace::v1::ExportTraceServiceResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::collector::trace::v1::ExportTraceServiceResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* +Arena::CreateMaybeMessage< ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.h b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.h @@ -0,0 +1,734 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opentelemetry/proto/collector/trace/v1/trace_service.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2fcollector_2ftrace_2fv1_2ftrace_5fservice_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2fcollector_2ftrace_2fv1_2ftrace_5fservice_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 3021006 < 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/message_lite.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include "opentelemetry/proto/trace/v1/trace.pb.h" +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_opentelemetry_2fproto_2fcollector_2ftrace_2fv1_2ftrace_5fservice_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_opentelemetry_2fproto_2fcollector_2ftrace_2fv1_2ftrace_5fservice_2eproto { + static const uint32_t offsets[]; +}; +namespace opentelemetry { +namespace proto { +namespace collector { +namespace trace { +namespace v1 { +class ExportTracePartialSuccess; +struct ExportTracePartialSuccessDefaultTypeInternal; +extern ExportTracePartialSuccessDefaultTypeInternal _ExportTracePartialSuccess_default_instance_; +class ExportTraceServiceRequest; +struct ExportTraceServiceRequestDefaultTypeInternal; +extern ExportTraceServiceRequestDefaultTypeInternal _ExportTraceServiceRequest_default_instance_; +class ExportTraceServiceResponse; +struct ExportTraceServiceResponseDefaultTypeInternal; +extern ExportTraceServiceResponseDefaultTypeInternal _ExportTraceServiceResponse_default_instance_; +} // namespace v1 +} // namespace trace +} // namespace collector +} // namespace proto +} // namespace opentelemetry +PROTOBUF_NAMESPACE_OPEN +template<> ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* Arena::CreateMaybeMessage<::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess>(Arena*); +template<> ::opentelemetry::proto::collector::trace::v1::ExportTraceServiceRequest* Arena::CreateMaybeMessage<::opentelemetry::proto::collector::trace::v1::ExportTraceServiceRequest>(Arena*); +template<> ::opentelemetry::proto::collector::trace::v1::ExportTraceServiceResponse* Arena::CreateMaybeMessage<::opentelemetry::proto::collector::trace::v1::ExportTraceServiceResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace opentelemetry { +namespace proto { +namespace collector { +namespace trace { +namespace v1 { + +// =================================================================== + +class ExportTraceServiceRequest final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) */ { + public: + inline ExportTraceServiceRequest() : ExportTraceServiceRequest(nullptr) {} + ~ExportTraceServiceRequest() override; + explicit PROTOBUF_CONSTEXPR ExportTraceServiceRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ExportTraceServiceRequest(const ExportTraceServiceRequest& from); + ExportTraceServiceRequest(ExportTraceServiceRequest&& from) noexcept + : ExportTraceServiceRequest() { + *this = ::std::move(from); + } + + inline ExportTraceServiceRequest& operator=(const ExportTraceServiceRequest& from) { + CopyFrom(from); + return *this; + } + inline ExportTraceServiceRequest& operator=(ExportTraceServiceRequest&& 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 ExportTraceServiceRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ExportTraceServiceRequest* internal_default_instance() { + return reinterpret_cast<const ExportTraceServiceRequest*>( + &_ExportTraceServiceRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ExportTraceServiceRequest& a, ExportTraceServiceRequest& b) { + a.Swap(&b); + } + inline void Swap(ExportTraceServiceRequest* 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(ExportTraceServiceRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ExportTraceServiceRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ExportTraceServiceRequest>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ExportTraceServiceRequest& from); + void MergeFrom(const ExportTraceServiceRequest& from); + 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; + void InternalSwap(ExportTraceServiceRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"; + } + protected: + explicit ExportTraceServiceRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kResourceSpansFieldNumber = 1, + }; + // repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; + int resource_spans_size() const; + private: + int _internal_resource_spans_size() const; + public: + void clear_resource_spans(); + ::opentelemetry::proto::trace::v1::ResourceSpans* mutable_resource_spans(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans >* + mutable_resource_spans(); + private: + const ::opentelemetry::proto::trace::v1::ResourceSpans& _internal_resource_spans(int index) const; + ::opentelemetry::proto::trace::v1::ResourceSpans* _internal_add_resource_spans(); + public: + const ::opentelemetry::proto::trace::v1::ResourceSpans& resource_spans(int index) const; + ::opentelemetry::proto::trace::v1::ResourceSpans* add_resource_spans(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans >& + resource_spans() const; + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans > resource_spans_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fcollector_2ftrace_2fv1_2ftrace_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class ExportTraceServiceResponse final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) */ { + public: + inline ExportTraceServiceResponse() : ExportTraceServiceResponse(nullptr) {} + ~ExportTraceServiceResponse() override; + explicit PROTOBUF_CONSTEXPR ExportTraceServiceResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ExportTraceServiceResponse(const ExportTraceServiceResponse& from); + ExportTraceServiceResponse(ExportTraceServiceResponse&& from) noexcept + : ExportTraceServiceResponse() { + *this = ::std::move(from); + } + + inline ExportTraceServiceResponse& operator=(const ExportTraceServiceResponse& from) { + CopyFrom(from); + return *this; + } + inline ExportTraceServiceResponse& operator=(ExportTraceServiceResponse&& 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 ExportTraceServiceResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ExportTraceServiceResponse* internal_default_instance() { + return reinterpret_cast<const ExportTraceServiceResponse*>( + &_ExportTraceServiceResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ExportTraceServiceResponse& a, ExportTraceServiceResponse& b) { + a.Swap(&b); + } + inline void Swap(ExportTraceServiceResponse* 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(ExportTraceServiceResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ExportTraceServiceResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ExportTraceServiceResponse>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ExportTraceServiceResponse& from); + void MergeFrom(const ExportTraceServiceResponse& from); + 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; + void InternalSwap(ExportTraceServiceResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"; + } + protected: + explicit ExportTraceServiceResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPartialSuccessFieldNumber = 1, + }; + // .opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1; + bool has_partial_success() const; + private: + bool _internal_has_partial_success() const; + public: + void clear_partial_success(); + const ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess& partial_success() const; + PROTOBUF_NODISCARD ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* release_partial_success(); + ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* mutable_partial_success(); + void set_allocated_partial_success(::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* partial_success); + private: + const ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess& _internal_partial_success() const; + ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* _internal_mutable_partial_success(); + public: + void unsafe_arena_set_allocated_partial_success( + ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* partial_success); + ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* unsafe_arena_release_partial_success(); + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* partial_success_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fcollector_2ftrace_2fv1_2ftrace_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class ExportTracePartialSuccess final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) */ { + public: + inline ExportTracePartialSuccess() : ExportTracePartialSuccess(nullptr) {} + ~ExportTracePartialSuccess() override; + explicit PROTOBUF_CONSTEXPR ExportTracePartialSuccess(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ExportTracePartialSuccess(const ExportTracePartialSuccess& from); + ExportTracePartialSuccess(ExportTracePartialSuccess&& from) noexcept + : ExportTracePartialSuccess() { + *this = ::std::move(from); + } + + inline ExportTracePartialSuccess& operator=(const ExportTracePartialSuccess& from) { + CopyFrom(from); + return *this; + } + inline ExportTracePartialSuccess& operator=(ExportTracePartialSuccess&& 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 ExportTracePartialSuccess& default_instance() { + return *internal_default_instance(); + } + static inline const ExportTracePartialSuccess* internal_default_instance() { + return reinterpret_cast<const ExportTracePartialSuccess*>( + &_ExportTracePartialSuccess_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ExportTracePartialSuccess& a, ExportTracePartialSuccess& b) { + a.Swap(&b); + } + inline void Swap(ExportTracePartialSuccess* 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(ExportTracePartialSuccess* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ExportTracePartialSuccess* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ExportTracePartialSuccess>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ExportTracePartialSuccess& from); + void MergeFrom(const ExportTracePartialSuccess& from); + 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; + void InternalSwap(ExportTracePartialSuccess* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"; + } + protected: + explicit ExportTracePartialSuccess(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kErrorMessageFieldNumber = 2, + kRejectedSpansFieldNumber = 1, + }; + // string error_message = 2; + void clear_error_message(); + const std::string& error_message() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_error_message(ArgT0&& arg0, ArgT... args); + std::string* mutable_error_message(); + PROTOBUF_NODISCARD std::string* release_error_message(); + void set_allocated_error_message(std::string* error_message); + private: + const std::string& _internal_error_message() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error_message(const std::string& value); + std::string* _internal_mutable_error_message(); + public: + + // int64 rejected_spans = 1; + void clear_rejected_spans(); + int64_t rejected_spans() const; + void set_rejected_spans(int64_t value); + private: + int64_t _internal_rejected_spans() const; + void _internal_set_rejected_spans(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + 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 error_message_; + int64_t rejected_spans_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fcollector_2ftrace_2fv1_2ftrace_5fservice_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ExportTraceServiceRequest + +// repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; +inline int ExportTraceServiceRequest::_internal_resource_spans_size() const { + return _impl_.resource_spans_.size(); +} +inline int ExportTraceServiceRequest::resource_spans_size() const { + return _internal_resource_spans_size(); +} +inline ::opentelemetry::proto::trace::v1::ResourceSpans* ExportTraceServiceRequest::mutable_resource_spans(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resource_spans) + return _impl_.resource_spans_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans >* +ExportTraceServiceRequest::mutable_resource_spans() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resource_spans) + return &_impl_.resource_spans_; +} +inline const ::opentelemetry::proto::trace::v1::ResourceSpans& ExportTraceServiceRequest::_internal_resource_spans(int index) const { + return _impl_.resource_spans_.Get(index); +} +inline const ::opentelemetry::proto::trace::v1::ResourceSpans& ExportTraceServiceRequest::resource_spans(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resource_spans) + return _internal_resource_spans(index); +} +inline ::opentelemetry::proto::trace::v1::ResourceSpans* ExportTraceServiceRequest::_internal_add_resource_spans() { + return _impl_.resource_spans_.Add(); +} +inline ::opentelemetry::proto::trace::v1::ResourceSpans* ExportTraceServiceRequest::add_resource_spans() { + ::opentelemetry::proto::trace::v1::ResourceSpans* _add = _internal_add_resource_spans(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resource_spans) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans >& +ExportTraceServiceRequest::resource_spans() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resource_spans) + return _impl_.resource_spans_; +} + +// ------------------------------------------------------------------- + +// ExportTraceServiceResponse + +// .opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1; +inline bool ExportTraceServiceResponse::_internal_has_partial_success() const { + return this != internal_default_instance() && _impl_.partial_success_ != nullptr; +} +inline bool ExportTraceServiceResponse::has_partial_success() const { + return _internal_has_partial_success(); +} +inline void ExportTraceServiceResponse::clear_partial_success() { + if (GetArenaForAllocation() == nullptr && _impl_.partial_success_ != nullptr) { + delete _impl_.partial_success_; + } + _impl_.partial_success_ = nullptr; +} +inline const ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess& ExportTraceServiceResponse::_internal_partial_success() const { + const ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* p = _impl_.partial_success_; + return p != nullptr ? *p : reinterpret_cast<const ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess&>( + ::opentelemetry::proto::collector::trace::v1::_ExportTracePartialSuccess_default_instance_); +} +inline const ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess& ExportTraceServiceResponse::partial_success() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partial_success) + return _internal_partial_success(); +} +inline void ExportTraceServiceResponse::unsafe_arena_set_allocated_partial_success( + ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* partial_success) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.partial_success_); + } + _impl_.partial_success_ = partial_success; + if (partial_success) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partial_success) +} +inline ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* ExportTraceServiceResponse::release_partial_success() { + + ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* temp = _impl_.partial_success_; + _impl_.partial_success_ = 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 ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* ExportTraceServiceResponse::unsafe_arena_release_partial_success() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partial_success) + + ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* temp = _impl_.partial_success_; + _impl_.partial_success_ = nullptr; + return temp; +} +inline ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* ExportTraceServiceResponse::_internal_mutable_partial_success() { + + if (_impl_.partial_success_ == nullptr) { + auto* p = CreateMaybeMessage<::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess>(GetArenaForAllocation()); + _impl_.partial_success_ = p; + } + return _impl_.partial_success_; +} +inline ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* ExportTraceServiceResponse::mutable_partial_success() { + ::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* _msg = _internal_mutable_partial_success(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partial_success) + return _msg; +} +inline void ExportTraceServiceResponse::set_allocated_partial_success(::opentelemetry::proto::collector::trace::v1::ExportTracePartialSuccess* partial_success) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.partial_success_; + } + if (partial_success) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(partial_success); + if (message_arena != submessage_arena) { + partial_success = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, partial_success, submessage_arena); + } + + } else { + + } + _impl_.partial_success_ = partial_success; + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partial_success) +} + +// ------------------------------------------------------------------- + +// ExportTracePartialSuccess + +// int64 rejected_spans = 1; +inline void ExportTracePartialSuccess::clear_rejected_spans() { + _impl_.rejected_spans_ = int64_t{0}; +} +inline int64_t ExportTracePartialSuccess::_internal_rejected_spans() const { + return _impl_.rejected_spans_; +} +inline int64_t ExportTracePartialSuccess::rejected_spans() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.rejected_spans) + return _internal_rejected_spans(); +} +inline void ExportTracePartialSuccess::_internal_set_rejected_spans(int64_t value) { + + _impl_.rejected_spans_ = value; +} +inline void ExportTracePartialSuccess::set_rejected_spans(int64_t value) { + _internal_set_rejected_spans(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.rejected_spans) +} + +// string error_message = 2; +inline void ExportTracePartialSuccess::clear_error_message() { + _impl_.error_message_.ClearToEmpty(); +} +inline const std::string& ExportTracePartialSuccess::error_message() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.error_message) + return _internal_error_message(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ExportTracePartialSuccess::set_error_message(ArgT0&& arg0, ArgT... args) { + + _impl_.error_message_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.error_message) +} +inline std::string* ExportTracePartialSuccess::mutable_error_message() { + std::string* _s = _internal_mutable_error_message(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.error_message) + return _s; +} +inline const std::string& ExportTracePartialSuccess::_internal_error_message() const { + return _impl_.error_message_.Get(); +} +inline void ExportTracePartialSuccess::_internal_set_error_message(const std::string& value) { + + _impl_.error_message_.Set(value, GetArenaForAllocation()); +} +inline std::string* ExportTracePartialSuccess::_internal_mutable_error_message() { + + return _impl_.error_message_.Mutable(GetArenaForAllocation()); +} +inline std::string* ExportTracePartialSuccess::release_error_message() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.error_message) + return _impl_.error_message_.Release(); +} +inline void ExportTracePartialSuccess::set_allocated_error_message(std::string* error_message) { + if (error_message != nullptr) { + + } else { + + } + _impl_.error_message_.SetAllocated(error_message, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.error_message_.IsDefault()) { + _impl_.error_message_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.error_message) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1 +} // namespace trace +} // namespace collector +} // namespace proto +} // namespace opentelemetry + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2fcollector_2ftrace_2fv1_2ftrace_5fservice_2eproto diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto @@ -14,6 +14,8 @@ syntax = "proto3"; +option optimize_for = LITE_RUNTIME; + package opentelemetry.proto.collector.trace.v1; import "opentelemetry/proto/trace/v1/trace.proto"; diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.cc b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.cc @@ -0,0 +1,1895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opentelemetry/proto/common/v1/common.proto + +#include "opentelemetry/proto/common/v1/common.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/io/zero_copy_stream_impl_lite.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 opentelemetry { +namespace proto { +namespace common { +namespace v1 { +PROTOBUF_CONSTEXPR AnyValue::AnyValue( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.value_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} +struct AnyValueDefaultTypeInternal { + PROTOBUF_CONSTEXPR AnyValueDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~AnyValueDefaultTypeInternal() {} + union { + AnyValue _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AnyValueDefaultTypeInternal _AnyValue_default_instance_; +PROTOBUF_CONSTEXPR ArrayValue::ArrayValue( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.values_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ArrayValueDefaultTypeInternal { + PROTOBUF_CONSTEXPR ArrayValueDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ArrayValueDefaultTypeInternal() {} + union { + ArrayValue _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArrayValueDefaultTypeInternal _ArrayValue_default_instance_; +PROTOBUF_CONSTEXPR KeyValueList::KeyValueList( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.values_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct KeyValueListDefaultTypeInternal { + PROTOBUF_CONSTEXPR KeyValueListDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~KeyValueListDefaultTypeInternal() {} + union { + KeyValueList _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyValueListDefaultTypeInternal _KeyValueList_default_instance_; +PROTOBUF_CONSTEXPR KeyValue::KeyValue( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.value_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct KeyValueDefaultTypeInternal { + PROTOBUF_CONSTEXPR KeyValueDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~KeyValueDefaultTypeInternal() {} + union { + KeyValue _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyValueDefaultTypeInternal _KeyValue_default_instance_; +PROTOBUF_CONSTEXPR InstrumentationScope::InstrumentationScope( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.attributes_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.dropped_attributes_count_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct InstrumentationScopeDefaultTypeInternal { + PROTOBUF_CONSTEXPR InstrumentationScopeDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~InstrumentationScopeDefaultTypeInternal() {} + union { + InstrumentationScope _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstrumentationScopeDefaultTypeInternal _InstrumentationScope_default_instance_; +PROTOBUF_CONSTEXPR EntityRef::EntityRef( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.id_keys_)*/{} + , /*decltype(_impl_.description_keys_)*/{} + , /*decltype(_impl_.schema_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct EntityRefDefaultTypeInternal { + PROTOBUF_CONSTEXPR EntityRefDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EntityRefDefaultTypeInternal() {} + union { + EntityRef _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EntityRefDefaultTypeInternal _EntityRef_default_instance_; +} // namespace v1 +} // namespace common +} // namespace proto +} // namespace opentelemetry +namespace opentelemetry { +namespace proto { +namespace common { +namespace v1 { + +// =================================================================== + +class AnyValue::_Internal { + public: + static const ::opentelemetry::proto::common::v1::ArrayValue& array_value(const AnyValue* msg); + static const ::opentelemetry::proto::common::v1::KeyValueList& kvlist_value(const AnyValue* msg); +}; + +const ::opentelemetry::proto::common::v1::ArrayValue& +AnyValue::_Internal::array_value(const AnyValue* msg) { + return *msg->_impl_.value_.array_value_; +} +const ::opentelemetry::proto::common::v1::KeyValueList& +AnyValue::_Internal::kvlist_value(const AnyValue* msg) { + return *msg->_impl_.value_.kvlist_value_; +} +void AnyValue::set_allocated_array_value(::opentelemetry::proto::common::v1::ArrayValue* array_value) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_value(); + if (array_value) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(array_value); + if (message_arena != submessage_arena) { + array_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, array_value, submessage_arena); + } + set_has_array_value(); + _impl_.value_.array_value_ = array_value; + } + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.common.v1.AnyValue.array_value) +} +void AnyValue::set_allocated_kvlist_value(::opentelemetry::proto::common::v1::KeyValueList* kvlist_value) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_value(); + if (kvlist_value) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(kvlist_value); + if (message_arena != submessage_arena) { + kvlist_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, kvlist_value, submessage_arena); + } + set_has_kvlist_value(); + _impl_.value_.kvlist_value_ = kvlist_value; + } + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.common.v1.AnyValue.kvlist_value) +} +AnyValue::AnyValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.common.v1.AnyValue) +} +AnyValue::AnyValue(const AnyValue& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + AnyValue* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.value_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + clear_has_value(); + switch (from.value_case()) { + case kStringValue: { + _this->_internal_set_string_value(from._internal_string_value()); + break; + } + case kBoolValue: { + _this->_internal_set_bool_value(from._internal_bool_value()); + break; + } + case kIntValue: { + _this->_internal_set_int_value(from._internal_int_value()); + break; + } + case kDoubleValue: { + _this->_internal_set_double_value(from._internal_double_value()); + break; + } + case kArrayValue: { + _this->_internal_mutable_array_value()->::opentelemetry::proto::common::v1::ArrayValue::MergeFrom( + from._internal_array_value()); + break; + } + case kKvlistValue: { + _this->_internal_mutable_kvlist_value()->::opentelemetry::proto::common::v1::KeyValueList::MergeFrom( + from._internal_kvlist_value()); + break; + } + case kBytesValue: { + _this->_internal_set_bytes_value(from._internal_bytes_value()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.common.v1.AnyValue) +} + +inline void AnyValue::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.value_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} + }; + clear_has_value(); +} + +AnyValue::~AnyValue() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.common.v1.AnyValue) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void AnyValue::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (has_value()) { + clear_value(); + } +} + +void AnyValue::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void AnyValue::clear_value() { +// @@protoc_insertion_point(one_of_clear_start:opentelemetry.proto.common.v1.AnyValue) + switch (value_case()) { + case kStringValue: { + _impl_.value_.string_value_.Destroy(); + break; + } + case kBoolValue: { + // No need to clear + break; + } + case kIntValue: { + // No need to clear + break; + } + case kDoubleValue: { + // No need to clear + break; + } + case kArrayValue: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.value_.array_value_; + } + break; + } + case kKvlistValue: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.value_.kvlist_value_; + } + break; + } + case kBytesValue: { + _impl_.value_.bytes_value_.Destroy(); + break; + } + case VALUE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = VALUE_NOT_SET; +} + + +void AnyValue::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.common.v1.AnyValue) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_value(); + _internal_metadata_.Clear<std::string>(); +} + +const char* AnyValue::_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 string_value = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_string_value(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // bool bool_value = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + _internal_set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int64 int_value = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { + _internal_set_int_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // double double_value = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 33)) { + _internal_set_double_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr)); + ptr += sizeof(double); + } else + goto handle_unusual; + continue; + // .opentelemetry.proto.common.v1.ArrayValue array_value = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_array_value(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_kvlist_value(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes bytes_value = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) { + auto str = _internal_mutable_bytes_value(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + 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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* AnyValue::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.common.v1.AnyValue) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string string_value = 1; + if (_internal_has_string_value()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_string_value().data(), static_cast<int>(this->_internal_string_value().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.common.v1.AnyValue.string_value"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_string_value(), target); + } + + // bool bool_value = 2; + if (_internal_has_bool_value()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_bool_value(), target); + } + + // int64 int_value = 3; + if (_internal_has_int_value()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_int_value(), target); + } + + // double double_value = 4; + if (_internal_has_double_value()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_double_value(), target); + } + + // .opentelemetry.proto.common.v1.ArrayValue array_value = 5; + if (_internal_has_array_value()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::array_value(this), + _Internal::array_value(this).GetCachedSize(), target, stream); + } + + // .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; + if (_internal_has_kvlist_value()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, _Internal::kvlist_value(this), + _Internal::kvlist_value(this).GetCachedSize(), target, stream); + } + + // bytes bytes_value = 7; + if (_internal_has_bytes_value()) { + target = stream->WriteBytesMaybeAliased( + 7, this->_internal_bytes_value(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.common.v1.AnyValue) + return target; +} + +size_t AnyValue::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.common.v1.AnyValue) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + switch (value_case()) { + // string string_value = 1; + case kStringValue: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_string_value()); + break; + } + // bool bool_value = 2; + case kBoolValue: { + total_size += 1 + 1; + break; + } + // int64 int_value = 3; + case kIntValue: { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_int_value()); + break; + } + // double double_value = 4; + case kDoubleValue: { + total_size += 1 + 8; + break; + } + // .opentelemetry.proto.common.v1.ArrayValue array_value = 5; + case kArrayValue: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.value_.array_value_); + break; + } + // .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; + case kKvlistValue: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.value_.kvlist_value_); + break; + } + // bytes bytes_value = 7; + case kBytesValue: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_bytes_value()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AnyValue::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const AnyValue*>( + &from)); +} + +void AnyValue::MergeFrom(const AnyValue& from) { + AnyValue* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.common.v1.AnyValue) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + switch (from.value_case()) { + case kStringValue: { + _this->_internal_set_string_value(from._internal_string_value()); + break; + } + case kBoolValue: { + _this->_internal_set_bool_value(from._internal_bool_value()); + break; + } + case kIntValue: { + _this->_internal_set_int_value(from._internal_int_value()); + break; + } + case kDoubleValue: { + _this->_internal_set_double_value(from._internal_double_value()); + break; + } + case kArrayValue: { + _this->_internal_mutable_array_value()->::opentelemetry::proto::common::v1::ArrayValue::MergeFrom( + from._internal_array_value()); + break; + } + case kKvlistValue: { + _this->_internal_mutable_kvlist_value()->::opentelemetry::proto::common::v1::KeyValueList::MergeFrom( + from._internal_kvlist_value()); + break; + } + case kBytesValue: { + _this->_internal_set_bytes_value(from._internal_bytes_value()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void AnyValue::CopyFrom(const AnyValue& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.common.v1.AnyValue) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AnyValue::IsInitialized() const { + return true; +} + +void AnyValue::InternalSwap(AnyValue* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.value_, other->_impl_.value_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); +} + +std::string AnyValue::GetTypeName() const { + return "opentelemetry.proto.common.v1.AnyValue"; +} + + +// =================================================================== + +class ArrayValue::_Internal { + public: +}; + +ArrayValue::ArrayValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.common.v1.ArrayValue) +} +ArrayValue::ArrayValue(const ArrayValue& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ArrayValue* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.values_){from._impl_.values_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.common.v1.ArrayValue) +} + +inline void ArrayValue::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.values_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ArrayValue::~ArrayValue() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.common.v1.ArrayValue) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ArrayValue::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.values_.~RepeatedPtrField(); +} + +void ArrayValue::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ArrayValue::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.common.v1.ArrayValue) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.values_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ArrayValue::_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) { + // repeated .opentelemetry.proto.common.v1.AnyValue values = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_values(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ArrayValue::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.common.v1.ArrayValue) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .opentelemetry.proto.common.v1.AnyValue values = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_values_size()); i < n; i++) { + const auto& repfield = this->_internal_values(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.common.v1.ArrayValue) + return target; +} + +size_t ArrayValue::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.common.v1.ArrayValue) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.common.v1.AnyValue values = 1; + total_size += 1UL * this->_internal_values_size(); + for (const auto& msg : this->_impl_.values_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ArrayValue::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ArrayValue*>( + &from)); +} + +void ArrayValue::MergeFrom(const ArrayValue& from) { + ArrayValue* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.common.v1.ArrayValue) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.values_.MergeFrom(from._impl_.values_); + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ArrayValue::CopyFrom(const ArrayValue& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.common.v1.ArrayValue) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ArrayValue::IsInitialized() const { + return true; +} + +void ArrayValue::InternalSwap(ArrayValue* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.values_.InternalSwap(&other->_impl_.values_); +} + +std::string ArrayValue::GetTypeName() const { + return "opentelemetry.proto.common.v1.ArrayValue"; +} + + +// =================================================================== + +class KeyValueList::_Internal { + public: +}; + +KeyValueList::KeyValueList(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.common.v1.KeyValueList) +} +KeyValueList::KeyValueList(const KeyValueList& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + KeyValueList* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.values_){from._impl_.values_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.common.v1.KeyValueList) +} + +inline void KeyValueList::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.values_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +KeyValueList::~KeyValueList() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.common.v1.KeyValueList) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void KeyValueList::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.values_.~RepeatedPtrField(); +} + +void KeyValueList::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void KeyValueList::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.common.v1.KeyValueList) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.values_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* KeyValueList::_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) { + // repeated .opentelemetry.proto.common.v1.KeyValue values = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_values(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* KeyValueList::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.common.v1.KeyValueList) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .opentelemetry.proto.common.v1.KeyValue values = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_values_size()); i < n; i++) { + const auto& repfield = this->_internal_values(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.common.v1.KeyValueList) + return target; +} + +size_t KeyValueList::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.common.v1.KeyValueList) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.common.v1.KeyValue values = 1; + total_size += 1UL * this->_internal_values_size(); + for (const auto& msg : this->_impl_.values_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void KeyValueList::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const KeyValueList*>( + &from)); +} + +void KeyValueList::MergeFrom(const KeyValueList& from) { + KeyValueList* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.common.v1.KeyValueList) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.values_.MergeFrom(from._impl_.values_); + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void KeyValueList::CopyFrom(const KeyValueList& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.common.v1.KeyValueList) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KeyValueList::IsInitialized() const { + return true; +} + +void KeyValueList::InternalSwap(KeyValueList* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.values_.InternalSwap(&other->_impl_.values_); +} + +std::string KeyValueList::GetTypeName() const { + return "opentelemetry.proto.common.v1.KeyValueList"; +} + + +// =================================================================== + +class KeyValue::_Internal { + public: + static const ::opentelemetry::proto::common::v1::AnyValue& value(const KeyValue* msg); +}; + +const ::opentelemetry::proto::common::v1::AnyValue& +KeyValue::_Internal::value(const KeyValue* msg) { + return *msg->_impl_.value_; +} +KeyValue::KeyValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.common.v1.KeyValue) +} +KeyValue::KeyValue(const KeyValue& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + KeyValue* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.key_){} + , decltype(_impl_.value_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.key_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.key_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_key().empty()) { + _this->_impl_.key_.Set(from._internal_key(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_value()) { + _this->_impl_.value_ = new ::opentelemetry::proto::common::v1::AnyValue(*from._impl_.value_); + } + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.common.v1.KeyValue) +} + +inline void KeyValue::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.key_){} + , decltype(_impl_.value_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.key_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.key_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +KeyValue::~KeyValue() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.common.v1.KeyValue) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void KeyValue::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.key_.Destroy(); + if (this != internal_default_instance()) delete _impl_.value_; +} + +void KeyValue::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void KeyValue::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.common.v1.KeyValue) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.key_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) { + delete _impl_.value_; + } + _impl_.value_ = nullptr; + _internal_metadata_.Clear<std::string>(); +} + +const char* KeyValue::_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 key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_key(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // .opentelemetry.proto.common.v1.AnyValue value = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_value(), 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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* KeyValue::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.common.v1.KeyValue) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string key = 1; + if (!this->_internal_key().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_key().data(), static_cast<int>(this->_internal_key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.common.v1.KeyValue.key"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_key(), target); + } + + // .opentelemetry.proto.common.v1.AnyValue value = 2; + if (this->_internal_has_value()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::value(this), + _Internal::value(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.common.v1.KeyValue) + return target; +} + +size_t KeyValue::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.common.v1.KeyValue) + 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 key = 1; + if (!this->_internal_key().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_key()); + } + + // .opentelemetry.proto.common.v1.AnyValue value = 2; + if (this->_internal_has_value()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.value_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void KeyValue::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const KeyValue*>( + &from)); +} + +void KeyValue::MergeFrom(const KeyValue& from) { + KeyValue* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.common.v1.KeyValue) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_key().empty()) { + _this->_internal_set_key(from._internal_key()); + } + if (from._internal_has_value()) { + _this->_internal_mutable_value()->::opentelemetry::proto::common::v1::AnyValue::MergeFrom( + from._internal_value()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void KeyValue::CopyFrom(const KeyValue& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.common.v1.KeyValue) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KeyValue::IsInitialized() const { + return true; +} + +void KeyValue::InternalSwap(KeyValue* 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_.key_, lhs_arena, + &other->_impl_.key_, rhs_arena + ); + swap(_impl_.value_, other->_impl_.value_); +} + +std::string KeyValue::GetTypeName() const { + return "opentelemetry.proto.common.v1.KeyValue"; +} + + +// =================================================================== + +class InstrumentationScope::_Internal { + public: +}; + +InstrumentationScope::InstrumentationScope(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.common.v1.InstrumentationScope) +} +InstrumentationScope::InstrumentationScope(const InstrumentationScope& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + InstrumentationScope* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){from._impl_.attributes_} + , decltype(_impl_.name_){} + , decltype(_impl_.version_){} + , decltype(_impl_.dropped_attributes_count_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _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_.version_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.version_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_version().empty()) { + _this->_impl_.version_.Set(from._internal_version(), + _this->GetArenaForAllocation()); + } + _this->_impl_.dropped_attributes_count_ = from._impl_.dropped_attributes_count_; + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.common.v1.InstrumentationScope) +} + +inline void InstrumentationScope::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){arena} + , decltype(_impl_.name_){} + , decltype(_impl_.version_){} + , decltype(_impl_.dropped_attributes_count_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.version_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.version_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +InstrumentationScope::~InstrumentationScope() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.common.v1.InstrumentationScope) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void InstrumentationScope::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.attributes_.~RepeatedPtrField(); + _impl_.name_.Destroy(); + _impl_.version_.Destroy(); +} + +void InstrumentationScope::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void InstrumentationScope::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.common.v1.InstrumentationScope) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.attributes_.Clear(); + _impl_.name_.ClearToEmpty(); + _impl_.version_.ClearToEmpty(); + _impl_.dropped_attributes_count_ = 0u; + _internal_metadata_.Clear<std::string>(); +} + +const char* InstrumentationScope::_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 name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // string version = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_version(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_attributes(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // uint32 dropped_attributes_count = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { + _impl_.dropped_attributes_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* InstrumentationScope::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.common.v1.InstrumentationScope) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + 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, + "opentelemetry.proto.common.v1.InstrumentationScope.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // string version = 2; + if (!this->_internal_version().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_version().data(), static_cast<int>(this->_internal_version().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.common.v1.InstrumentationScope.version"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_version(), target); + } + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_attributes_size()); i < n; i++) { + const auto& repfield = this->_internal_attributes(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream); + } + + // uint32 dropped_attributes_count = 4; + if (this->_internal_dropped_attributes_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_dropped_attributes_count(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.common.v1.InstrumentationScope) + return target; +} + +size_t InstrumentationScope::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.common.v1.InstrumentationScope) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; + total_size += 1UL * this->_internal_attributes_size(); + for (const auto& msg : this->_impl_.attributes_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // string version = 2; + if (!this->_internal_version().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_version()); + } + + // uint32 dropped_attributes_count = 4; + if (this->_internal_dropped_attributes_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dropped_attributes_count()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void InstrumentationScope::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const InstrumentationScope*>( + &from)); +} + +void InstrumentationScope::MergeFrom(const InstrumentationScope& from) { + InstrumentationScope* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.common.v1.InstrumentationScope) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.attributes_.MergeFrom(from._impl_.attributes_); + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (!from._internal_version().empty()) { + _this->_internal_set_version(from._internal_version()); + } + if (from._internal_dropped_attributes_count() != 0) { + _this->_internal_set_dropped_attributes_count(from._internal_dropped_attributes_count()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void InstrumentationScope::CopyFrom(const InstrumentationScope& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.common.v1.InstrumentationScope) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool InstrumentationScope::IsInitialized() const { + return true; +} + +void InstrumentationScope::InternalSwap(InstrumentationScope* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.attributes_.InternalSwap(&other->_impl_.attributes_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.version_, lhs_arena, + &other->_impl_.version_, rhs_arena + ); + swap(_impl_.dropped_attributes_count_, other->_impl_.dropped_attributes_count_); +} + +std::string InstrumentationScope::GetTypeName() const { + return "opentelemetry.proto.common.v1.InstrumentationScope"; +} + + +// =================================================================== + +class EntityRef::_Internal { + public: +}; + +EntityRef::EntityRef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.common.v1.EntityRef) +} +EntityRef::EntityRef(const EntityRef& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + EntityRef* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.id_keys_){from._impl_.id_keys_} + , decltype(_impl_.description_keys_){from._impl_.description_keys_} + , decltype(_impl_.schema_url_){} + , decltype(_impl_.type_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.schema_url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_schema_url().empty()) { + _this->_impl_.schema_url_.Set(from._internal_schema_url(), + _this->GetArenaForAllocation()); + } + _impl_.type_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.type_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_type().empty()) { + _this->_impl_.type_.Set(from._internal_type(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.common.v1.EntityRef) +} + +inline void EntityRef::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.id_keys_){arena} + , decltype(_impl_.description_keys_){arena} + , decltype(_impl_.schema_url_){} + , decltype(_impl_.type_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.schema_url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.type_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.type_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +EntityRef::~EntityRef() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.common.v1.EntityRef) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EntityRef::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.id_keys_.~RepeatedPtrField(); + _impl_.description_keys_.~RepeatedPtrField(); + _impl_.schema_url_.Destroy(); + _impl_.type_.Destroy(); +} + +void EntityRef::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void EntityRef::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.common.v1.EntityRef) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.id_keys_.Clear(); + _impl_.description_keys_.Clear(); + _impl_.schema_url_.ClearToEmpty(); + _impl_.type_.ClearToEmpty(); + _internal_metadata_.Clear<std::string>(); +} + +const char* EntityRef::_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 schema_url = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_schema_url(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // string type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_type(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // repeated string id_keys = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_id_keys(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // repeated string description_keys = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_description_keys(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* EntityRef::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.common.v1.EntityRef) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string schema_url = 1; + if (!this->_internal_schema_url().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_schema_url().data(), static_cast<int>(this->_internal_schema_url().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.common.v1.EntityRef.schema_url"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_schema_url(), target); + } + + // string type = 2; + if (!this->_internal_type().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_type().data(), static_cast<int>(this->_internal_type().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.common.v1.EntityRef.type"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_type(), target); + } + + // repeated string id_keys = 3; + for (int i = 0, n = this->_internal_id_keys_size(); i < n; i++) { + const auto& s = this->_internal_id_keys(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast<int>(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.common.v1.EntityRef.id_keys"); + target = stream->WriteString(3, s, target); + } + + // repeated string description_keys = 4; + for (int i = 0, n = this->_internal_description_keys_size(); i < n; i++) { + const auto& s = this->_internal_description_keys(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast<int>(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.common.v1.EntityRef.description_keys"); + target = stream->WriteString(4, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.common.v1.EntityRef) + return target; +} + +size_t EntityRef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.common.v1.EntityRef) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string id_keys = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.id_keys_.size()); + for (int i = 0, n = _impl_.id_keys_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.id_keys_.Get(i)); + } + + // repeated string description_keys = 4; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.description_keys_.size()); + for (int i = 0, n = _impl_.description_keys_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.description_keys_.Get(i)); + } + + // string schema_url = 1; + if (!this->_internal_schema_url().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_schema_url()); + } + + // string type = 2; + if (!this->_internal_type().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_type()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void EntityRef::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const EntityRef*>( + &from)); +} + +void EntityRef::MergeFrom(const EntityRef& from) { + EntityRef* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.common.v1.EntityRef) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.id_keys_.MergeFrom(from._impl_.id_keys_); + _this->_impl_.description_keys_.MergeFrom(from._impl_.description_keys_); + if (!from._internal_schema_url().empty()) { + _this->_internal_set_schema_url(from._internal_schema_url()); + } + if (!from._internal_type().empty()) { + _this->_internal_set_type(from._internal_type()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void EntityRef::CopyFrom(const EntityRef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.common.v1.EntityRef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EntityRef::IsInitialized() const { + return true; +} + +void EntityRef::InternalSwap(EntityRef* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.id_keys_.InternalSwap(&other->_impl_.id_keys_); + _impl_.description_keys_.InternalSwap(&other->_impl_.description_keys_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.schema_url_, lhs_arena, + &other->_impl_.schema_url_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.type_, lhs_arena, + &other->_impl_.type_, rhs_arena + ); +} + +std::string EntityRef::GetTypeName() const { + return "opentelemetry.proto.common.v1.EntityRef"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace common +} // namespace proto +} // namespace opentelemetry +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::common::v1::AnyValue* +Arena::CreateMaybeMessage< ::opentelemetry::proto::common::v1::AnyValue >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::common::v1::AnyValue >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::common::v1::ArrayValue* +Arena::CreateMaybeMessage< ::opentelemetry::proto::common::v1::ArrayValue >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::common::v1::ArrayValue >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::common::v1::KeyValueList* +Arena::CreateMaybeMessage< ::opentelemetry::proto::common::v1::KeyValueList >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::common::v1::KeyValueList >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::common::v1::KeyValue* +Arena::CreateMaybeMessage< ::opentelemetry::proto::common::v1::KeyValue >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::common::v1::KeyValue >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::common::v1::InstrumentationScope* +Arena::CreateMaybeMessage< ::opentelemetry::proto::common::v1::InstrumentationScope >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::common::v1::InstrumentationScope >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::common::v1::EntityRef* +Arena::CreateMaybeMessage< ::opentelemetry::proto::common::v1::EntityRef >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::common::v1::EntityRef >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.h b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.h @@ -0,0 +1,2284 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opentelemetry/proto/common/v1/common.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_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 3021006 < 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/message_lite.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto { + static const uint32_t offsets[]; +}; +namespace opentelemetry { +namespace proto { +namespace common { +namespace v1 { +class AnyValue; +struct AnyValueDefaultTypeInternal; +extern AnyValueDefaultTypeInternal _AnyValue_default_instance_; +class ArrayValue; +struct ArrayValueDefaultTypeInternal; +extern ArrayValueDefaultTypeInternal _ArrayValue_default_instance_; +class EntityRef; +struct EntityRefDefaultTypeInternal; +extern EntityRefDefaultTypeInternal _EntityRef_default_instance_; +class InstrumentationScope; +struct InstrumentationScopeDefaultTypeInternal; +extern InstrumentationScopeDefaultTypeInternal _InstrumentationScope_default_instance_; +class KeyValue; +struct KeyValueDefaultTypeInternal; +extern KeyValueDefaultTypeInternal _KeyValue_default_instance_; +class KeyValueList; +struct KeyValueListDefaultTypeInternal; +extern KeyValueListDefaultTypeInternal _KeyValueList_default_instance_; +} // namespace v1 +} // namespace common +} // namespace proto +} // namespace opentelemetry +PROTOBUF_NAMESPACE_OPEN +template<> ::opentelemetry::proto::common::v1::AnyValue* Arena::CreateMaybeMessage<::opentelemetry::proto::common::v1::AnyValue>(Arena*); +template<> ::opentelemetry::proto::common::v1::ArrayValue* Arena::CreateMaybeMessage<::opentelemetry::proto::common::v1::ArrayValue>(Arena*); +template<> ::opentelemetry::proto::common::v1::EntityRef* Arena::CreateMaybeMessage<::opentelemetry::proto::common::v1::EntityRef>(Arena*); +template<> ::opentelemetry::proto::common::v1::InstrumentationScope* Arena::CreateMaybeMessage<::opentelemetry::proto::common::v1::InstrumentationScope>(Arena*); +template<> ::opentelemetry::proto::common::v1::KeyValue* Arena::CreateMaybeMessage<::opentelemetry::proto::common::v1::KeyValue>(Arena*); +template<> ::opentelemetry::proto::common::v1::KeyValueList* Arena::CreateMaybeMessage<::opentelemetry::proto::common::v1::KeyValueList>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace opentelemetry { +namespace proto { +namespace common { +namespace v1 { + +// =================================================================== + +class AnyValue final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.common.v1.AnyValue) */ { + public: + inline AnyValue() : AnyValue(nullptr) {} + ~AnyValue() override; + explicit PROTOBUF_CONSTEXPR AnyValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AnyValue(const AnyValue& from); + AnyValue(AnyValue&& from) noexcept + : AnyValue() { + *this = ::std::move(from); + } + + inline AnyValue& operator=(const AnyValue& from) { + CopyFrom(from); + return *this; + } + inline AnyValue& operator=(AnyValue&& 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 AnyValue& default_instance() { + return *internal_default_instance(); + } + enum ValueCase { + kStringValue = 1, + kBoolValue = 2, + kIntValue = 3, + kDoubleValue = 4, + kArrayValue = 5, + kKvlistValue = 6, + kBytesValue = 7, + VALUE_NOT_SET = 0, + }; + + static inline const AnyValue* internal_default_instance() { + return reinterpret_cast<const AnyValue*>( + &_AnyValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(AnyValue& a, AnyValue& b) { + a.Swap(&b); + } + inline void Swap(AnyValue* 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(AnyValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AnyValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<AnyValue>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const AnyValue& from); + void MergeFrom(const AnyValue& from); + 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; + void InternalSwap(AnyValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.common.v1.AnyValue"; + } + protected: + explicit AnyValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStringValueFieldNumber = 1, + kBoolValueFieldNumber = 2, + kIntValueFieldNumber = 3, + kDoubleValueFieldNumber = 4, + kArrayValueFieldNumber = 5, + kKvlistValueFieldNumber = 6, + kBytesValueFieldNumber = 7, + }; + // string string_value = 1; + bool has_string_value() const; + private: + bool _internal_has_string_value() const; + public: + void clear_string_value(); + const std::string& string_value() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_string_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_string_value(); + PROTOBUF_NODISCARD std::string* release_string_value(); + void set_allocated_string_value(std::string* string_value); + private: + const std::string& _internal_string_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_string_value(const std::string& value); + std::string* _internal_mutable_string_value(); + public: + + // bool bool_value = 2; + bool has_bool_value() const; + private: + bool _internal_has_bool_value() const; + public: + void clear_bool_value(); + bool bool_value() const; + void set_bool_value(bool value); + private: + bool _internal_bool_value() const; + void _internal_set_bool_value(bool value); + public: + + // int64 int_value = 3; + bool has_int_value() const; + private: + bool _internal_has_int_value() const; + public: + void clear_int_value(); + int64_t int_value() const; + void set_int_value(int64_t value); + private: + int64_t _internal_int_value() const; + void _internal_set_int_value(int64_t value); + public: + + // double double_value = 4; + bool has_double_value() const; + private: + bool _internal_has_double_value() const; + public: + void clear_double_value(); + double double_value() const; + void set_double_value(double value); + private: + double _internal_double_value() const; + void _internal_set_double_value(double value); + public: + + // .opentelemetry.proto.common.v1.ArrayValue array_value = 5; + bool has_array_value() const; + private: + bool _internal_has_array_value() const; + public: + void clear_array_value(); + const ::opentelemetry::proto::common::v1::ArrayValue& array_value() const; + PROTOBUF_NODISCARD ::opentelemetry::proto::common::v1::ArrayValue* release_array_value(); + ::opentelemetry::proto::common::v1::ArrayValue* mutable_array_value(); + void set_allocated_array_value(::opentelemetry::proto::common::v1::ArrayValue* array_value); + private: + const ::opentelemetry::proto::common::v1::ArrayValue& _internal_array_value() const; + ::opentelemetry::proto::common::v1::ArrayValue* _internal_mutable_array_value(); + public: + void unsafe_arena_set_allocated_array_value( + ::opentelemetry::proto::common::v1::ArrayValue* array_value); + ::opentelemetry::proto::common::v1::ArrayValue* unsafe_arena_release_array_value(); + + // .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; + bool has_kvlist_value() const; + private: + bool _internal_has_kvlist_value() const; + public: + void clear_kvlist_value(); + const ::opentelemetry::proto::common::v1::KeyValueList& kvlist_value() const; + PROTOBUF_NODISCARD ::opentelemetry::proto::common::v1::KeyValueList* release_kvlist_value(); + ::opentelemetry::proto::common::v1::KeyValueList* mutable_kvlist_value(); + void set_allocated_kvlist_value(::opentelemetry::proto::common::v1::KeyValueList* kvlist_value); + private: + const ::opentelemetry::proto::common::v1::KeyValueList& _internal_kvlist_value() const; + ::opentelemetry::proto::common::v1::KeyValueList* _internal_mutable_kvlist_value(); + public: + void unsafe_arena_set_allocated_kvlist_value( + ::opentelemetry::proto::common::v1::KeyValueList* kvlist_value); + ::opentelemetry::proto::common::v1::KeyValueList* unsafe_arena_release_kvlist_value(); + + // bytes bytes_value = 7; + bool has_bytes_value() const; + private: + bool _internal_has_bytes_value() const; + public: + void clear_bytes_value(); + const std::string& bytes_value() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_bytes_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_bytes_value(); + PROTOBUF_NODISCARD std::string* release_bytes_value(); + void set_allocated_bytes_value(std::string* bytes_value); + private: + const std::string& _internal_bytes_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_bytes_value(const std::string& value); + std::string* _internal_mutable_bytes_value(); + public: + + void clear_value(); + ValueCase value_case() const; + // @@protoc_insertion_point(class_scope:opentelemetry.proto.common.v1.AnyValue) + private: + class _Internal; + void set_has_string_value(); + void set_has_bool_value(); + void set_has_int_value(); + void set_has_double_value(); + void set_has_array_value(); + void set_has_kvlist_value(); + void set_has_bytes_value(); + + inline bool has_value() const; + inline void clear_has_value(); + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union ValueUnion { + constexpr ValueUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_; + bool bool_value_; + int64_t int_value_; + double double_value_; + ::opentelemetry::proto::common::v1::ArrayValue* array_value_; + ::opentelemetry::proto::common::v1::KeyValueList* kvlist_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bytes_value_; + } value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto; +}; +// ------------------------------------------------------------------- + +class ArrayValue final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.common.v1.ArrayValue) */ { + public: + inline ArrayValue() : ArrayValue(nullptr) {} + ~ArrayValue() override; + explicit PROTOBUF_CONSTEXPR ArrayValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ArrayValue(const ArrayValue& from); + ArrayValue(ArrayValue&& from) noexcept + : ArrayValue() { + *this = ::std::move(from); + } + + inline ArrayValue& operator=(const ArrayValue& from) { + CopyFrom(from); + return *this; + } + inline ArrayValue& operator=(ArrayValue&& 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 ArrayValue& default_instance() { + return *internal_default_instance(); + } + static inline const ArrayValue* internal_default_instance() { + return reinterpret_cast<const ArrayValue*>( + &_ArrayValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ArrayValue& a, ArrayValue& b) { + a.Swap(&b); + } + inline void Swap(ArrayValue* 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(ArrayValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ArrayValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ArrayValue>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ArrayValue& from); + void MergeFrom(const ArrayValue& from); + 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; + void InternalSwap(ArrayValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.common.v1.ArrayValue"; + } + protected: + explicit ArrayValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValuesFieldNumber = 1, + }; + // repeated .opentelemetry.proto.common.v1.AnyValue values = 1; + int values_size() const; + private: + int _internal_values_size() const; + public: + void clear_values(); + ::opentelemetry::proto::common::v1::AnyValue* mutable_values(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::AnyValue >* + mutable_values(); + private: + const ::opentelemetry::proto::common::v1::AnyValue& _internal_values(int index) const; + ::opentelemetry::proto::common::v1::AnyValue* _internal_add_values(); + public: + const ::opentelemetry::proto::common::v1::AnyValue& values(int index) const; + ::opentelemetry::proto::common::v1::AnyValue* add_values(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::AnyValue >& + values() const; + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.common.v1.ArrayValue) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::AnyValue > values_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto; +}; +// ------------------------------------------------------------------- + +class KeyValueList final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.common.v1.KeyValueList) */ { + public: + inline KeyValueList() : KeyValueList(nullptr) {} + ~KeyValueList() override; + explicit PROTOBUF_CONSTEXPR KeyValueList(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + KeyValueList(const KeyValueList& from); + KeyValueList(KeyValueList&& from) noexcept + : KeyValueList() { + *this = ::std::move(from); + } + + inline KeyValueList& operator=(const KeyValueList& from) { + CopyFrom(from); + return *this; + } + inline KeyValueList& operator=(KeyValueList&& 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 KeyValueList& default_instance() { + return *internal_default_instance(); + } + static inline const KeyValueList* internal_default_instance() { + return reinterpret_cast<const KeyValueList*>( + &_KeyValueList_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(KeyValueList& a, KeyValueList& b) { + a.Swap(&b); + } + inline void Swap(KeyValueList* 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(KeyValueList* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + KeyValueList* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<KeyValueList>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const KeyValueList& from); + void MergeFrom(const KeyValueList& from); + 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; + void InternalSwap(KeyValueList* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.common.v1.KeyValueList"; + } + protected: + explicit KeyValueList(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValuesFieldNumber = 1, + }; + // repeated .opentelemetry.proto.common.v1.KeyValue values = 1; + int values_size() const; + private: + int _internal_values_size() const; + public: + void clear_values(); + ::opentelemetry::proto::common::v1::KeyValue* mutable_values(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* + mutable_values(); + private: + const ::opentelemetry::proto::common::v1::KeyValue& _internal_values(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* _internal_add_values(); + public: + const ::opentelemetry::proto::common::v1::KeyValue& values(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* add_values(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& + values() const; + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.common.v1.KeyValueList) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue > values_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto; +}; +// ------------------------------------------------------------------- + +class KeyValue final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.common.v1.KeyValue) */ { + public: + inline KeyValue() : KeyValue(nullptr) {} + ~KeyValue() override; + explicit PROTOBUF_CONSTEXPR KeyValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + KeyValue(const KeyValue& from); + KeyValue(KeyValue&& from) noexcept + : KeyValue() { + *this = ::std::move(from); + } + + inline KeyValue& operator=(const KeyValue& from) { + CopyFrom(from); + return *this; + } + inline KeyValue& operator=(KeyValue&& 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 KeyValue& default_instance() { + return *internal_default_instance(); + } + static inline const KeyValue* internal_default_instance() { + return reinterpret_cast<const KeyValue*>( + &_KeyValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(KeyValue& a, KeyValue& b) { + a.Swap(&b); + } + inline void Swap(KeyValue* 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(KeyValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + KeyValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<KeyValue>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const KeyValue& from); + void MergeFrom(const KeyValue& from); + 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; + void InternalSwap(KeyValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.common.v1.KeyValue"; + } + protected: + explicit KeyValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kKeyFieldNumber = 1, + kValueFieldNumber = 2, + }; + // string key = 1; + void clear_key(); + const std::string& key() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* key); + private: + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); + std::string* _internal_mutable_key(); + public: + + // .opentelemetry.proto.common.v1.AnyValue value = 2; + bool has_value() const; + private: + bool _internal_has_value() const; + public: + void clear_value(); + const ::opentelemetry::proto::common::v1::AnyValue& value() const; + PROTOBUF_NODISCARD ::opentelemetry::proto::common::v1::AnyValue* release_value(); + ::opentelemetry::proto::common::v1::AnyValue* mutable_value(); + void set_allocated_value(::opentelemetry::proto::common::v1::AnyValue* value); + private: + const ::opentelemetry::proto::common::v1::AnyValue& _internal_value() const; + ::opentelemetry::proto::common::v1::AnyValue* _internal_mutable_value(); + public: + void unsafe_arena_set_allocated_value( + ::opentelemetry::proto::common::v1::AnyValue* value); + ::opentelemetry::proto::common::v1::AnyValue* unsafe_arena_release_value(); + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.common.v1.KeyValue) + 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 key_; + ::opentelemetry::proto::common::v1::AnyValue* value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto; +}; +// ------------------------------------------------------------------- + +class InstrumentationScope final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.common.v1.InstrumentationScope) */ { + public: + inline InstrumentationScope() : InstrumentationScope(nullptr) {} + ~InstrumentationScope() override; + explicit PROTOBUF_CONSTEXPR InstrumentationScope(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + InstrumentationScope(const InstrumentationScope& from); + InstrumentationScope(InstrumentationScope&& from) noexcept + : InstrumentationScope() { + *this = ::std::move(from); + } + + inline InstrumentationScope& operator=(const InstrumentationScope& from) { + CopyFrom(from); + return *this; + } + inline InstrumentationScope& operator=(InstrumentationScope&& 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 InstrumentationScope& default_instance() { + return *internal_default_instance(); + } + static inline const InstrumentationScope* internal_default_instance() { + return reinterpret_cast<const InstrumentationScope*>( + &_InstrumentationScope_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(InstrumentationScope& a, InstrumentationScope& b) { + a.Swap(&b); + } + inline void Swap(InstrumentationScope* 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(InstrumentationScope* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + InstrumentationScope* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<InstrumentationScope>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const InstrumentationScope& from); + void MergeFrom(const InstrumentationScope& from); + 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; + void InternalSwap(InstrumentationScope* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.common.v1.InstrumentationScope"; + } + protected: + explicit InstrumentationScope(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAttributesFieldNumber = 3, + kNameFieldNumber = 1, + kVersionFieldNumber = 2, + kDroppedAttributesCountFieldNumber = 4, + }; + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; + int attributes_size() const; + private: + int _internal_attributes_size() const; + public: + void clear_attributes(); + ::opentelemetry::proto::common::v1::KeyValue* mutable_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* + mutable_attributes(); + private: + const ::opentelemetry::proto::common::v1::KeyValue& _internal_attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* _internal_add_attributes(); + public: + const ::opentelemetry::proto::common::v1::KeyValue& attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* add_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& + attributes() const; + + // string name = 1; + 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 version = 2; + void clear_version(); + const std::string& version() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_version(); + PROTOBUF_NODISCARD std::string* release_version(); + void set_allocated_version(std::string* version); + private: + const std::string& _internal_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_version(const std::string& value); + std::string* _internal_mutable_version(); + public: + + // uint32 dropped_attributes_count = 4; + void clear_dropped_attributes_count(); + uint32_t dropped_attributes_count() const; + void set_dropped_attributes_count(uint32_t value); + private: + uint32_t _internal_dropped_attributes_count() const; + void _internal_set_dropped_attributes_count(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.common.v1.InstrumentationScope) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue > attributes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_; + uint32_t dropped_attributes_count_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto; +}; +// ------------------------------------------------------------------- + +class EntityRef final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.common.v1.EntityRef) */ { + public: + inline EntityRef() : EntityRef(nullptr) {} + ~EntityRef() override; + explicit PROTOBUF_CONSTEXPR EntityRef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EntityRef(const EntityRef& from); + EntityRef(EntityRef&& from) noexcept + : EntityRef() { + *this = ::std::move(from); + } + + inline EntityRef& operator=(const EntityRef& from) { + CopyFrom(from); + return *this; + } + inline EntityRef& operator=(EntityRef&& 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 EntityRef& default_instance() { + return *internal_default_instance(); + } + static inline const EntityRef* internal_default_instance() { + return reinterpret_cast<const EntityRef*>( + &_EntityRef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(EntityRef& a, EntityRef& b) { + a.Swap(&b); + } + inline void Swap(EntityRef* 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(EntityRef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EntityRef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<EntityRef>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const EntityRef& from); + void MergeFrom(const EntityRef& from); + 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; + void InternalSwap(EntityRef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.common.v1.EntityRef"; + } + protected: + explicit EntityRef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIdKeysFieldNumber = 3, + kDescriptionKeysFieldNumber = 4, + kSchemaUrlFieldNumber = 1, + kTypeFieldNumber = 2, + }; + // repeated string id_keys = 3; + int id_keys_size() const; + private: + int _internal_id_keys_size() const; + public: + void clear_id_keys(); + const std::string& id_keys(int index) const; + std::string* mutable_id_keys(int index); + void set_id_keys(int index, const std::string& value); + void set_id_keys(int index, std::string&& value); + void set_id_keys(int index, const char* value); + void set_id_keys(int index, const char* value, size_t size); + std::string* add_id_keys(); + void add_id_keys(const std::string& value); + void add_id_keys(std::string&& value); + void add_id_keys(const char* value); + void add_id_keys(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& id_keys() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_id_keys(); + private: + const std::string& _internal_id_keys(int index) const; + std::string* _internal_add_id_keys(); + public: + + // repeated string description_keys = 4; + int description_keys_size() const; + private: + int _internal_description_keys_size() const; + public: + void clear_description_keys(); + const std::string& description_keys(int index) const; + std::string* mutable_description_keys(int index); + void set_description_keys(int index, const std::string& value); + void set_description_keys(int index, std::string&& value); + void set_description_keys(int index, const char* value); + void set_description_keys(int index, const char* value, size_t size); + std::string* add_description_keys(); + void add_description_keys(const std::string& value); + void add_description_keys(std::string&& value); + void add_description_keys(const char* value); + void add_description_keys(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& description_keys() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_description_keys(); + private: + const std::string& _internal_description_keys(int index) const; + std::string* _internal_add_description_keys(); + public: + + // string schema_url = 1; + void clear_schema_url(); + const std::string& schema_url() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_schema_url(ArgT0&& arg0, ArgT... args); + std::string* mutable_schema_url(); + PROTOBUF_NODISCARD std::string* release_schema_url(); + void set_allocated_schema_url(std::string* schema_url); + private: + const std::string& _internal_schema_url() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_schema_url(const std::string& value); + std::string* _internal_mutable_schema_url(); + public: + + // string type = 2; + void clear_type(); + const std::string& type() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_type(); + PROTOBUF_NODISCARD std::string* release_type(); + void set_allocated_type(std::string* type); + private: + const std::string& _internal_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_type(const std::string& value); + std::string* _internal_mutable_type(); + public: + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.common.v1.EntityRef) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> id_keys_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> description_keys_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_url_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// AnyValue + +// string string_value = 1; +inline bool AnyValue::_internal_has_string_value() const { + return value_case() == kStringValue; +} +inline bool AnyValue::has_string_value() const { + return _internal_has_string_value(); +} +inline void AnyValue::set_has_string_value() { + _impl_._oneof_case_[0] = kStringValue; +} +inline void AnyValue::clear_string_value() { + if (_internal_has_string_value()) { + _impl_.value_.string_value_.Destroy(); + clear_has_value(); + } +} +inline const std::string& AnyValue::string_value() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.AnyValue.string_value) + return _internal_string_value(); +} +template <typename ArgT0, typename... ArgT> +inline void AnyValue::set_string_value(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_string_value()) { + clear_value(); + set_has_string_value(); + _impl_.value_.string_value_.InitDefault(); + } + _impl_.value_.string_value_.Set( static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.AnyValue.string_value) +} +inline std::string* AnyValue::mutable_string_value() { + std::string* _s = _internal_mutable_string_value(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.AnyValue.string_value) + return _s; +} +inline const std::string& AnyValue::_internal_string_value() const { + if (_internal_has_string_value()) { + return _impl_.value_.string_value_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void AnyValue::_internal_set_string_value(const std::string& value) { + if (!_internal_has_string_value()) { + clear_value(); + set_has_string_value(); + _impl_.value_.string_value_.InitDefault(); + } + _impl_.value_.string_value_.Set(value, GetArenaForAllocation()); +} +inline std::string* AnyValue::_internal_mutable_string_value() { + if (!_internal_has_string_value()) { + clear_value(); + set_has_string_value(); + _impl_.value_.string_value_.InitDefault(); + } + return _impl_.value_.string_value_.Mutable( GetArenaForAllocation()); +} +inline std::string* AnyValue::release_string_value() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.AnyValue.string_value) + if (_internal_has_string_value()) { + clear_has_value(); + return _impl_.value_.string_value_.Release(); + } else { + return nullptr; + } +} +inline void AnyValue::set_allocated_string_value(std::string* string_value) { + if (has_value()) { + clear_value(); + } + if (string_value != nullptr) { + set_has_string_value(); + _impl_.value_.string_value_.InitAllocated(string_value, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.common.v1.AnyValue.string_value) +} + +// bool bool_value = 2; +inline bool AnyValue::_internal_has_bool_value() const { + return value_case() == kBoolValue; +} +inline bool AnyValue::has_bool_value() const { + return _internal_has_bool_value(); +} +inline void AnyValue::set_has_bool_value() { + _impl_._oneof_case_[0] = kBoolValue; +} +inline void AnyValue::clear_bool_value() { + if (_internal_has_bool_value()) { + _impl_.value_.bool_value_ = false; + clear_has_value(); + } +} +inline bool AnyValue::_internal_bool_value() const { + if (_internal_has_bool_value()) { + return _impl_.value_.bool_value_; + } + return false; +} +inline void AnyValue::_internal_set_bool_value(bool value) { + if (!_internal_has_bool_value()) { + clear_value(); + set_has_bool_value(); + } + _impl_.value_.bool_value_ = value; +} +inline bool AnyValue::bool_value() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.AnyValue.bool_value) + return _internal_bool_value(); +} +inline void AnyValue::set_bool_value(bool value) { + _internal_set_bool_value(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.AnyValue.bool_value) +} + +// int64 int_value = 3; +inline bool AnyValue::_internal_has_int_value() const { + return value_case() == kIntValue; +} +inline bool AnyValue::has_int_value() const { + return _internal_has_int_value(); +} +inline void AnyValue::set_has_int_value() { + _impl_._oneof_case_[0] = kIntValue; +} +inline void AnyValue::clear_int_value() { + if (_internal_has_int_value()) { + _impl_.value_.int_value_ = int64_t{0}; + clear_has_value(); + } +} +inline int64_t AnyValue::_internal_int_value() const { + if (_internal_has_int_value()) { + return _impl_.value_.int_value_; + } + return int64_t{0}; +} +inline void AnyValue::_internal_set_int_value(int64_t value) { + if (!_internal_has_int_value()) { + clear_value(); + set_has_int_value(); + } + _impl_.value_.int_value_ = value; +} +inline int64_t AnyValue::int_value() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.AnyValue.int_value) + return _internal_int_value(); +} +inline void AnyValue::set_int_value(int64_t value) { + _internal_set_int_value(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.AnyValue.int_value) +} + +// double double_value = 4; +inline bool AnyValue::_internal_has_double_value() const { + return value_case() == kDoubleValue; +} +inline bool AnyValue::has_double_value() const { + return _internal_has_double_value(); +} +inline void AnyValue::set_has_double_value() { + _impl_._oneof_case_[0] = kDoubleValue; +} +inline void AnyValue::clear_double_value() { + if (_internal_has_double_value()) { + _impl_.value_.double_value_ = 0; + clear_has_value(); + } +} +inline double AnyValue::_internal_double_value() const { + if (_internal_has_double_value()) { + return _impl_.value_.double_value_; + } + return 0; +} +inline void AnyValue::_internal_set_double_value(double value) { + if (!_internal_has_double_value()) { + clear_value(); + set_has_double_value(); + } + _impl_.value_.double_value_ = value; +} +inline double AnyValue::double_value() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.AnyValue.double_value) + return _internal_double_value(); +} +inline void AnyValue::set_double_value(double value) { + _internal_set_double_value(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.AnyValue.double_value) +} + +// .opentelemetry.proto.common.v1.ArrayValue array_value = 5; +inline bool AnyValue::_internal_has_array_value() const { + return value_case() == kArrayValue; +} +inline bool AnyValue::has_array_value() const { + return _internal_has_array_value(); +} +inline void AnyValue::set_has_array_value() { + _impl_._oneof_case_[0] = kArrayValue; +} +inline void AnyValue::clear_array_value() { + if (_internal_has_array_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.value_.array_value_; + } + clear_has_value(); + } +} +inline ::opentelemetry::proto::common::v1::ArrayValue* AnyValue::release_array_value() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.AnyValue.array_value) + if (_internal_has_array_value()) { + clear_has_value(); + ::opentelemetry::proto::common::v1::ArrayValue* temp = _impl_.value_.array_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.value_.array_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::opentelemetry::proto::common::v1::ArrayValue& AnyValue::_internal_array_value() const { + return _internal_has_array_value() + ? *_impl_.value_.array_value_ + : reinterpret_cast< ::opentelemetry::proto::common::v1::ArrayValue&>(::opentelemetry::proto::common::v1::_ArrayValue_default_instance_); +} +inline const ::opentelemetry::proto::common::v1::ArrayValue& AnyValue::array_value() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.AnyValue.array_value) + return _internal_array_value(); +} +inline ::opentelemetry::proto::common::v1::ArrayValue* AnyValue::unsafe_arena_release_array_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:opentelemetry.proto.common.v1.AnyValue.array_value) + if (_internal_has_array_value()) { + clear_has_value(); + ::opentelemetry::proto::common::v1::ArrayValue* temp = _impl_.value_.array_value_; + _impl_.value_.array_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void AnyValue::unsafe_arena_set_allocated_array_value(::opentelemetry::proto::common::v1::ArrayValue* array_value) { + clear_value(); + if (array_value) { + set_has_array_value(); + _impl_.value_.array_value_ = array_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opentelemetry.proto.common.v1.AnyValue.array_value) +} +inline ::opentelemetry::proto::common::v1::ArrayValue* AnyValue::_internal_mutable_array_value() { + if (!_internal_has_array_value()) { + clear_value(); + set_has_array_value(); + _impl_.value_.array_value_ = CreateMaybeMessage< ::opentelemetry::proto::common::v1::ArrayValue >(GetArenaForAllocation()); + } + return _impl_.value_.array_value_; +} +inline ::opentelemetry::proto::common::v1::ArrayValue* AnyValue::mutable_array_value() { + ::opentelemetry::proto::common::v1::ArrayValue* _msg = _internal_mutable_array_value(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.AnyValue.array_value) + return _msg; +} + +// .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; +inline bool AnyValue::_internal_has_kvlist_value() const { + return value_case() == kKvlistValue; +} +inline bool AnyValue::has_kvlist_value() const { + return _internal_has_kvlist_value(); +} +inline void AnyValue::set_has_kvlist_value() { + _impl_._oneof_case_[0] = kKvlistValue; +} +inline void AnyValue::clear_kvlist_value() { + if (_internal_has_kvlist_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.value_.kvlist_value_; + } + clear_has_value(); + } +} +inline ::opentelemetry::proto::common::v1::KeyValueList* AnyValue::release_kvlist_value() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.AnyValue.kvlist_value) + if (_internal_has_kvlist_value()) { + clear_has_value(); + ::opentelemetry::proto::common::v1::KeyValueList* temp = _impl_.value_.kvlist_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.value_.kvlist_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::opentelemetry::proto::common::v1::KeyValueList& AnyValue::_internal_kvlist_value() const { + return _internal_has_kvlist_value() + ? *_impl_.value_.kvlist_value_ + : reinterpret_cast< ::opentelemetry::proto::common::v1::KeyValueList&>(::opentelemetry::proto::common::v1::_KeyValueList_default_instance_); +} +inline const ::opentelemetry::proto::common::v1::KeyValueList& AnyValue::kvlist_value() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.AnyValue.kvlist_value) + return _internal_kvlist_value(); +} +inline ::opentelemetry::proto::common::v1::KeyValueList* AnyValue::unsafe_arena_release_kvlist_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:opentelemetry.proto.common.v1.AnyValue.kvlist_value) + if (_internal_has_kvlist_value()) { + clear_has_value(); + ::opentelemetry::proto::common::v1::KeyValueList* temp = _impl_.value_.kvlist_value_; + _impl_.value_.kvlist_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void AnyValue::unsafe_arena_set_allocated_kvlist_value(::opentelemetry::proto::common::v1::KeyValueList* kvlist_value) { + clear_value(); + if (kvlist_value) { + set_has_kvlist_value(); + _impl_.value_.kvlist_value_ = kvlist_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opentelemetry.proto.common.v1.AnyValue.kvlist_value) +} +inline ::opentelemetry::proto::common::v1::KeyValueList* AnyValue::_internal_mutable_kvlist_value() { + if (!_internal_has_kvlist_value()) { + clear_value(); + set_has_kvlist_value(); + _impl_.value_.kvlist_value_ = CreateMaybeMessage< ::opentelemetry::proto::common::v1::KeyValueList >(GetArenaForAllocation()); + } + return _impl_.value_.kvlist_value_; +} +inline ::opentelemetry::proto::common::v1::KeyValueList* AnyValue::mutable_kvlist_value() { + ::opentelemetry::proto::common::v1::KeyValueList* _msg = _internal_mutable_kvlist_value(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.AnyValue.kvlist_value) + return _msg; +} + +// bytes bytes_value = 7; +inline bool AnyValue::_internal_has_bytes_value() const { + return value_case() == kBytesValue; +} +inline bool AnyValue::has_bytes_value() const { + return _internal_has_bytes_value(); +} +inline void AnyValue::set_has_bytes_value() { + _impl_._oneof_case_[0] = kBytesValue; +} +inline void AnyValue::clear_bytes_value() { + if (_internal_has_bytes_value()) { + _impl_.value_.bytes_value_.Destroy(); + clear_has_value(); + } +} +inline const std::string& AnyValue::bytes_value() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.AnyValue.bytes_value) + return _internal_bytes_value(); +} +template <typename ArgT0, typename... ArgT> +inline void AnyValue::set_bytes_value(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_bytes_value()) { + clear_value(); + set_has_bytes_value(); + _impl_.value_.bytes_value_.InitDefault(); + } + _impl_.value_.bytes_value_.SetBytes( static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.AnyValue.bytes_value) +} +inline std::string* AnyValue::mutable_bytes_value() { + std::string* _s = _internal_mutable_bytes_value(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.AnyValue.bytes_value) + return _s; +} +inline const std::string& AnyValue::_internal_bytes_value() const { + if (_internal_has_bytes_value()) { + return _impl_.value_.bytes_value_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void AnyValue::_internal_set_bytes_value(const std::string& value) { + if (!_internal_has_bytes_value()) { + clear_value(); + set_has_bytes_value(); + _impl_.value_.bytes_value_.InitDefault(); + } + _impl_.value_.bytes_value_.Set(value, GetArenaForAllocation()); +} +inline std::string* AnyValue::_internal_mutable_bytes_value() { + if (!_internal_has_bytes_value()) { + clear_value(); + set_has_bytes_value(); + _impl_.value_.bytes_value_.InitDefault(); + } + return _impl_.value_.bytes_value_.Mutable( GetArenaForAllocation()); +} +inline std::string* AnyValue::release_bytes_value() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.AnyValue.bytes_value) + if (_internal_has_bytes_value()) { + clear_has_value(); + return _impl_.value_.bytes_value_.Release(); + } else { + return nullptr; + } +} +inline void AnyValue::set_allocated_bytes_value(std::string* bytes_value) { + if (has_value()) { + clear_value(); + } + if (bytes_value != nullptr) { + set_has_bytes_value(); + _impl_.value_.bytes_value_.InitAllocated(bytes_value, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.common.v1.AnyValue.bytes_value) +} + +inline bool AnyValue::has_value() const { + return value_case() != VALUE_NOT_SET; +} +inline void AnyValue::clear_has_value() { + _impl_._oneof_case_[0] = VALUE_NOT_SET; +} +inline AnyValue::ValueCase AnyValue::value_case() const { + return AnyValue::ValueCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// ArrayValue + +// repeated .opentelemetry.proto.common.v1.AnyValue values = 1; +inline int ArrayValue::_internal_values_size() const { + return _impl_.values_.size(); +} +inline int ArrayValue::values_size() const { + return _internal_values_size(); +} +inline void ArrayValue::clear_values() { + _impl_.values_.Clear(); +} +inline ::opentelemetry::proto::common::v1::AnyValue* ArrayValue::mutable_values(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.ArrayValue.values) + return _impl_.values_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::AnyValue >* +ArrayValue::mutable_values() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.common.v1.ArrayValue.values) + return &_impl_.values_; +} +inline const ::opentelemetry::proto::common::v1::AnyValue& ArrayValue::_internal_values(int index) const { + return _impl_.values_.Get(index); +} +inline const ::opentelemetry::proto::common::v1::AnyValue& ArrayValue::values(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.ArrayValue.values) + return _internal_values(index); +} +inline ::opentelemetry::proto::common::v1::AnyValue* ArrayValue::_internal_add_values() { + return _impl_.values_.Add(); +} +inline ::opentelemetry::proto::common::v1::AnyValue* ArrayValue::add_values() { + ::opentelemetry::proto::common::v1::AnyValue* _add = _internal_add_values(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.common.v1.ArrayValue.values) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::AnyValue >& +ArrayValue::values() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.common.v1.ArrayValue.values) + return _impl_.values_; +} + +// ------------------------------------------------------------------- + +// KeyValueList + +// repeated .opentelemetry.proto.common.v1.KeyValue values = 1; +inline int KeyValueList::_internal_values_size() const { + return _impl_.values_.size(); +} +inline int KeyValueList::values_size() const { + return _internal_values_size(); +} +inline void KeyValueList::clear_values() { + _impl_.values_.Clear(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* KeyValueList::mutable_values(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.KeyValueList.values) + return _impl_.values_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* +KeyValueList::mutable_values() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.common.v1.KeyValueList.values) + return &_impl_.values_; +} +inline const ::opentelemetry::proto::common::v1::KeyValue& KeyValueList::_internal_values(int index) const { + return _impl_.values_.Get(index); +} +inline const ::opentelemetry::proto::common::v1::KeyValue& KeyValueList::values(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.KeyValueList.values) + return _internal_values(index); +} +inline ::opentelemetry::proto::common::v1::KeyValue* KeyValueList::_internal_add_values() { + return _impl_.values_.Add(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* KeyValueList::add_values() { + ::opentelemetry::proto::common::v1::KeyValue* _add = _internal_add_values(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.common.v1.KeyValueList.values) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& +KeyValueList::values() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.common.v1.KeyValueList.values) + return _impl_.values_; +} + +// ------------------------------------------------------------------- + +// KeyValue + +// string key = 1; +inline void KeyValue::clear_key() { + _impl_.key_.ClearToEmpty(); +} +inline const std::string& KeyValue::key() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.KeyValue.key) + return _internal_key(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void KeyValue::set_key(ArgT0&& arg0, ArgT... args) { + + _impl_.key_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.KeyValue.key) +} +inline std::string* KeyValue::mutable_key() { + std::string* _s = _internal_mutable_key(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.KeyValue.key) + return _s; +} +inline const std::string& KeyValue::_internal_key() const { + return _impl_.key_.Get(); +} +inline void KeyValue::_internal_set_key(const std::string& value) { + + _impl_.key_.Set(value, GetArenaForAllocation()); +} +inline std::string* KeyValue::_internal_mutable_key() { + + return _impl_.key_.Mutable(GetArenaForAllocation()); +} +inline std::string* KeyValue::release_key() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.KeyValue.key) + return _impl_.key_.Release(); +} +inline void KeyValue::set_allocated_key(std::string* key) { + if (key != nullptr) { + + } else { + + } + _impl_.key_.SetAllocated(key, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.common.v1.KeyValue.key) +} + +// .opentelemetry.proto.common.v1.AnyValue value = 2; +inline bool KeyValue::_internal_has_value() const { + return this != internal_default_instance() && _impl_.value_ != nullptr; +} +inline bool KeyValue::has_value() const { + return _internal_has_value(); +} +inline void KeyValue::clear_value() { + if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) { + delete _impl_.value_; + } + _impl_.value_ = nullptr; +} +inline const ::opentelemetry::proto::common::v1::AnyValue& KeyValue::_internal_value() const { + const ::opentelemetry::proto::common::v1::AnyValue* p = _impl_.value_; + return p != nullptr ? *p : reinterpret_cast<const ::opentelemetry::proto::common::v1::AnyValue&>( + ::opentelemetry::proto::common::v1::_AnyValue_default_instance_); +} +inline const ::opentelemetry::proto::common::v1::AnyValue& KeyValue::value() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.KeyValue.value) + return _internal_value(); +} +inline void KeyValue::unsafe_arena_set_allocated_value( + ::opentelemetry::proto::common::v1::AnyValue* value) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.value_); + } + _impl_.value_ = value; + if (value) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opentelemetry.proto.common.v1.KeyValue.value) +} +inline ::opentelemetry::proto::common::v1::AnyValue* KeyValue::release_value() { + + ::opentelemetry::proto::common::v1::AnyValue* temp = _impl_.value_; + _impl_.value_ = 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 ::opentelemetry::proto::common::v1::AnyValue* KeyValue::unsafe_arena_release_value() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.KeyValue.value) + + ::opentelemetry::proto::common::v1::AnyValue* temp = _impl_.value_; + _impl_.value_ = nullptr; + return temp; +} +inline ::opentelemetry::proto::common::v1::AnyValue* KeyValue::_internal_mutable_value() { + + if (_impl_.value_ == nullptr) { + auto* p = CreateMaybeMessage<::opentelemetry::proto::common::v1::AnyValue>(GetArenaForAllocation()); + _impl_.value_ = p; + } + return _impl_.value_; +} +inline ::opentelemetry::proto::common::v1::AnyValue* KeyValue::mutable_value() { + ::opentelemetry::proto::common::v1::AnyValue* _msg = _internal_mutable_value(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.KeyValue.value) + return _msg; +} +inline void KeyValue::set_allocated_value(::opentelemetry::proto::common::v1::AnyValue* value) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.value_; + } + if (value) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(value); + if (message_arena != submessage_arena) { + value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, value, submessage_arena); + } + + } else { + + } + _impl_.value_ = value; + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.common.v1.KeyValue.value) +} + +// ------------------------------------------------------------------- + +// InstrumentationScope + +// string name = 1; +inline void InstrumentationScope::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& InstrumentationScope::name() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.InstrumentationScope.name) + return _internal_name(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void InstrumentationScope::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.InstrumentationScope.name) +} +inline std::string* InstrumentationScope::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.InstrumentationScope.name) + return _s; +} +inline const std::string& InstrumentationScope::_internal_name() const { + return _impl_.name_.Get(); +} +inline void InstrumentationScope::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* InstrumentationScope::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* InstrumentationScope::release_name() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.InstrumentationScope.name) + return _impl_.name_.Release(); +} +inline void InstrumentationScope::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:opentelemetry.proto.common.v1.InstrumentationScope.name) +} + +// string version = 2; +inline void InstrumentationScope::clear_version() { + _impl_.version_.ClearToEmpty(); +} +inline const std::string& InstrumentationScope::version() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.InstrumentationScope.version) + return _internal_version(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void InstrumentationScope::set_version(ArgT0&& arg0, ArgT... args) { + + _impl_.version_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.InstrumentationScope.version) +} +inline std::string* InstrumentationScope::mutable_version() { + std::string* _s = _internal_mutable_version(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.InstrumentationScope.version) + return _s; +} +inline const std::string& InstrumentationScope::_internal_version() const { + return _impl_.version_.Get(); +} +inline void InstrumentationScope::_internal_set_version(const std::string& value) { + + _impl_.version_.Set(value, GetArenaForAllocation()); +} +inline std::string* InstrumentationScope::_internal_mutable_version() { + + return _impl_.version_.Mutable(GetArenaForAllocation()); +} +inline std::string* InstrumentationScope::release_version() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.InstrumentationScope.version) + return _impl_.version_.Release(); +} +inline void InstrumentationScope::set_allocated_version(std::string* version) { + if (version != nullptr) { + + } else { + + } + _impl_.version_.SetAllocated(version, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.version_.IsDefault()) { + _impl_.version_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.common.v1.InstrumentationScope.version) +} + +// repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; +inline int InstrumentationScope::_internal_attributes_size() const { + return _impl_.attributes_.size(); +} +inline int InstrumentationScope::attributes_size() const { + return _internal_attributes_size(); +} +inline void InstrumentationScope::clear_attributes() { + _impl_.attributes_.Clear(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* InstrumentationScope::mutable_attributes(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.InstrumentationScope.attributes) + return _impl_.attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* +InstrumentationScope::mutable_attributes() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.common.v1.InstrumentationScope.attributes) + return &_impl_.attributes_; +} +inline const ::opentelemetry::proto::common::v1::KeyValue& InstrumentationScope::_internal_attributes(int index) const { + return _impl_.attributes_.Get(index); +} +inline const ::opentelemetry::proto::common::v1::KeyValue& InstrumentationScope::attributes(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.InstrumentationScope.attributes) + return _internal_attributes(index); +} +inline ::opentelemetry::proto::common::v1::KeyValue* InstrumentationScope::_internal_add_attributes() { + return _impl_.attributes_.Add(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* InstrumentationScope::add_attributes() { + ::opentelemetry::proto::common::v1::KeyValue* _add = _internal_add_attributes(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.common.v1.InstrumentationScope.attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& +InstrumentationScope::attributes() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.common.v1.InstrumentationScope.attributes) + return _impl_.attributes_; +} + +// uint32 dropped_attributes_count = 4; +inline void InstrumentationScope::clear_dropped_attributes_count() { + _impl_.dropped_attributes_count_ = 0u; +} +inline uint32_t InstrumentationScope::_internal_dropped_attributes_count() const { + return _impl_.dropped_attributes_count_; +} +inline uint32_t InstrumentationScope::dropped_attributes_count() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.InstrumentationScope.dropped_attributes_count) + return _internal_dropped_attributes_count(); +} +inline void InstrumentationScope::_internal_set_dropped_attributes_count(uint32_t value) { + + _impl_.dropped_attributes_count_ = value; +} +inline void InstrumentationScope::set_dropped_attributes_count(uint32_t value) { + _internal_set_dropped_attributes_count(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.InstrumentationScope.dropped_attributes_count) +} + +// ------------------------------------------------------------------- + +// EntityRef + +// string schema_url = 1; +inline void EntityRef::clear_schema_url() { + _impl_.schema_url_.ClearToEmpty(); +} +inline const std::string& EntityRef::schema_url() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.EntityRef.schema_url) + return _internal_schema_url(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void EntityRef::set_schema_url(ArgT0&& arg0, ArgT... args) { + + _impl_.schema_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.EntityRef.schema_url) +} +inline std::string* EntityRef::mutable_schema_url() { + std::string* _s = _internal_mutable_schema_url(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.EntityRef.schema_url) + return _s; +} +inline const std::string& EntityRef::_internal_schema_url() const { + return _impl_.schema_url_.Get(); +} +inline void EntityRef::_internal_set_schema_url(const std::string& value) { + + _impl_.schema_url_.Set(value, GetArenaForAllocation()); +} +inline std::string* EntityRef::_internal_mutable_schema_url() { + + return _impl_.schema_url_.Mutable(GetArenaForAllocation()); +} +inline std::string* EntityRef::release_schema_url() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.EntityRef.schema_url) + return _impl_.schema_url_.Release(); +} +inline void EntityRef::set_allocated_schema_url(std::string* schema_url) { + if (schema_url != nullptr) { + + } else { + + } + _impl_.schema_url_.SetAllocated(schema_url, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.schema_url_.IsDefault()) { + _impl_.schema_url_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.common.v1.EntityRef.schema_url) +} + +// string type = 2; +inline void EntityRef::clear_type() { + _impl_.type_.ClearToEmpty(); +} +inline const std::string& EntityRef::type() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.EntityRef.type) + return _internal_type(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void EntityRef::set_type(ArgT0&& arg0, ArgT... args) { + + _impl_.type_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.EntityRef.type) +} +inline std::string* EntityRef::mutable_type() { + std::string* _s = _internal_mutable_type(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.EntityRef.type) + return _s; +} +inline const std::string& EntityRef::_internal_type() const { + return _impl_.type_.Get(); +} +inline void EntityRef::_internal_set_type(const std::string& value) { + + _impl_.type_.Set(value, GetArenaForAllocation()); +} +inline std::string* EntityRef::_internal_mutable_type() { + + return _impl_.type_.Mutable(GetArenaForAllocation()); +} +inline std::string* EntityRef::release_type() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.common.v1.EntityRef.type) + return _impl_.type_.Release(); +} +inline void EntityRef::set_allocated_type(std::string* type) { + if (type != nullptr) { + + } else { + + } + _impl_.type_.SetAllocated(type, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.type_.IsDefault()) { + _impl_.type_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.common.v1.EntityRef.type) +} + +// repeated string id_keys = 3; +inline int EntityRef::_internal_id_keys_size() const { + return _impl_.id_keys_.size(); +} +inline int EntityRef::id_keys_size() const { + return _internal_id_keys_size(); +} +inline void EntityRef::clear_id_keys() { + _impl_.id_keys_.Clear(); +} +inline std::string* EntityRef::add_id_keys() { + std::string* _s = _internal_add_id_keys(); + // @@protoc_insertion_point(field_add_mutable:opentelemetry.proto.common.v1.EntityRef.id_keys) + return _s; +} +inline const std::string& EntityRef::_internal_id_keys(int index) const { + return _impl_.id_keys_.Get(index); +} +inline const std::string& EntityRef::id_keys(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.EntityRef.id_keys) + return _internal_id_keys(index); +} +inline std::string* EntityRef::mutable_id_keys(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.EntityRef.id_keys) + return _impl_.id_keys_.Mutable(index); +} +inline void EntityRef::set_id_keys(int index, const std::string& value) { + _impl_.id_keys_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.EntityRef.id_keys) +} +inline void EntityRef::set_id_keys(int index, std::string&& value) { + _impl_.id_keys_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.EntityRef.id_keys) +} +inline void EntityRef::set_id_keys(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.id_keys_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opentelemetry.proto.common.v1.EntityRef.id_keys) +} +inline void EntityRef::set_id_keys(int index, const char* value, size_t size) { + _impl_.id_keys_.Mutable(index)->assign( + reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:opentelemetry.proto.common.v1.EntityRef.id_keys) +} +inline std::string* EntityRef::_internal_add_id_keys() { + return _impl_.id_keys_.Add(); +} +inline void EntityRef::add_id_keys(const std::string& value) { + _impl_.id_keys_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opentelemetry.proto.common.v1.EntityRef.id_keys) +} +inline void EntityRef::add_id_keys(std::string&& value) { + _impl_.id_keys_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opentelemetry.proto.common.v1.EntityRef.id_keys) +} +inline void EntityRef::add_id_keys(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.id_keys_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opentelemetry.proto.common.v1.EntityRef.id_keys) +} +inline void EntityRef::add_id_keys(const char* value, size_t size) { + _impl_.id_keys_.Add()->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_add_pointer:opentelemetry.proto.common.v1.EntityRef.id_keys) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& +EntityRef::id_keys() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.common.v1.EntityRef.id_keys) + return _impl_.id_keys_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* +EntityRef::mutable_id_keys() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.common.v1.EntityRef.id_keys) + return &_impl_.id_keys_; +} + +// repeated string description_keys = 4; +inline int EntityRef::_internal_description_keys_size() const { + return _impl_.description_keys_.size(); +} +inline int EntityRef::description_keys_size() const { + return _internal_description_keys_size(); +} +inline void EntityRef::clear_description_keys() { + _impl_.description_keys_.Clear(); +} +inline std::string* EntityRef::add_description_keys() { + std::string* _s = _internal_add_description_keys(); + // @@protoc_insertion_point(field_add_mutable:opentelemetry.proto.common.v1.EntityRef.description_keys) + return _s; +} +inline const std::string& EntityRef::_internal_description_keys(int index) const { + return _impl_.description_keys_.Get(index); +} +inline const std::string& EntityRef::description_keys(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.common.v1.EntityRef.description_keys) + return _internal_description_keys(index); +} +inline std::string* EntityRef::mutable_description_keys(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.common.v1.EntityRef.description_keys) + return _impl_.description_keys_.Mutable(index); +} +inline void EntityRef::set_description_keys(int index, const std::string& value) { + _impl_.description_keys_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.EntityRef.description_keys) +} +inline void EntityRef::set_description_keys(int index, std::string&& value) { + _impl_.description_keys_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:opentelemetry.proto.common.v1.EntityRef.description_keys) +} +inline void EntityRef::set_description_keys(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.description_keys_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opentelemetry.proto.common.v1.EntityRef.description_keys) +} +inline void EntityRef::set_description_keys(int index, const char* value, size_t size) { + _impl_.description_keys_.Mutable(index)->assign( + reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:opentelemetry.proto.common.v1.EntityRef.description_keys) +} +inline std::string* EntityRef::_internal_add_description_keys() { + return _impl_.description_keys_.Add(); +} +inline void EntityRef::add_description_keys(const std::string& value) { + _impl_.description_keys_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opentelemetry.proto.common.v1.EntityRef.description_keys) +} +inline void EntityRef::add_description_keys(std::string&& value) { + _impl_.description_keys_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opentelemetry.proto.common.v1.EntityRef.description_keys) +} +inline void EntityRef::add_description_keys(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.description_keys_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opentelemetry.proto.common.v1.EntityRef.description_keys) +} +inline void EntityRef::add_description_keys(const char* value, size_t size) { + _impl_.description_keys_.Add()->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_add_pointer:opentelemetry.proto.common.v1.EntityRef.description_keys) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& +EntityRef::description_keys() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.common.v1.EntityRef.description_keys) + return _impl_.description_keys_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* +EntityRef::mutable_description_keys() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.common.v1.EntityRef.description_keys) + return &_impl_.description_keys_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1 +} // namespace common +} // namespace proto +} // namespace opentelemetry + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2fcommon_2fv1_2fcommon_2eproto diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto @@ -14,6 +14,8 @@ syntax = "proto3"; +option optimize_for = LITE_RUNTIME; + package opentelemetry.proto.common.v1; option csharp_namespace = "OpenTelemetry.Proto.Common.V1"; diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.pb.cc b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.pb.cc @@ -0,0 +1,315 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opentelemetry/proto/resource/v1/resource.proto + +#include "opentelemetry/proto/resource/v1/resource.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/io/zero_copy_stream_impl_lite.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 opentelemetry { +namespace proto { +namespace resource { +namespace v1 { +PROTOBUF_CONSTEXPR Resource::Resource( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.attributes_)*/{} + , /*decltype(_impl_.entity_refs_)*/{} + , /*decltype(_impl_.dropped_attributes_count_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ResourceDefaultTypeInternal { + PROTOBUF_CONSTEXPR ResourceDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ResourceDefaultTypeInternal() {} + union { + Resource _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResourceDefaultTypeInternal _Resource_default_instance_; +} // namespace v1 +} // namespace resource +} // namespace proto +} // namespace opentelemetry +namespace opentelemetry { +namespace proto { +namespace resource { +namespace v1 { + +// =================================================================== + +class Resource::_Internal { + public: +}; + +void Resource::clear_attributes() { + _impl_.attributes_.Clear(); +} +void Resource::clear_entity_refs() { + _impl_.entity_refs_.Clear(); +} +Resource::Resource(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.resource.v1.Resource) +} +Resource::Resource(const Resource& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + Resource* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){from._impl_.attributes_} + , decltype(_impl_.entity_refs_){from._impl_.entity_refs_} + , decltype(_impl_.dropped_attributes_count_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _this->_impl_.dropped_attributes_count_ = from._impl_.dropped_attributes_count_; + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.resource.v1.Resource) +} + +inline void Resource::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){arena} + , decltype(_impl_.entity_refs_){arena} + , decltype(_impl_.dropped_attributes_count_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +Resource::~Resource() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.resource.v1.Resource) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Resource::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.attributes_.~RepeatedPtrField(); + _impl_.entity_refs_.~RepeatedPtrField(); +} + +void Resource::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Resource::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.resource.v1.Resource) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.attributes_.Clear(); + _impl_.entity_refs_.Clear(); + _impl_.dropped_attributes_count_ = 0u; + _internal_metadata_.Clear<std::string>(); +} + +const char* Resource::_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) { + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_attributes(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + // uint32 dropped_attributes_count = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + _impl_.dropped_attributes_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_entity_refs(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Resource::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.resource.v1.Resource) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_attributes_size()); i < n; i++) { + const auto& repfield = this->_internal_attributes(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + // uint32 dropped_attributes_count = 2; + if (this->_internal_dropped_attributes_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_dropped_attributes_count(), target); + } + + // repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_entity_refs_size()); i < n; i++) { + const auto& repfield = this->_internal_entity_refs(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.resource.v1.Resource) + return target; +} + +size_t Resource::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.resource.v1.Resource) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1; + total_size += 1UL * this->_internal_attributes_size(); + for (const auto& msg : this->_impl_.attributes_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3; + total_size += 1UL * this->_internal_entity_refs_size(); + for (const auto& msg : this->_impl_.entity_refs_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // uint32 dropped_attributes_count = 2; + if (this->_internal_dropped_attributes_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dropped_attributes_count()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Resource::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const Resource*>( + &from)); +} + +void Resource::MergeFrom(const Resource& from) { + Resource* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.resource.v1.Resource) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.attributes_.MergeFrom(from._impl_.attributes_); + _this->_impl_.entity_refs_.MergeFrom(from._impl_.entity_refs_); + if (from._internal_dropped_attributes_count() != 0) { + _this->_internal_set_dropped_attributes_count(from._internal_dropped_attributes_count()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void Resource::CopyFrom(const Resource& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.resource.v1.Resource) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Resource::IsInitialized() const { + return true; +} + +void Resource::InternalSwap(Resource* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.attributes_.InternalSwap(&other->_impl_.attributes_); + _impl_.entity_refs_.InternalSwap(&other->_impl_.entity_refs_); + swap(_impl_.dropped_attributes_count_, other->_impl_.dropped_attributes_count_); +} + +std::string Resource::GetTypeName() const { + return "opentelemetry.proto.resource.v1.Resource"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace resource +} // namespace proto +} // namespace opentelemetry +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::resource::v1::Resource* +Arena::CreateMaybeMessage< ::opentelemetry::proto::resource::v1::Resource >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::resource::v1::Resource >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.pb.h b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.pb.h @@ -0,0 +1,353 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opentelemetry/proto/resource/v1/resource.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2fresource_2fv1_2fresource_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2fresource_2fv1_2fresource_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 3021006 < 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/message_lite.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include "opentelemetry/proto/common/v1/common.pb.h" +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_opentelemetry_2fproto_2fresource_2fv1_2fresource_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_opentelemetry_2fproto_2fresource_2fv1_2fresource_2eproto { + static const uint32_t offsets[]; +}; +namespace opentelemetry { +namespace proto { +namespace resource { +namespace v1 { +class Resource; +struct ResourceDefaultTypeInternal; +extern ResourceDefaultTypeInternal _Resource_default_instance_; +} // namespace v1 +} // namespace resource +} // namespace proto +} // namespace opentelemetry +PROTOBUF_NAMESPACE_OPEN +template<> ::opentelemetry::proto::resource::v1::Resource* Arena::CreateMaybeMessage<::opentelemetry::proto::resource::v1::Resource>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace opentelemetry { +namespace proto { +namespace resource { +namespace v1 { + +// =================================================================== + +class Resource final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.resource.v1.Resource) */ { + public: + inline Resource() : Resource(nullptr) {} + ~Resource() override; + explicit PROTOBUF_CONSTEXPR Resource(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Resource(const Resource& from); + Resource(Resource&& from) noexcept + : Resource() { + *this = ::std::move(from); + } + + inline Resource& operator=(const Resource& from) { + CopyFrom(from); + return *this; + } + inline Resource& operator=(Resource&& 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 Resource& default_instance() { + return *internal_default_instance(); + } + static inline const Resource* internal_default_instance() { + return reinterpret_cast<const Resource*>( + &_Resource_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Resource& a, Resource& b) { + a.Swap(&b); + } + inline void Swap(Resource* 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(Resource* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Resource* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<Resource>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Resource& from); + void MergeFrom(const Resource& from); + 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; + void InternalSwap(Resource* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.resource.v1.Resource"; + } + protected: + explicit Resource(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAttributesFieldNumber = 1, + kEntityRefsFieldNumber = 3, + kDroppedAttributesCountFieldNumber = 2, + }; + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1; + int attributes_size() const; + private: + int _internal_attributes_size() const; + public: + void clear_attributes(); + ::opentelemetry::proto::common::v1::KeyValue* mutable_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* + mutable_attributes(); + private: + const ::opentelemetry::proto::common::v1::KeyValue& _internal_attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* _internal_add_attributes(); + public: + const ::opentelemetry::proto::common::v1::KeyValue& attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* add_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& + attributes() const; + + // repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3; + int entity_refs_size() const; + private: + int _internal_entity_refs_size() const; + public: + void clear_entity_refs(); + ::opentelemetry::proto::common::v1::EntityRef* mutable_entity_refs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::EntityRef >* + mutable_entity_refs(); + private: + const ::opentelemetry::proto::common::v1::EntityRef& _internal_entity_refs(int index) const; + ::opentelemetry::proto::common::v1::EntityRef* _internal_add_entity_refs(); + public: + const ::opentelemetry::proto::common::v1::EntityRef& entity_refs(int index) const; + ::opentelemetry::proto::common::v1::EntityRef* add_entity_refs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::EntityRef >& + entity_refs() const; + + // uint32 dropped_attributes_count = 2; + void clear_dropped_attributes_count(); + uint32_t dropped_attributes_count() const; + void set_dropped_attributes_count(uint32_t value); + private: + uint32_t _internal_dropped_attributes_count() const; + void _internal_set_dropped_attributes_count(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.resource.v1.Resource) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue > attributes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::EntityRef > entity_refs_; + uint32_t dropped_attributes_count_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2fresource_2fv1_2fresource_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Resource + +// repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1; +inline int Resource::_internal_attributes_size() const { + return _impl_.attributes_.size(); +} +inline int Resource::attributes_size() const { + return _internal_attributes_size(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Resource::mutable_attributes(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.resource.v1.Resource.attributes) + return _impl_.attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* +Resource::mutable_attributes() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.resource.v1.Resource.attributes) + return &_impl_.attributes_; +} +inline const ::opentelemetry::proto::common::v1::KeyValue& Resource::_internal_attributes(int index) const { + return _impl_.attributes_.Get(index); +} +inline const ::opentelemetry::proto::common::v1::KeyValue& Resource::attributes(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.resource.v1.Resource.attributes) + return _internal_attributes(index); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Resource::_internal_add_attributes() { + return _impl_.attributes_.Add(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Resource::add_attributes() { + ::opentelemetry::proto::common::v1::KeyValue* _add = _internal_add_attributes(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.resource.v1.Resource.attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& +Resource::attributes() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.resource.v1.Resource.attributes) + return _impl_.attributes_; +} + +// uint32 dropped_attributes_count = 2; +inline void Resource::clear_dropped_attributes_count() { + _impl_.dropped_attributes_count_ = 0u; +} +inline uint32_t Resource::_internal_dropped_attributes_count() const { + return _impl_.dropped_attributes_count_; +} +inline uint32_t Resource::dropped_attributes_count() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.resource.v1.Resource.dropped_attributes_count) + return _internal_dropped_attributes_count(); +} +inline void Resource::_internal_set_dropped_attributes_count(uint32_t value) { + + _impl_.dropped_attributes_count_ = value; +} +inline void Resource::set_dropped_attributes_count(uint32_t value) { + _internal_set_dropped_attributes_count(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.resource.v1.Resource.dropped_attributes_count) +} + +// repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3; +inline int Resource::_internal_entity_refs_size() const { + return _impl_.entity_refs_.size(); +} +inline int Resource::entity_refs_size() const { + return _internal_entity_refs_size(); +} +inline ::opentelemetry::proto::common::v1::EntityRef* Resource::mutable_entity_refs(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.resource.v1.Resource.entity_refs) + return _impl_.entity_refs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::EntityRef >* +Resource::mutable_entity_refs() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.resource.v1.Resource.entity_refs) + return &_impl_.entity_refs_; +} +inline const ::opentelemetry::proto::common::v1::EntityRef& Resource::_internal_entity_refs(int index) const { + return _impl_.entity_refs_.Get(index); +} +inline const ::opentelemetry::proto::common::v1::EntityRef& Resource::entity_refs(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.resource.v1.Resource.entity_refs) + return _internal_entity_refs(index); +} +inline ::opentelemetry::proto::common::v1::EntityRef* Resource::_internal_add_entity_refs() { + return _impl_.entity_refs_.Add(); +} +inline ::opentelemetry::proto::common::v1::EntityRef* Resource::add_entity_refs() { + ::opentelemetry::proto::common::v1::EntityRef* _add = _internal_add_entity_refs(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.resource.v1.Resource.entity_refs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::EntityRef >& +Resource::entity_refs() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.resource.v1.Resource.entity_refs) + return _impl_.entity_refs_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1 +} // namespace resource +} // namespace proto +} // namespace opentelemetry + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2fresource_2fv1_2fresource_2eproto diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto @@ -14,6 +14,8 @@ syntax = "proto3"; +option optimize_for = LITE_RUNTIME; + package opentelemetry.proto.resource.v1; import "opentelemetry/proto/common/v1/common.proto"; diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.pb.cc b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.pb.cc @@ -0,0 +1,2798 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opentelemetry/proto/trace/v1/trace.proto + +#include "opentelemetry/proto/trace/v1/trace.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/io/zero_copy_stream_impl_lite.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 opentelemetry { +namespace proto { +namespace trace { +namespace v1 { +PROTOBUF_CONSTEXPR TracesData::TracesData( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.resource_spans_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct TracesDataDefaultTypeInternal { + PROTOBUF_CONSTEXPR TracesDataDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~TracesDataDefaultTypeInternal() {} + union { + TracesData _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TracesDataDefaultTypeInternal _TracesData_default_instance_; +PROTOBUF_CONSTEXPR ResourceSpans::ResourceSpans( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.scope_spans_)*/{} + , /*decltype(_impl_.schema_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.resource_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ResourceSpansDefaultTypeInternal { + PROTOBUF_CONSTEXPR ResourceSpansDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ResourceSpansDefaultTypeInternal() {} + union { + ResourceSpans _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResourceSpansDefaultTypeInternal _ResourceSpans_default_instance_; +PROTOBUF_CONSTEXPR ScopeSpans::ScopeSpans( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.spans_)*/{} + , /*decltype(_impl_.schema_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.scope_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ScopeSpansDefaultTypeInternal { + PROTOBUF_CONSTEXPR ScopeSpansDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ScopeSpansDefaultTypeInternal() {} + union { + ScopeSpans _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ScopeSpansDefaultTypeInternal _ScopeSpans_default_instance_; +PROTOBUF_CONSTEXPR Span_Event::Span_Event( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.attributes_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.time_unix_nano_)*/uint64_t{0u} + , /*decltype(_impl_.dropped_attributes_count_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct Span_EventDefaultTypeInternal { + PROTOBUF_CONSTEXPR Span_EventDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~Span_EventDefaultTypeInternal() {} + union { + Span_Event _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Span_EventDefaultTypeInternal _Span_Event_default_instance_; +PROTOBUF_CONSTEXPR Span_Link::Span_Link( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.attributes_)*/{} + , /*decltype(_impl_.trace_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.span_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.trace_state_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.dropped_attributes_count_)*/0u + , /*decltype(_impl_.flags_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct Span_LinkDefaultTypeInternal { + PROTOBUF_CONSTEXPR Span_LinkDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~Span_LinkDefaultTypeInternal() {} + union { + Span_Link _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Span_LinkDefaultTypeInternal _Span_Link_default_instance_; +PROTOBUF_CONSTEXPR Span::Span( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.attributes_)*/{} + , /*decltype(_impl_.events_)*/{} + , /*decltype(_impl_.links_)*/{} + , /*decltype(_impl_.trace_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.span_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.trace_state_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.parent_span_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.status_)*/nullptr + , /*decltype(_impl_.start_time_unix_nano_)*/uint64_t{0u} + , /*decltype(_impl_.end_time_unix_nano_)*/uint64_t{0u} + , /*decltype(_impl_.kind_)*/0 + , /*decltype(_impl_.dropped_attributes_count_)*/0u + , /*decltype(_impl_.dropped_events_count_)*/0u + , /*decltype(_impl_.dropped_links_count_)*/0u + , /*decltype(_impl_.flags_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct SpanDefaultTypeInternal { + PROTOBUF_CONSTEXPR SpanDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~SpanDefaultTypeInternal() {} + union { + Span _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SpanDefaultTypeInternal _Span_default_instance_; +PROTOBUF_CONSTEXPR Status::Status( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.message_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.code_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct StatusDefaultTypeInternal { + PROTOBUF_CONSTEXPR StatusDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~StatusDefaultTypeInternal() {} + union { + Status _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StatusDefaultTypeInternal _Status_default_instance_; +} // namespace v1 +} // namespace trace +} // namespace proto +} // namespace opentelemetry +namespace opentelemetry { +namespace proto { +namespace trace { +namespace v1 { +bool Span_SpanKind_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Span_SpanKind_strings[6] = {}; + +static const char Span_SpanKind_names[] = + "SPAN_KIND_CLIENT" + "SPAN_KIND_CONSUMER" + "SPAN_KIND_INTERNAL" + "SPAN_KIND_PRODUCER" + "SPAN_KIND_SERVER" + "SPAN_KIND_UNSPECIFIED"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Span_SpanKind_entries[] = { + { {Span_SpanKind_names + 0, 16}, 3 }, + { {Span_SpanKind_names + 16, 18}, 5 }, + { {Span_SpanKind_names + 34, 18}, 1 }, + { {Span_SpanKind_names + 52, 18}, 4 }, + { {Span_SpanKind_names + 70, 16}, 2 }, + { {Span_SpanKind_names + 86, 21}, 0 }, +}; + +static const int Span_SpanKind_entries_by_number[] = { + 5, // 0 -> SPAN_KIND_UNSPECIFIED + 2, // 1 -> SPAN_KIND_INTERNAL + 4, // 2 -> SPAN_KIND_SERVER + 0, // 3 -> SPAN_KIND_CLIENT + 3, // 4 -> SPAN_KIND_PRODUCER + 1, // 5 -> SPAN_KIND_CONSUMER +}; + +const std::string& Span_SpanKind_Name( + Span_SpanKind value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Span_SpanKind_entries, + Span_SpanKind_entries_by_number, + 6, Span_SpanKind_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Span_SpanKind_entries, + Span_SpanKind_entries_by_number, + 6, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Span_SpanKind_strings[idx].get(); +} +bool Span_SpanKind_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Span_SpanKind* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Span_SpanKind_entries, 6, name, &int_value); + if (success) { + *value = static_cast<Span_SpanKind>(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr Span_SpanKind Span::SPAN_KIND_UNSPECIFIED; +constexpr Span_SpanKind Span::SPAN_KIND_INTERNAL; +constexpr Span_SpanKind Span::SPAN_KIND_SERVER; +constexpr Span_SpanKind Span::SPAN_KIND_CLIENT; +constexpr Span_SpanKind Span::SPAN_KIND_PRODUCER; +constexpr Span_SpanKind Span::SPAN_KIND_CONSUMER; +constexpr Span_SpanKind Span::SpanKind_MIN; +constexpr Span_SpanKind Span::SpanKind_MAX; +constexpr int Span::SpanKind_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool Status_StatusCode_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Status_StatusCode_strings[3] = {}; + +static const char Status_StatusCode_names[] = + "STATUS_CODE_ERROR" + "STATUS_CODE_OK" + "STATUS_CODE_UNSET"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Status_StatusCode_entries[] = { + { {Status_StatusCode_names + 0, 17}, 2 }, + { {Status_StatusCode_names + 17, 14}, 1 }, + { {Status_StatusCode_names + 31, 17}, 0 }, +}; + +static const int Status_StatusCode_entries_by_number[] = { + 2, // 0 -> STATUS_CODE_UNSET + 1, // 1 -> STATUS_CODE_OK + 0, // 2 -> STATUS_CODE_ERROR +}; + +const std::string& Status_StatusCode_Name( + Status_StatusCode value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Status_StatusCode_entries, + Status_StatusCode_entries_by_number, + 3, Status_StatusCode_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Status_StatusCode_entries, + Status_StatusCode_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Status_StatusCode_strings[idx].get(); +} +bool Status_StatusCode_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Status_StatusCode* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Status_StatusCode_entries, 3, name, &int_value); + if (success) { + *value = static_cast<Status_StatusCode>(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr Status_StatusCode Status::STATUS_CODE_UNSET; +constexpr Status_StatusCode Status::STATUS_CODE_OK; +constexpr Status_StatusCode Status::STATUS_CODE_ERROR; +constexpr Status_StatusCode Status::StatusCode_MIN; +constexpr Status_StatusCode Status::StatusCode_MAX; +constexpr int Status::StatusCode_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool SpanFlags_IsValid(int value) { + switch (value) { + case 0: + case 255: + case 256: + case 512: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> SpanFlags_strings[4] = {}; + +static const char SpanFlags_names[] = + "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK" + "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK" + "SPAN_FLAGS_DO_NOT_USE" + "SPAN_FLAGS_TRACE_FLAGS_MASK"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SpanFlags_entries[] = { + { {SpanFlags_names + 0, 37}, 256 }, + { {SpanFlags_names + 37, 33}, 512 }, + { {SpanFlags_names + 70, 21}, 0 }, + { {SpanFlags_names + 91, 27}, 255 }, +}; + +static const int SpanFlags_entries_by_number[] = { + 2, // 0 -> SPAN_FLAGS_DO_NOT_USE + 3, // 255 -> SPAN_FLAGS_TRACE_FLAGS_MASK + 0, // 256 -> SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK + 1, // 512 -> SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK +}; + +const std::string& SpanFlags_Name( + SpanFlags value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + SpanFlags_entries, + SpanFlags_entries_by_number, + 4, SpanFlags_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + SpanFlags_entries, + SpanFlags_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + SpanFlags_strings[idx].get(); +} +bool SpanFlags_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SpanFlags* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + SpanFlags_entries, 4, name, &int_value); + if (success) { + *value = static_cast<SpanFlags>(int_value); + } + return success; +} + +// =================================================================== + +class TracesData::_Internal { + public: +}; + +TracesData::TracesData(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.trace.v1.TracesData) +} +TracesData::TracesData(const TracesData& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + TracesData* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.resource_spans_){from._impl_.resource_spans_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.trace.v1.TracesData) +} + +inline void TracesData::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.resource_spans_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +TracesData::~TracesData() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.trace.v1.TracesData) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void TracesData::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.resource_spans_.~RepeatedPtrField(); +} + +void TracesData::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void TracesData::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.trace.v1.TracesData) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.resource_spans_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* TracesData::_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) { + // repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_resource_spans(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* TracesData::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.trace.v1.TracesData) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_resource_spans_size()); i < n; i++) { + const auto& repfield = this->_internal_resource_spans(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.trace.v1.TracesData) + return target; +} + +size_t TracesData::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.trace.v1.TracesData) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; + total_size += 1UL * this->_internal_resource_spans_size(); + for (const auto& msg : this->_impl_.resource_spans_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TracesData::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const TracesData*>( + &from)); +} + +void TracesData::MergeFrom(const TracesData& from) { + TracesData* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.trace.v1.TracesData) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.resource_spans_.MergeFrom(from._impl_.resource_spans_); + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void TracesData::CopyFrom(const TracesData& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.trace.v1.TracesData) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TracesData::IsInitialized() const { + return true; +} + +void TracesData::InternalSwap(TracesData* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.resource_spans_.InternalSwap(&other->_impl_.resource_spans_); +} + +std::string TracesData::GetTypeName() const { + return "opentelemetry.proto.trace.v1.TracesData"; +} + + +// =================================================================== + +class ResourceSpans::_Internal { + public: + static const ::opentelemetry::proto::resource::v1::Resource& resource(const ResourceSpans* msg); +}; + +const ::opentelemetry::proto::resource::v1::Resource& +ResourceSpans::_Internal::resource(const ResourceSpans* msg) { + return *msg->_impl_.resource_; +} +void ResourceSpans::clear_resource() { + if (GetArenaForAllocation() == nullptr && _impl_.resource_ != nullptr) { + delete _impl_.resource_; + } + _impl_.resource_ = nullptr; +} +ResourceSpans::ResourceSpans(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.trace.v1.ResourceSpans) +} +ResourceSpans::ResourceSpans(const ResourceSpans& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ResourceSpans* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.scope_spans_){from._impl_.scope_spans_} + , decltype(_impl_.schema_url_){} + , decltype(_impl_.resource_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.schema_url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_schema_url().empty()) { + _this->_impl_.schema_url_.Set(from._internal_schema_url(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_resource()) { + _this->_impl_.resource_ = new ::opentelemetry::proto::resource::v1::Resource(*from._impl_.resource_); + } + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.trace.v1.ResourceSpans) +} + +inline void ResourceSpans::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.scope_spans_){arena} + , decltype(_impl_.schema_url_){} + , decltype(_impl_.resource_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.schema_url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ResourceSpans::~ResourceSpans() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.trace.v1.ResourceSpans) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ResourceSpans::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.scope_spans_.~RepeatedPtrField(); + _impl_.schema_url_.Destroy(); + if (this != internal_default_instance()) delete _impl_.resource_; +} + +void ResourceSpans::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ResourceSpans::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.trace.v1.ResourceSpans) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.scope_spans_.Clear(); + _impl_.schema_url_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.resource_ != nullptr) { + delete _impl_.resource_; + } + _impl_.resource_ = nullptr; + _internal_metadata_.Clear<std::string>(); +} + +const char* ResourceSpans::_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) { + // .opentelemetry.proto.resource.v1.Resource resource = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_resource(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_scope_spans(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // string schema_url = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + auto str = _internal_mutable_schema_url(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } 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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ResourceSpans::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.trace.v1.ResourceSpans) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .opentelemetry.proto.resource.v1.Resource resource = 1; + if (this->_internal_has_resource()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::resource(this), + _Internal::resource(this).GetCachedSize(), target, stream); + } + + // repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_scope_spans_size()); i < n; i++) { + const auto& repfield = this->_internal_scope_spans(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + // string schema_url = 3; + if (!this->_internal_schema_url().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_schema_url().data(), static_cast<int>(this->_internal_schema_url().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.trace.v1.ResourceSpans.schema_url"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_schema_url(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.trace.v1.ResourceSpans) + return target; +} + +size_t ResourceSpans::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.trace.v1.ResourceSpans) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; + total_size += 1UL * this->_internal_scope_spans_size(); + for (const auto& msg : this->_impl_.scope_spans_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string schema_url = 3; + if (!this->_internal_schema_url().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_schema_url()); + } + + // .opentelemetry.proto.resource.v1.Resource resource = 1; + if (this->_internal_has_resource()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.resource_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ResourceSpans::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ResourceSpans*>( + &from)); +} + +void ResourceSpans::MergeFrom(const ResourceSpans& from) { + ResourceSpans* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.trace.v1.ResourceSpans) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.scope_spans_.MergeFrom(from._impl_.scope_spans_); + if (!from._internal_schema_url().empty()) { + _this->_internal_set_schema_url(from._internal_schema_url()); + } + if (from._internal_has_resource()) { + _this->_internal_mutable_resource()->::opentelemetry::proto::resource::v1::Resource::MergeFrom( + from._internal_resource()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ResourceSpans::CopyFrom(const ResourceSpans& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.trace.v1.ResourceSpans) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResourceSpans::IsInitialized() const { + return true; +} + +void ResourceSpans::InternalSwap(ResourceSpans* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.scope_spans_.InternalSwap(&other->_impl_.scope_spans_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.schema_url_, lhs_arena, + &other->_impl_.schema_url_, rhs_arena + ); + swap(_impl_.resource_, other->_impl_.resource_); +} + +std::string ResourceSpans::GetTypeName() const { + return "opentelemetry.proto.trace.v1.ResourceSpans"; +} + + +// =================================================================== + +class ScopeSpans::_Internal { + public: + static const ::opentelemetry::proto::common::v1::InstrumentationScope& scope(const ScopeSpans* msg); +}; + +const ::opentelemetry::proto::common::v1::InstrumentationScope& +ScopeSpans::_Internal::scope(const ScopeSpans* msg) { + return *msg->_impl_.scope_; +} +void ScopeSpans::clear_scope() { + if (GetArenaForAllocation() == nullptr && _impl_.scope_ != nullptr) { + delete _impl_.scope_; + } + _impl_.scope_ = nullptr; +} +ScopeSpans::ScopeSpans(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.trace.v1.ScopeSpans) +} +ScopeSpans::ScopeSpans(const ScopeSpans& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ScopeSpans* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.spans_){from._impl_.spans_} + , decltype(_impl_.schema_url_){} + , decltype(_impl_.scope_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.schema_url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_schema_url().empty()) { + _this->_impl_.schema_url_.Set(from._internal_schema_url(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_scope()) { + _this->_impl_.scope_ = new ::opentelemetry::proto::common::v1::InstrumentationScope(*from._impl_.scope_); + } + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.trace.v1.ScopeSpans) +} + +inline void ScopeSpans::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.spans_){arena} + , decltype(_impl_.schema_url_){} + , decltype(_impl_.scope_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.schema_url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ScopeSpans::~ScopeSpans() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.trace.v1.ScopeSpans) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ScopeSpans::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.spans_.~RepeatedPtrField(); + _impl_.schema_url_.Destroy(); + if (this != internal_default_instance()) delete _impl_.scope_; +} + +void ScopeSpans::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ScopeSpans::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.trace.v1.ScopeSpans) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.spans_.Clear(); + _impl_.schema_url_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.scope_ != nullptr) { + delete _impl_.scope_; + } + _impl_.scope_ = nullptr; + _internal_metadata_.Clear<std::string>(); +} + +const char* ScopeSpans::_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) { + // .opentelemetry.proto.common.v1.InstrumentationScope scope = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_scope(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opentelemetry.proto.trace.v1.Span spans = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_spans(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // string schema_url = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + auto str = _internal_mutable_schema_url(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } 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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ScopeSpans::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.trace.v1.ScopeSpans) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .opentelemetry.proto.common.v1.InstrumentationScope scope = 1; + if (this->_internal_has_scope()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::scope(this), + _Internal::scope(this).GetCachedSize(), target, stream); + } + + // repeated .opentelemetry.proto.trace.v1.Span spans = 2; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_spans_size()); i < n; i++) { + const auto& repfield = this->_internal_spans(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + // string schema_url = 3; + if (!this->_internal_schema_url().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_schema_url().data(), static_cast<int>(this->_internal_schema_url().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.trace.v1.ScopeSpans.schema_url"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_schema_url(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.trace.v1.ScopeSpans) + return target; +} + +size_t ScopeSpans::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.trace.v1.ScopeSpans) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.trace.v1.Span spans = 2; + total_size += 1UL * this->_internal_spans_size(); + for (const auto& msg : this->_impl_.spans_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string schema_url = 3; + if (!this->_internal_schema_url().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_schema_url()); + } + + // .opentelemetry.proto.common.v1.InstrumentationScope scope = 1; + if (this->_internal_has_scope()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.scope_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ScopeSpans::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ScopeSpans*>( + &from)); +} + +void ScopeSpans::MergeFrom(const ScopeSpans& from) { + ScopeSpans* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.trace.v1.ScopeSpans) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.spans_.MergeFrom(from._impl_.spans_); + if (!from._internal_schema_url().empty()) { + _this->_internal_set_schema_url(from._internal_schema_url()); + } + if (from._internal_has_scope()) { + _this->_internal_mutable_scope()->::opentelemetry::proto::common::v1::InstrumentationScope::MergeFrom( + from._internal_scope()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ScopeSpans::CopyFrom(const ScopeSpans& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.trace.v1.ScopeSpans) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ScopeSpans::IsInitialized() const { + return true; +} + +void ScopeSpans::InternalSwap(ScopeSpans* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.spans_.InternalSwap(&other->_impl_.spans_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.schema_url_, lhs_arena, + &other->_impl_.schema_url_, rhs_arena + ); + swap(_impl_.scope_, other->_impl_.scope_); +} + +std::string ScopeSpans::GetTypeName() const { + return "opentelemetry.proto.trace.v1.ScopeSpans"; +} + + +// =================================================================== + +class Span_Event::_Internal { + public: +}; + +void Span_Event::clear_attributes() { + _impl_.attributes_.Clear(); +} +Span_Event::Span_Event(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.trace.v1.Span.Event) +} +Span_Event::Span_Event(const Span_Event& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + Span_Event* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){from._impl_.attributes_} + , decltype(_impl_.name_){} + , decltype(_impl_.time_unix_nano_){} + , decltype(_impl_.dropped_attributes_count_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _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()); + } + ::memcpy(&_impl_.time_unix_nano_, &from._impl_.time_unix_nano_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.dropped_attributes_count_) - + reinterpret_cast<char*>(&_impl_.time_unix_nano_)) + sizeof(_impl_.dropped_attributes_count_)); + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.trace.v1.Span.Event) +} + +inline void Span_Event::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){arena} + , decltype(_impl_.name_){} + , decltype(_impl_.time_unix_nano_){uint64_t{0u}} + , decltype(_impl_.dropped_attributes_count_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Span_Event::~Span_Event() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.trace.v1.Span.Event) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Span_Event::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.attributes_.~RepeatedPtrField(); + _impl_.name_.Destroy(); +} + +void Span_Event::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Span_Event::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.trace.v1.Span.Event) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.attributes_.Clear(); + _impl_.name_.ClearToEmpty(); + ::memset(&_impl_.time_unix_nano_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.dropped_attributes_count_) - + reinterpret_cast<char*>(&_impl_.time_unix_nano_)) + sizeof(_impl_.dropped_attributes_count_)); + _internal_metadata_.Clear<std::string>(); +} + +const char* Span_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) { + // fixed64 time_unix_nano = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) { + _impl_.time_unix_nano_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr); + ptr += sizeof(uint64_t); + } else + goto handle_unusual; + continue; + // string name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_attributes(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // uint32 dropped_attributes_count = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { + _impl_.dropped_attributes_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Span_Event::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.trace.v1.Span.Event) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // fixed64 time_unix_nano = 1; + if (this->_internal_time_unix_nano() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFixed64ToArray(1, this->_internal_time_unix_nano(), target); + } + + // string name = 2; + 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, + "opentelemetry.proto.trace.v1.Span.Event.name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_name(), target); + } + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_attributes_size()); i < n; i++) { + const auto& repfield = this->_internal_attributes(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream); + } + + // uint32 dropped_attributes_count = 4; + if (this->_internal_dropped_attributes_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_dropped_attributes_count(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.trace.v1.Span.Event) + return target; +} + +size_t Span_Event::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.trace.v1.Span.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; + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; + total_size += 1UL * this->_internal_attributes_size(); + for (const auto& msg : this->_impl_.attributes_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string name = 2; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // fixed64 time_unix_nano = 1; + if (this->_internal_time_unix_nano() != 0) { + total_size += 1 + 8; + } + + // uint32 dropped_attributes_count = 4; + if (this->_internal_dropped_attributes_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dropped_attributes_count()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Span_Event::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const Span_Event*>( + &from)); +} + +void Span_Event::MergeFrom(const Span_Event& from) { + Span_Event* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.trace.v1.Span.Event) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.attributes_.MergeFrom(from._impl_.attributes_); + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (from._internal_time_unix_nano() != 0) { + _this->_internal_set_time_unix_nano(from._internal_time_unix_nano()); + } + if (from._internal_dropped_attributes_count() != 0) { + _this->_internal_set_dropped_attributes_count(from._internal_dropped_attributes_count()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void Span_Event::CopyFrom(const Span_Event& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.trace.v1.Span.Event) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Span_Event::IsInitialized() const { + return true; +} + +void Span_Event::InternalSwap(Span_Event* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.attributes_.InternalSwap(&other->_impl_.attributes_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Span_Event, _impl_.dropped_attributes_count_) + + sizeof(Span_Event::_impl_.dropped_attributes_count_) + - PROTOBUF_FIELD_OFFSET(Span_Event, _impl_.time_unix_nano_)>( + reinterpret_cast<char*>(&_impl_.time_unix_nano_), + reinterpret_cast<char*>(&other->_impl_.time_unix_nano_)); +} + +std::string Span_Event::GetTypeName() const { + return "opentelemetry.proto.trace.v1.Span.Event"; +} + + +// =================================================================== + +class Span_Link::_Internal { + public: +}; + +void Span_Link::clear_attributes() { + _impl_.attributes_.Clear(); +} +Span_Link::Span_Link(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.trace.v1.Span.Link) +} +Span_Link::Span_Link(const Span_Link& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + Span_Link* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){from._impl_.attributes_} + , decltype(_impl_.trace_id_){} + , decltype(_impl_.span_id_){} + , decltype(_impl_.trace_state_){} + , decltype(_impl_.dropped_attributes_count_){} + , decltype(_impl_.flags_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.trace_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_trace_id().empty()) { + _this->_impl_.trace_id_.Set(from._internal_trace_id(), + _this->GetArenaForAllocation()); + } + _impl_.span_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.span_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_span_id().empty()) { + _this->_impl_.span_id_.Set(from._internal_span_id(), + _this->GetArenaForAllocation()); + } + _impl_.trace_state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_trace_state().empty()) { + _this->_impl_.trace_state_.Set(from._internal_trace_state(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.dropped_attributes_count_, &from._impl_.dropped_attributes_count_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.flags_) - + reinterpret_cast<char*>(&_impl_.dropped_attributes_count_)) + sizeof(_impl_.flags_)); + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.trace.v1.Span.Link) +} + +inline void Span_Link::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){arena} + , decltype(_impl_.trace_id_){} + , decltype(_impl_.span_id_){} + , decltype(_impl_.trace_state_){} + , decltype(_impl_.dropped_attributes_count_){0u} + , decltype(_impl_.flags_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.trace_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.span_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.span_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Span_Link::~Span_Link() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.trace.v1.Span.Link) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Span_Link::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.attributes_.~RepeatedPtrField(); + _impl_.trace_id_.Destroy(); + _impl_.span_id_.Destroy(); + _impl_.trace_state_.Destroy(); +} + +void Span_Link::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Span_Link::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.trace.v1.Span.Link) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.attributes_.Clear(); + _impl_.trace_id_.ClearToEmpty(); + _impl_.span_id_.ClearToEmpty(); + _impl_.trace_state_.ClearToEmpty(); + ::memset(&_impl_.dropped_attributes_count_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.flags_) - + reinterpret_cast<char*>(&_impl_.dropped_attributes_count_)) + sizeof(_impl_.flags_)); + _internal_metadata_.Clear<std::string>(); +} + +const char* Span_Link::_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) { + // bytes trace_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_trace_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes span_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_span_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string trace_state = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + auto str = _internal_mutable_trace_state(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_attributes(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // uint32 dropped_attributes_count = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) { + _impl_.dropped_attributes_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // fixed32 flags = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) { + _impl_.flags_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint32_t>(ptr); + ptr += sizeof(uint32_t); + } 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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Span_Link::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.trace.v1.Span.Link) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bytes trace_id = 1; + if (!this->_internal_trace_id().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_trace_id(), target); + } + + // bytes span_id = 2; + if (!this->_internal_span_id().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_span_id(), target); + } + + // string trace_state = 3; + if (!this->_internal_trace_state().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_trace_state().data(), static_cast<int>(this->_internal_trace_state().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.trace.v1.Span.Link.trace_state"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_trace_state(), target); + } + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_attributes_size()); i < n; i++) { + const auto& repfield = this->_internal_attributes(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); + } + + // uint32 dropped_attributes_count = 5; + if (this->_internal_dropped_attributes_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_dropped_attributes_count(), target); + } + + // fixed32 flags = 6; + if (this->_internal_flags() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFixed32ToArray(6, this->_internal_flags(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.trace.v1.Span.Link) + return target; +} + +size_t Span_Link::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.trace.v1.Span.Link) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; + total_size += 1UL * this->_internal_attributes_size(); + for (const auto& msg : this->_impl_.attributes_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // bytes trace_id = 1; + if (!this->_internal_trace_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_trace_id()); + } + + // bytes span_id = 2; + if (!this->_internal_span_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_span_id()); + } + + // string trace_state = 3; + if (!this->_internal_trace_state().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_trace_state()); + } + + // uint32 dropped_attributes_count = 5; + if (this->_internal_dropped_attributes_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dropped_attributes_count()); + } + + // fixed32 flags = 6; + if (this->_internal_flags() != 0) { + total_size += 1 + 4; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Span_Link::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const Span_Link*>( + &from)); +} + +void Span_Link::MergeFrom(const Span_Link& from) { + Span_Link* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.trace.v1.Span.Link) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.attributes_.MergeFrom(from._impl_.attributes_); + if (!from._internal_trace_id().empty()) { + _this->_internal_set_trace_id(from._internal_trace_id()); + } + if (!from._internal_span_id().empty()) { + _this->_internal_set_span_id(from._internal_span_id()); + } + if (!from._internal_trace_state().empty()) { + _this->_internal_set_trace_state(from._internal_trace_state()); + } + if (from._internal_dropped_attributes_count() != 0) { + _this->_internal_set_dropped_attributes_count(from._internal_dropped_attributes_count()); + } + if (from._internal_flags() != 0) { + _this->_internal_set_flags(from._internal_flags()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void Span_Link::CopyFrom(const Span_Link& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.trace.v1.Span.Link) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Span_Link::IsInitialized() const { + return true; +} + +void Span_Link::InternalSwap(Span_Link* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.attributes_.InternalSwap(&other->_impl_.attributes_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.trace_id_, lhs_arena, + &other->_impl_.trace_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.span_id_, lhs_arena, + &other->_impl_.span_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.trace_state_, lhs_arena, + &other->_impl_.trace_state_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Span_Link, _impl_.flags_) + + sizeof(Span_Link::_impl_.flags_) + - PROTOBUF_FIELD_OFFSET(Span_Link, _impl_.dropped_attributes_count_)>( + reinterpret_cast<char*>(&_impl_.dropped_attributes_count_), + reinterpret_cast<char*>(&other->_impl_.dropped_attributes_count_)); +} + +std::string Span_Link::GetTypeName() const { + return "opentelemetry.proto.trace.v1.Span.Link"; +} + + +// =================================================================== + +class Span::_Internal { + public: + static const ::opentelemetry::proto::trace::v1::Status& status(const Span* msg); +}; + +const ::opentelemetry::proto::trace::v1::Status& +Span::_Internal::status(const Span* msg) { + return *msg->_impl_.status_; +} +void Span::clear_attributes() { + _impl_.attributes_.Clear(); +} +Span::Span(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.trace.v1.Span) +} +Span::Span(const Span& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + Span* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){from._impl_.attributes_} + , decltype(_impl_.events_){from._impl_.events_} + , decltype(_impl_.links_){from._impl_.links_} + , decltype(_impl_.trace_id_){} + , decltype(_impl_.span_id_){} + , decltype(_impl_.trace_state_){} + , decltype(_impl_.parent_span_id_){} + , decltype(_impl_.name_){} + , decltype(_impl_.status_){nullptr} + , decltype(_impl_.start_time_unix_nano_){} + , decltype(_impl_.end_time_unix_nano_){} + , decltype(_impl_.kind_){} + , decltype(_impl_.dropped_attributes_count_){} + , decltype(_impl_.dropped_events_count_){} + , decltype(_impl_.dropped_links_count_){} + , decltype(_impl_.flags_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.trace_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_trace_id().empty()) { + _this->_impl_.trace_id_.Set(from._internal_trace_id(), + _this->GetArenaForAllocation()); + } + _impl_.span_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.span_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_span_id().empty()) { + _this->_impl_.span_id_.Set(from._internal_span_id(), + _this->GetArenaForAllocation()); + } + _impl_.trace_state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_trace_state().empty()) { + _this->_impl_.trace_state_.Set(from._internal_trace_state(), + _this->GetArenaForAllocation()); + } + _impl_.parent_span_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.parent_span_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_parent_span_id().empty()) { + _this->_impl_.parent_span_id_.Set(from._internal_parent_span_id(), + _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()); + } + if (from._internal_has_status()) { + _this->_impl_.status_ = new ::opentelemetry::proto::trace::v1::Status(*from._impl_.status_); + } + ::memcpy(&_impl_.start_time_unix_nano_, &from._impl_.start_time_unix_nano_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.flags_) - + reinterpret_cast<char*>(&_impl_.start_time_unix_nano_)) + sizeof(_impl_.flags_)); + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.trace.v1.Span) +} + +inline void Span::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.attributes_){arena} + , decltype(_impl_.events_){arena} + , decltype(_impl_.links_){arena} + , decltype(_impl_.trace_id_){} + , decltype(_impl_.span_id_){} + , decltype(_impl_.trace_state_){} + , decltype(_impl_.parent_span_id_){} + , decltype(_impl_.name_){} + , decltype(_impl_.status_){nullptr} + , decltype(_impl_.start_time_unix_nano_){uint64_t{0u}} + , decltype(_impl_.end_time_unix_nano_){uint64_t{0u}} + , decltype(_impl_.kind_){0} + , decltype(_impl_.dropped_attributes_count_){0u} + , decltype(_impl_.dropped_events_count_){0u} + , decltype(_impl_.dropped_links_count_){0u} + , decltype(_impl_.flags_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.trace_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.span_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.span_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.trace_state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.parent_span_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.parent_span_id_.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 +} + +Span::~Span() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.trace.v1.Span) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Span::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.attributes_.~RepeatedPtrField(); + _impl_.events_.~RepeatedPtrField(); + _impl_.links_.~RepeatedPtrField(); + _impl_.trace_id_.Destroy(); + _impl_.span_id_.Destroy(); + _impl_.trace_state_.Destroy(); + _impl_.parent_span_id_.Destroy(); + _impl_.name_.Destroy(); + if (this != internal_default_instance()) delete _impl_.status_; +} + +void Span::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Span::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.trace.v1.Span) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.attributes_.Clear(); + _impl_.events_.Clear(); + _impl_.links_.Clear(); + _impl_.trace_id_.ClearToEmpty(); + _impl_.span_id_.ClearToEmpty(); + _impl_.trace_state_.ClearToEmpty(); + _impl_.parent_span_id_.ClearToEmpty(); + _impl_.name_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.status_ != nullptr) { + delete _impl_.status_; + } + _impl_.status_ = nullptr; + ::memset(&_impl_.start_time_unix_nano_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.flags_) - + reinterpret_cast<char*>(&_impl_.start_time_unix_nano_)) + sizeof(_impl_.flags_)); + _internal_metadata_.Clear<std::string>(); +} + +const char* Span::_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) { + // bytes trace_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_trace_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes span_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_span_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string trace_state = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + auto str = _internal_mutable_trace_state(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // bytes parent_span_id = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + auto str = _internal_mutable_parent_span_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string name = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // .opentelemetry.proto.trace.v1.Span.SpanKind kind = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_kind(static_cast<::opentelemetry::proto::trace::v1::Span_SpanKind>(val)); + } else + goto handle_unusual; + continue; + // fixed64 start_time_unix_nano = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 57)) { + _impl_.start_time_unix_nano_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr); + ptr += sizeof(uint64_t); + } else + goto handle_unusual; + continue; + // fixed64 end_time_unix_nano = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 65)) { + _impl_.end_time_unix_nano_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr); + ptr += sizeof(uint64_t); + } else + goto handle_unusual; + continue; + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_attributes(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); + } else + goto handle_unusual; + continue; + // uint32 dropped_attributes_count = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) { + _impl_.dropped_attributes_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opentelemetry.proto.trace.v1.Span.Event events = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_events(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr)); + } else + goto handle_unusual; + continue; + // uint32 dropped_events_count = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) { + _impl_.dropped_events_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opentelemetry.proto.trace.v1.Span.Link links = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_links(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<106>(ptr)); + } else + goto handle_unusual; + continue; + // uint32 dropped_links_count = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) { + _impl_.dropped_links_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .opentelemetry.proto.trace.v1.Status status = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) { + ptr = ctx->ParseMessage(_internal_mutable_status(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // fixed32 flags = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 133)) { + _impl_.flags_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint32_t>(ptr); + ptr += sizeof(uint32_t); + } 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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Span::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.trace.v1.Span) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bytes trace_id = 1; + if (!this->_internal_trace_id().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_trace_id(), target); + } + + // bytes span_id = 2; + if (!this->_internal_span_id().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_span_id(), target); + } + + // string trace_state = 3; + if (!this->_internal_trace_state().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_trace_state().data(), static_cast<int>(this->_internal_trace_state().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.trace.v1.Span.trace_state"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_trace_state(), target); + } + + // bytes parent_span_id = 4; + if (!this->_internal_parent_span_id().empty()) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_parent_span_id(), target); + } + + // string name = 5; + 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, + "opentelemetry.proto.trace.v1.Span.name"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_name(), target); + } + + // .opentelemetry.proto.trace.v1.Span.SpanKind kind = 6; + if (this->_internal_kind() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this->_internal_kind(), target); + } + + // fixed64 start_time_unix_nano = 7; + if (this->_internal_start_time_unix_nano() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFixed64ToArray(7, this->_internal_start_time_unix_nano(), target); + } + + // fixed64 end_time_unix_nano = 8; + if (this->_internal_end_time_unix_nano() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFixed64ToArray(8, this->_internal_end_time_unix_nano(), target); + } + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_attributes_size()); i < n; i++) { + const auto& repfield = this->_internal_attributes(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(9, repfield, repfield.GetCachedSize(), target, stream); + } + + // uint32 dropped_attributes_count = 10; + if (this->_internal_dropped_attributes_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(10, this->_internal_dropped_attributes_count(), target); + } + + // repeated .opentelemetry.proto.trace.v1.Span.Event events = 11; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_events_size()); i < n; i++) { + const auto& repfield = this->_internal_events(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(11, repfield, repfield.GetCachedSize(), target, stream); + } + + // uint32 dropped_events_count = 12; + if (this->_internal_dropped_events_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(12, this->_internal_dropped_events_count(), target); + } + + // repeated .opentelemetry.proto.trace.v1.Span.Link links = 13; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_links_size()); i < n; i++) { + const auto& repfield = this->_internal_links(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(13, repfield, repfield.GetCachedSize(), target, stream); + } + + // uint32 dropped_links_count = 14; + if (this->_internal_dropped_links_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(14, this->_internal_dropped_links_count(), target); + } + + // .opentelemetry.proto.trace.v1.Status status = 15; + if (this->_internal_has_status()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(15, _Internal::status(this), + _Internal::status(this).GetCachedSize(), target, stream); + } + + // fixed32 flags = 16; + if (this->_internal_flags() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFixed32ToArray(16, this->_internal_flags(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.trace.v1.Span) + return target; +} + +size_t Span::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.trace.v1.Span) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9; + total_size += 1UL * this->_internal_attributes_size(); + for (const auto& msg : this->_impl_.attributes_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opentelemetry.proto.trace.v1.Span.Event events = 11; + total_size += 1UL * this->_internal_events_size(); + for (const auto& msg : this->_impl_.events_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opentelemetry.proto.trace.v1.Span.Link links = 13; + total_size += 1UL * this->_internal_links_size(); + for (const auto& msg : this->_impl_.links_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // bytes trace_id = 1; + if (!this->_internal_trace_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_trace_id()); + } + + // bytes span_id = 2; + if (!this->_internal_span_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_span_id()); + } + + // string trace_state = 3; + if (!this->_internal_trace_state().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_trace_state()); + } + + // bytes parent_span_id = 4; + if (!this->_internal_parent_span_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_parent_span_id()); + } + + // string name = 5; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // .opentelemetry.proto.trace.v1.Status status = 15; + if (this->_internal_has_status()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.status_); + } + + // fixed64 start_time_unix_nano = 7; + if (this->_internal_start_time_unix_nano() != 0) { + total_size += 1 + 8; + } + + // fixed64 end_time_unix_nano = 8; + if (this->_internal_end_time_unix_nano() != 0) { + total_size += 1 + 8; + } + + // .opentelemetry.proto.trace.v1.Span.SpanKind kind = 6; + if (this->_internal_kind() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_kind()); + } + + // uint32 dropped_attributes_count = 10; + if (this->_internal_dropped_attributes_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dropped_attributes_count()); + } + + // uint32 dropped_events_count = 12; + if (this->_internal_dropped_events_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dropped_events_count()); + } + + // uint32 dropped_links_count = 14; + if (this->_internal_dropped_links_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dropped_links_count()); + } + + // fixed32 flags = 16; + if (this->_internal_flags() != 0) { + total_size += 2 + 4; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Span::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const Span*>( + &from)); +} + +void Span::MergeFrom(const Span& from) { + Span* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.trace.v1.Span) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.attributes_.MergeFrom(from._impl_.attributes_); + _this->_impl_.events_.MergeFrom(from._impl_.events_); + _this->_impl_.links_.MergeFrom(from._impl_.links_); + if (!from._internal_trace_id().empty()) { + _this->_internal_set_trace_id(from._internal_trace_id()); + } + if (!from._internal_span_id().empty()) { + _this->_internal_set_span_id(from._internal_span_id()); + } + if (!from._internal_trace_state().empty()) { + _this->_internal_set_trace_state(from._internal_trace_state()); + } + if (!from._internal_parent_span_id().empty()) { + _this->_internal_set_parent_span_id(from._internal_parent_span_id()); + } + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (from._internal_has_status()) { + _this->_internal_mutable_status()->::opentelemetry::proto::trace::v1::Status::MergeFrom( + from._internal_status()); + } + if (from._internal_start_time_unix_nano() != 0) { + _this->_internal_set_start_time_unix_nano(from._internal_start_time_unix_nano()); + } + if (from._internal_end_time_unix_nano() != 0) { + _this->_internal_set_end_time_unix_nano(from._internal_end_time_unix_nano()); + } + if (from._internal_kind() != 0) { + _this->_internal_set_kind(from._internal_kind()); + } + if (from._internal_dropped_attributes_count() != 0) { + _this->_internal_set_dropped_attributes_count(from._internal_dropped_attributes_count()); + } + if (from._internal_dropped_events_count() != 0) { + _this->_internal_set_dropped_events_count(from._internal_dropped_events_count()); + } + if (from._internal_dropped_links_count() != 0) { + _this->_internal_set_dropped_links_count(from._internal_dropped_links_count()); + } + if (from._internal_flags() != 0) { + _this->_internal_set_flags(from._internal_flags()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void Span::CopyFrom(const Span& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.trace.v1.Span) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Span::IsInitialized() const { + return true; +} + +void Span::InternalSwap(Span* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.attributes_.InternalSwap(&other->_impl_.attributes_); + _impl_.events_.InternalSwap(&other->_impl_.events_); + _impl_.links_.InternalSwap(&other->_impl_.links_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.trace_id_, lhs_arena, + &other->_impl_.trace_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.span_id_, lhs_arena, + &other->_impl_.span_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.trace_state_, lhs_arena, + &other->_impl_.trace_state_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.parent_span_id_, lhs_arena, + &other->_impl_.parent_span_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Span, _impl_.flags_) + + sizeof(Span::_impl_.flags_) + - PROTOBUF_FIELD_OFFSET(Span, _impl_.status_)>( + reinterpret_cast<char*>(&_impl_.status_), + reinterpret_cast<char*>(&other->_impl_.status_)); +} + +std::string Span::GetTypeName() const { + return "opentelemetry.proto.trace.v1.Span"; +} + + +// =================================================================== + +class Status::_Internal { + public: +}; + +Status::Status(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:opentelemetry.proto.trace.v1.Status) +} +Status::Status(const Status& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + Status* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.message_){} + , decltype(_impl_.code_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.message_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.message_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_message().empty()) { + _this->_impl_.message_.Set(from._internal_message(), + _this->GetArenaForAllocation()); + } + _this->_impl_.code_ = from._impl_.code_; + // @@protoc_insertion_point(copy_constructor:opentelemetry.proto.trace.v1.Status) +} + +inline void Status::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.message_){} + , decltype(_impl_.code_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.message_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.message_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Status::~Status() { + // @@protoc_insertion_point(destructor:opentelemetry.proto.trace.v1.Status) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Status::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.message_.Destroy(); +} + +void Status::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Status::Clear() { +// @@protoc_insertion_point(message_clear_start:opentelemetry.proto.trace.v1.Status) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.message_.ClearToEmpty(); + _impl_.code_ = 0; + _internal_metadata_.Clear<std::string>(); +} + +const char* Status::_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 message = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_message(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // .opentelemetry.proto.trace.v1.Status.StatusCode code = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_code(static_cast<::opentelemetry::proto::trace::v1::Status_StatusCode>(val)); + } 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<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Status::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opentelemetry.proto.trace.v1.Status) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string message = 2; + if (!this->_internal_message().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_message().data(), static_cast<int>(this->_internal_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opentelemetry.proto.trace.v1.Status.message"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_message(), target); + } + + // .opentelemetry.proto.trace.v1.Status.StatusCode code = 3; + if (this->_internal_code() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this->_internal_code(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opentelemetry.proto.trace.v1.Status) + return target; +} + +size_t Status::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opentelemetry.proto.trace.v1.Status) + 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 message = 2; + if (!this->_internal_message().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_message()); + } + + // .opentelemetry.proto.trace.v1.Status.StatusCode code = 3; + if (this->_internal_code() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_code()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Status::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const Status*>( + &from)); +} + +void Status::MergeFrom(const Status& from) { + Status* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:opentelemetry.proto.trace.v1.Status) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_message().empty()) { + _this->_internal_set_message(from._internal_message()); + } + if (from._internal_code() != 0) { + _this->_internal_set_code(from._internal_code()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void Status::CopyFrom(const Status& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opentelemetry.proto.trace.v1.Status) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Status::IsInitialized() const { + return true; +} + +void Status::InternalSwap(Status* 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_.message_, lhs_arena, + &other->_impl_.message_, rhs_arena + ); + swap(_impl_.code_, other->_impl_.code_); +} + +std::string Status::GetTypeName() const { + return "opentelemetry.proto.trace.v1.Status"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace trace +} // namespace proto +} // namespace opentelemetry +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::trace::v1::TracesData* +Arena::CreateMaybeMessage< ::opentelemetry::proto::trace::v1::TracesData >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::trace::v1::TracesData >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::trace::v1::ResourceSpans* +Arena::CreateMaybeMessage< ::opentelemetry::proto::trace::v1::ResourceSpans >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::trace::v1::ResourceSpans >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::trace::v1::ScopeSpans* +Arena::CreateMaybeMessage< ::opentelemetry::proto::trace::v1::ScopeSpans >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::trace::v1::ScopeSpans >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::trace::v1::Span_Event* +Arena::CreateMaybeMessage< ::opentelemetry::proto::trace::v1::Span_Event >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::trace::v1::Span_Event >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::trace::v1::Span_Link* +Arena::CreateMaybeMessage< ::opentelemetry::proto::trace::v1::Span_Link >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::trace::v1::Span_Link >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::trace::v1::Span* +Arena::CreateMaybeMessage< ::opentelemetry::proto::trace::v1::Span >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::trace::v1::Span >(arena); +} +template<> PROTOBUF_NOINLINE ::opentelemetry::proto::trace::v1::Status* +Arena::CreateMaybeMessage< ::opentelemetry::proto::trace::v1::Status >(Arena* arena) { + return Arena::CreateMessageInternal< ::opentelemetry::proto::trace::v1::Status >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.pb.h b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.pb.h @@ -0,0 +1,3082 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opentelemetry/proto/trace/v1/trace.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_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 3021006 < 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/message_lite.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/generated_enum_util.h> +#include "opentelemetry/proto/common/v1/common.pb.h" +#include "opentelemetry/proto/resource/v1/resource.pb.h" +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto { + static const uint32_t offsets[]; +}; +namespace opentelemetry { +namespace proto { +namespace trace { +namespace v1 { +class ResourceSpans; +struct ResourceSpansDefaultTypeInternal; +extern ResourceSpansDefaultTypeInternal _ResourceSpans_default_instance_; +class ScopeSpans; +struct ScopeSpansDefaultTypeInternal; +extern ScopeSpansDefaultTypeInternal _ScopeSpans_default_instance_; +class Span; +struct SpanDefaultTypeInternal; +extern SpanDefaultTypeInternal _Span_default_instance_; +class Span_Event; +struct Span_EventDefaultTypeInternal; +extern Span_EventDefaultTypeInternal _Span_Event_default_instance_; +class Span_Link; +struct Span_LinkDefaultTypeInternal; +extern Span_LinkDefaultTypeInternal _Span_Link_default_instance_; +class Status; +struct StatusDefaultTypeInternal; +extern StatusDefaultTypeInternal _Status_default_instance_; +class TracesData; +struct TracesDataDefaultTypeInternal; +extern TracesDataDefaultTypeInternal _TracesData_default_instance_; +} // namespace v1 +} // namespace trace +} // namespace proto +} // namespace opentelemetry +PROTOBUF_NAMESPACE_OPEN +template<> ::opentelemetry::proto::trace::v1::ResourceSpans* Arena::CreateMaybeMessage<::opentelemetry::proto::trace::v1::ResourceSpans>(Arena*); +template<> ::opentelemetry::proto::trace::v1::ScopeSpans* Arena::CreateMaybeMessage<::opentelemetry::proto::trace::v1::ScopeSpans>(Arena*); +template<> ::opentelemetry::proto::trace::v1::Span* Arena::CreateMaybeMessage<::opentelemetry::proto::trace::v1::Span>(Arena*); +template<> ::opentelemetry::proto::trace::v1::Span_Event* Arena::CreateMaybeMessage<::opentelemetry::proto::trace::v1::Span_Event>(Arena*); +template<> ::opentelemetry::proto::trace::v1::Span_Link* Arena::CreateMaybeMessage<::opentelemetry::proto::trace::v1::Span_Link>(Arena*); +template<> ::opentelemetry::proto::trace::v1::Status* Arena::CreateMaybeMessage<::opentelemetry::proto::trace::v1::Status>(Arena*); +template<> ::opentelemetry::proto::trace::v1::TracesData* Arena::CreateMaybeMessage<::opentelemetry::proto::trace::v1::TracesData>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace opentelemetry { +namespace proto { +namespace trace { +namespace v1 { + +enum Span_SpanKind : int { + Span_SpanKind_SPAN_KIND_UNSPECIFIED = 0, + Span_SpanKind_SPAN_KIND_INTERNAL = 1, + Span_SpanKind_SPAN_KIND_SERVER = 2, + Span_SpanKind_SPAN_KIND_CLIENT = 3, + Span_SpanKind_SPAN_KIND_PRODUCER = 4, + Span_SpanKind_SPAN_KIND_CONSUMER = 5, + Span_SpanKind_Span_SpanKind_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), + Span_SpanKind_Span_SpanKind_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() +}; +bool Span_SpanKind_IsValid(int value); +constexpr Span_SpanKind Span_SpanKind_SpanKind_MIN = Span_SpanKind_SPAN_KIND_UNSPECIFIED; +constexpr Span_SpanKind Span_SpanKind_SpanKind_MAX = Span_SpanKind_SPAN_KIND_CONSUMER; +constexpr int Span_SpanKind_SpanKind_ARRAYSIZE = Span_SpanKind_SpanKind_MAX + 1; + +const std::string& Span_SpanKind_Name(Span_SpanKind value); +template<typename T> +inline const std::string& Span_SpanKind_Name(T enum_t_value) { + static_assert(::std::is_same<T, Span_SpanKind>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function Span_SpanKind_Name."); + return Span_SpanKind_Name(static_cast<Span_SpanKind>(enum_t_value)); +} +bool Span_SpanKind_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Span_SpanKind* value); +enum Status_StatusCode : int { + Status_StatusCode_STATUS_CODE_UNSET = 0, + Status_StatusCode_STATUS_CODE_OK = 1, + Status_StatusCode_STATUS_CODE_ERROR = 2, + Status_StatusCode_Status_StatusCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), + Status_StatusCode_Status_StatusCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() +}; +bool Status_StatusCode_IsValid(int value); +constexpr Status_StatusCode Status_StatusCode_StatusCode_MIN = Status_StatusCode_STATUS_CODE_UNSET; +constexpr Status_StatusCode Status_StatusCode_StatusCode_MAX = Status_StatusCode_STATUS_CODE_ERROR; +constexpr int Status_StatusCode_StatusCode_ARRAYSIZE = Status_StatusCode_StatusCode_MAX + 1; + +const std::string& Status_StatusCode_Name(Status_StatusCode value); +template<typename T> +inline const std::string& Status_StatusCode_Name(T enum_t_value) { + static_assert(::std::is_same<T, Status_StatusCode>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function Status_StatusCode_Name."); + return Status_StatusCode_Name(static_cast<Status_StatusCode>(enum_t_value)); +} +bool Status_StatusCode_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Status_StatusCode* value); +enum SpanFlags : int { + SPAN_FLAGS_DO_NOT_USE = 0, + SPAN_FLAGS_TRACE_FLAGS_MASK = 255, + SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 256, + SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 512, + SpanFlags_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), + SpanFlags_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() +}; +bool SpanFlags_IsValid(int value); +constexpr SpanFlags SpanFlags_MIN = SPAN_FLAGS_DO_NOT_USE; +constexpr SpanFlags SpanFlags_MAX = SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK; +constexpr int SpanFlags_ARRAYSIZE = SpanFlags_MAX + 1; + +const std::string& SpanFlags_Name(SpanFlags value); +template<typename T> +inline const std::string& SpanFlags_Name(T enum_t_value) { + static_assert(::std::is_same<T, SpanFlags>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function SpanFlags_Name."); + return SpanFlags_Name(static_cast<SpanFlags>(enum_t_value)); +} +bool SpanFlags_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SpanFlags* value); +// =================================================================== + +class TracesData final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.trace.v1.TracesData) */ { + public: + inline TracesData() : TracesData(nullptr) {} + ~TracesData() override; + explicit PROTOBUF_CONSTEXPR TracesData(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TracesData(const TracesData& from); + TracesData(TracesData&& from) noexcept + : TracesData() { + *this = ::std::move(from); + } + + inline TracesData& operator=(const TracesData& from) { + CopyFrom(from); + return *this; + } + inline TracesData& operator=(TracesData&& 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 TracesData& default_instance() { + return *internal_default_instance(); + } + static inline const TracesData* internal_default_instance() { + return reinterpret_cast<const TracesData*>( + &_TracesData_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(TracesData& a, TracesData& b) { + a.Swap(&b); + } + inline void Swap(TracesData* 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(TracesData* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TracesData* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<TracesData>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const TracesData& from); + void MergeFrom(const TracesData& from); + 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; + void InternalSwap(TracesData* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.trace.v1.TracesData"; + } + protected: + explicit TracesData(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kResourceSpansFieldNumber = 1, + }; + // repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; + int resource_spans_size() const; + private: + int _internal_resource_spans_size() const; + public: + void clear_resource_spans(); + ::opentelemetry::proto::trace::v1::ResourceSpans* mutable_resource_spans(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans >* + mutable_resource_spans(); + private: + const ::opentelemetry::proto::trace::v1::ResourceSpans& _internal_resource_spans(int index) const; + ::opentelemetry::proto::trace::v1::ResourceSpans* _internal_add_resource_spans(); + public: + const ::opentelemetry::proto::trace::v1::ResourceSpans& resource_spans(int index) const; + ::opentelemetry::proto::trace::v1::ResourceSpans* add_resource_spans(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans >& + resource_spans() const; + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.trace.v1.TracesData) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans > resource_spans_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto; +}; +// ------------------------------------------------------------------- + +class ResourceSpans final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.trace.v1.ResourceSpans) */ { + public: + inline ResourceSpans() : ResourceSpans(nullptr) {} + ~ResourceSpans() override; + explicit PROTOBUF_CONSTEXPR ResourceSpans(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ResourceSpans(const ResourceSpans& from); + ResourceSpans(ResourceSpans&& from) noexcept + : ResourceSpans() { + *this = ::std::move(from); + } + + inline ResourceSpans& operator=(const ResourceSpans& from) { + CopyFrom(from); + return *this; + } + inline ResourceSpans& operator=(ResourceSpans&& 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 ResourceSpans& default_instance() { + return *internal_default_instance(); + } + static inline const ResourceSpans* internal_default_instance() { + return reinterpret_cast<const ResourceSpans*>( + &_ResourceSpans_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ResourceSpans& a, ResourceSpans& b) { + a.Swap(&b); + } + inline void Swap(ResourceSpans* 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(ResourceSpans* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResourceSpans* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ResourceSpans>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ResourceSpans& from); + void MergeFrom(const ResourceSpans& from); + 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; + void InternalSwap(ResourceSpans* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.trace.v1.ResourceSpans"; + } + protected: + explicit ResourceSpans(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kScopeSpansFieldNumber = 2, + kSchemaUrlFieldNumber = 3, + kResourceFieldNumber = 1, + }; + // repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; + int scope_spans_size() const; + private: + int _internal_scope_spans_size() const; + public: + void clear_scope_spans(); + ::opentelemetry::proto::trace::v1::ScopeSpans* mutable_scope_spans(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ScopeSpans >* + mutable_scope_spans(); + private: + const ::opentelemetry::proto::trace::v1::ScopeSpans& _internal_scope_spans(int index) const; + ::opentelemetry::proto::trace::v1::ScopeSpans* _internal_add_scope_spans(); + public: + const ::opentelemetry::proto::trace::v1::ScopeSpans& scope_spans(int index) const; + ::opentelemetry::proto::trace::v1::ScopeSpans* add_scope_spans(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ScopeSpans >& + scope_spans() const; + + // string schema_url = 3; + void clear_schema_url(); + const std::string& schema_url() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_schema_url(ArgT0&& arg0, ArgT... args); + std::string* mutable_schema_url(); + PROTOBUF_NODISCARD std::string* release_schema_url(); + void set_allocated_schema_url(std::string* schema_url); + private: + const std::string& _internal_schema_url() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_schema_url(const std::string& value); + std::string* _internal_mutable_schema_url(); + public: + + // .opentelemetry.proto.resource.v1.Resource resource = 1; + bool has_resource() const; + private: + bool _internal_has_resource() const; + public: + void clear_resource(); + const ::opentelemetry::proto::resource::v1::Resource& resource() const; + PROTOBUF_NODISCARD ::opentelemetry::proto::resource::v1::Resource* release_resource(); + ::opentelemetry::proto::resource::v1::Resource* mutable_resource(); + void set_allocated_resource(::opentelemetry::proto::resource::v1::Resource* resource); + private: + const ::opentelemetry::proto::resource::v1::Resource& _internal_resource() const; + ::opentelemetry::proto::resource::v1::Resource* _internal_mutable_resource(); + public: + void unsafe_arena_set_allocated_resource( + ::opentelemetry::proto::resource::v1::Resource* resource); + ::opentelemetry::proto::resource::v1::Resource* unsafe_arena_release_resource(); + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.trace.v1.ResourceSpans) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ScopeSpans > scope_spans_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_url_; + ::opentelemetry::proto::resource::v1::Resource* resource_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto; +}; +// ------------------------------------------------------------------- + +class ScopeSpans final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.trace.v1.ScopeSpans) */ { + public: + inline ScopeSpans() : ScopeSpans(nullptr) {} + ~ScopeSpans() override; + explicit PROTOBUF_CONSTEXPR ScopeSpans(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ScopeSpans(const ScopeSpans& from); + ScopeSpans(ScopeSpans&& from) noexcept + : ScopeSpans() { + *this = ::std::move(from); + } + + inline ScopeSpans& operator=(const ScopeSpans& from) { + CopyFrom(from); + return *this; + } + inline ScopeSpans& operator=(ScopeSpans&& 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 ScopeSpans& default_instance() { + return *internal_default_instance(); + } + static inline const ScopeSpans* internal_default_instance() { + return reinterpret_cast<const ScopeSpans*>( + &_ScopeSpans_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ScopeSpans& a, ScopeSpans& b) { + a.Swap(&b); + } + inline void Swap(ScopeSpans* 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(ScopeSpans* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ScopeSpans* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ScopeSpans>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ScopeSpans& from); + void MergeFrom(const ScopeSpans& from); + 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; + void InternalSwap(ScopeSpans* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.trace.v1.ScopeSpans"; + } + protected: + explicit ScopeSpans(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSpansFieldNumber = 2, + kSchemaUrlFieldNumber = 3, + kScopeFieldNumber = 1, + }; + // repeated .opentelemetry.proto.trace.v1.Span spans = 2; + int spans_size() const; + private: + int _internal_spans_size() const; + public: + void clear_spans(); + ::opentelemetry::proto::trace::v1::Span* mutable_spans(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span >* + mutable_spans(); + private: + const ::opentelemetry::proto::trace::v1::Span& _internal_spans(int index) const; + ::opentelemetry::proto::trace::v1::Span* _internal_add_spans(); + public: + const ::opentelemetry::proto::trace::v1::Span& spans(int index) const; + ::opentelemetry::proto::trace::v1::Span* add_spans(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span >& + spans() const; + + // string schema_url = 3; + void clear_schema_url(); + const std::string& schema_url() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_schema_url(ArgT0&& arg0, ArgT... args); + std::string* mutable_schema_url(); + PROTOBUF_NODISCARD std::string* release_schema_url(); + void set_allocated_schema_url(std::string* schema_url); + private: + const std::string& _internal_schema_url() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_schema_url(const std::string& value); + std::string* _internal_mutable_schema_url(); + public: + + // .opentelemetry.proto.common.v1.InstrumentationScope scope = 1; + bool has_scope() const; + private: + bool _internal_has_scope() const; + public: + void clear_scope(); + const ::opentelemetry::proto::common::v1::InstrumentationScope& scope() const; + PROTOBUF_NODISCARD ::opentelemetry::proto::common::v1::InstrumentationScope* release_scope(); + ::opentelemetry::proto::common::v1::InstrumentationScope* mutable_scope(); + void set_allocated_scope(::opentelemetry::proto::common::v1::InstrumentationScope* scope); + private: + const ::opentelemetry::proto::common::v1::InstrumentationScope& _internal_scope() const; + ::opentelemetry::proto::common::v1::InstrumentationScope* _internal_mutable_scope(); + public: + void unsafe_arena_set_allocated_scope( + ::opentelemetry::proto::common::v1::InstrumentationScope* scope); + ::opentelemetry::proto::common::v1::InstrumentationScope* unsafe_arena_release_scope(); + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.trace.v1.ScopeSpans) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span > spans_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_url_; + ::opentelemetry::proto::common::v1::InstrumentationScope* scope_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto; +}; +// ------------------------------------------------------------------- + +class Span_Event final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.trace.v1.Span.Event) */ { + public: + inline Span_Event() : Span_Event(nullptr) {} + ~Span_Event() override; + explicit PROTOBUF_CONSTEXPR Span_Event(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Span_Event(const Span_Event& from); + Span_Event(Span_Event&& from) noexcept + : Span_Event() { + *this = ::std::move(from); + } + + inline Span_Event& operator=(const Span_Event& from) { + CopyFrom(from); + return *this; + } + inline Span_Event& operator=(Span_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 Span_Event& default_instance() { + return *internal_default_instance(); + } + static inline const Span_Event* internal_default_instance() { + return reinterpret_cast<const Span_Event*>( + &_Span_Event_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(Span_Event& a, Span_Event& b) { + a.Swap(&b); + } + inline void Swap(Span_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(Span_Event* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Span_Event* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<Span_Event>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Span_Event& from); + void MergeFrom(const Span_Event& from); + 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; + void InternalSwap(Span_Event* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.trace.v1.Span.Event"; + } + protected: + explicit Span_Event(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAttributesFieldNumber = 3, + kNameFieldNumber = 2, + kTimeUnixNanoFieldNumber = 1, + kDroppedAttributesCountFieldNumber = 4, + }; + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; + int attributes_size() const; + private: + int _internal_attributes_size() const; + public: + void clear_attributes(); + ::opentelemetry::proto::common::v1::KeyValue* mutable_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* + mutable_attributes(); + private: + const ::opentelemetry::proto::common::v1::KeyValue& _internal_attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* _internal_add_attributes(); + public: + const ::opentelemetry::proto::common::v1::KeyValue& attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* add_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& + attributes() const; + + // string name = 2; + 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: + + // fixed64 time_unix_nano = 1; + void clear_time_unix_nano(); + uint64_t time_unix_nano() const; + void set_time_unix_nano(uint64_t value); + private: + uint64_t _internal_time_unix_nano() const; + void _internal_set_time_unix_nano(uint64_t value); + public: + + // uint32 dropped_attributes_count = 4; + void clear_dropped_attributes_count(); + uint32_t dropped_attributes_count() const; + void set_dropped_attributes_count(uint32_t value); + private: + uint32_t _internal_dropped_attributes_count() const; + void _internal_set_dropped_attributes_count(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.trace.v1.Span.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::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue > attributes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + uint64_t time_unix_nano_; + uint32_t dropped_attributes_count_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto; +}; +// ------------------------------------------------------------------- + +class Span_Link final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.trace.v1.Span.Link) */ { + public: + inline Span_Link() : Span_Link(nullptr) {} + ~Span_Link() override; + explicit PROTOBUF_CONSTEXPR Span_Link(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Span_Link(const Span_Link& from); + Span_Link(Span_Link&& from) noexcept + : Span_Link() { + *this = ::std::move(from); + } + + inline Span_Link& operator=(const Span_Link& from) { + CopyFrom(from); + return *this; + } + inline Span_Link& operator=(Span_Link&& 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 Span_Link& default_instance() { + return *internal_default_instance(); + } + static inline const Span_Link* internal_default_instance() { + return reinterpret_cast<const Span_Link*>( + &_Span_Link_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(Span_Link& a, Span_Link& b) { + a.Swap(&b); + } + inline void Swap(Span_Link* 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(Span_Link* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Span_Link* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<Span_Link>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Span_Link& from); + void MergeFrom(const Span_Link& from); + 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; + void InternalSwap(Span_Link* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.trace.v1.Span.Link"; + } + protected: + explicit Span_Link(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAttributesFieldNumber = 4, + kTraceIdFieldNumber = 1, + kSpanIdFieldNumber = 2, + kTraceStateFieldNumber = 3, + kDroppedAttributesCountFieldNumber = 5, + kFlagsFieldNumber = 6, + }; + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; + int attributes_size() const; + private: + int _internal_attributes_size() const; + public: + void clear_attributes(); + ::opentelemetry::proto::common::v1::KeyValue* mutable_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* + mutable_attributes(); + private: + const ::opentelemetry::proto::common::v1::KeyValue& _internal_attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* _internal_add_attributes(); + public: + const ::opentelemetry::proto::common::v1::KeyValue& attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* add_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& + attributes() const; + + // bytes trace_id = 1; + void clear_trace_id(); + const std::string& trace_id() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_trace_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_trace_id(); + PROTOBUF_NODISCARD std::string* release_trace_id(); + void set_allocated_trace_id(std::string* trace_id); + private: + const std::string& _internal_trace_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_trace_id(const std::string& value); + std::string* _internal_mutable_trace_id(); + public: + + // bytes span_id = 2; + void clear_span_id(); + const std::string& span_id() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_span_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_span_id(); + PROTOBUF_NODISCARD std::string* release_span_id(); + void set_allocated_span_id(std::string* span_id); + private: + const std::string& _internal_span_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_span_id(const std::string& value); + std::string* _internal_mutable_span_id(); + public: + + // string trace_state = 3; + void clear_trace_state(); + const std::string& trace_state() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_trace_state(ArgT0&& arg0, ArgT... args); + std::string* mutable_trace_state(); + PROTOBUF_NODISCARD std::string* release_trace_state(); + void set_allocated_trace_state(std::string* trace_state); + private: + const std::string& _internal_trace_state() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_trace_state(const std::string& value); + std::string* _internal_mutable_trace_state(); + public: + + // uint32 dropped_attributes_count = 5; + void clear_dropped_attributes_count(); + uint32_t dropped_attributes_count() const; + void set_dropped_attributes_count(uint32_t value); + private: + uint32_t _internal_dropped_attributes_count() const; + void _internal_set_dropped_attributes_count(uint32_t value); + public: + + // fixed32 flags = 6; + void clear_flags(); + uint32_t flags() const; + void set_flags(uint32_t value); + private: + uint32_t _internal_flags() const; + void _internal_set_flags(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.trace.v1.Span.Link) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue > attributes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trace_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr span_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trace_state_; + uint32_t dropped_attributes_count_; + uint32_t flags_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto; +}; +// ------------------------------------------------------------------- + +class Span final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.trace.v1.Span) */ { + public: + inline Span() : Span(nullptr) {} + ~Span() override; + explicit PROTOBUF_CONSTEXPR Span(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Span(const Span& from); + Span(Span&& from) noexcept + : Span() { + *this = ::std::move(from); + } + + inline Span& operator=(const Span& from) { + CopyFrom(from); + return *this; + } + inline Span& operator=(Span&& 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 Span& default_instance() { + return *internal_default_instance(); + } + static inline const Span* internal_default_instance() { + return reinterpret_cast<const Span*>( + &_Span_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(Span& a, Span& b) { + a.Swap(&b); + } + inline void Swap(Span* 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(Span* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Span* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<Span>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Span& from); + void MergeFrom(const Span& from); + 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; + void InternalSwap(Span* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.trace.v1.Span"; + } + protected: + explicit Span(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef Span_Event Event; + typedef Span_Link Link; + + typedef Span_SpanKind SpanKind; + static constexpr SpanKind SPAN_KIND_UNSPECIFIED = + Span_SpanKind_SPAN_KIND_UNSPECIFIED; + static constexpr SpanKind SPAN_KIND_INTERNAL = + Span_SpanKind_SPAN_KIND_INTERNAL; + static constexpr SpanKind SPAN_KIND_SERVER = + Span_SpanKind_SPAN_KIND_SERVER; + static constexpr SpanKind SPAN_KIND_CLIENT = + Span_SpanKind_SPAN_KIND_CLIENT; + static constexpr SpanKind SPAN_KIND_PRODUCER = + Span_SpanKind_SPAN_KIND_PRODUCER; + static constexpr SpanKind SPAN_KIND_CONSUMER = + Span_SpanKind_SPAN_KIND_CONSUMER; + static inline bool SpanKind_IsValid(int value) { + return Span_SpanKind_IsValid(value); + } + static constexpr SpanKind SpanKind_MIN = + Span_SpanKind_SpanKind_MIN; + static constexpr SpanKind SpanKind_MAX = + Span_SpanKind_SpanKind_MAX; + static constexpr int SpanKind_ARRAYSIZE = + Span_SpanKind_SpanKind_ARRAYSIZE; + template<typename T> + static inline const std::string& SpanKind_Name(T enum_t_value) { + static_assert(::std::is_same<T, SpanKind>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function SpanKind_Name."); + return Span_SpanKind_Name(enum_t_value); + } + static inline bool SpanKind_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + SpanKind* value) { + return Span_SpanKind_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kAttributesFieldNumber = 9, + kEventsFieldNumber = 11, + kLinksFieldNumber = 13, + kTraceIdFieldNumber = 1, + kSpanIdFieldNumber = 2, + kTraceStateFieldNumber = 3, + kParentSpanIdFieldNumber = 4, + kNameFieldNumber = 5, + kStatusFieldNumber = 15, + kStartTimeUnixNanoFieldNumber = 7, + kEndTimeUnixNanoFieldNumber = 8, + kKindFieldNumber = 6, + kDroppedAttributesCountFieldNumber = 10, + kDroppedEventsCountFieldNumber = 12, + kDroppedLinksCountFieldNumber = 14, + kFlagsFieldNumber = 16, + }; + // repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9; + int attributes_size() const; + private: + int _internal_attributes_size() const; + public: + void clear_attributes(); + ::opentelemetry::proto::common::v1::KeyValue* mutable_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* + mutable_attributes(); + private: + const ::opentelemetry::proto::common::v1::KeyValue& _internal_attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* _internal_add_attributes(); + public: + const ::opentelemetry::proto::common::v1::KeyValue& attributes(int index) const; + ::opentelemetry::proto::common::v1::KeyValue* add_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& + attributes() const; + + // repeated .opentelemetry.proto.trace.v1.Span.Event events = 11; + int events_size() const; + private: + int _internal_events_size() const; + public: + void clear_events(); + ::opentelemetry::proto::trace::v1::Span_Event* mutable_events(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Event >* + mutable_events(); + private: + const ::opentelemetry::proto::trace::v1::Span_Event& _internal_events(int index) const; + ::opentelemetry::proto::trace::v1::Span_Event* _internal_add_events(); + public: + const ::opentelemetry::proto::trace::v1::Span_Event& events(int index) const; + ::opentelemetry::proto::trace::v1::Span_Event* add_events(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Event >& + events() const; + + // repeated .opentelemetry.proto.trace.v1.Span.Link links = 13; + int links_size() const; + private: + int _internal_links_size() const; + public: + void clear_links(); + ::opentelemetry::proto::trace::v1::Span_Link* mutable_links(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Link >* + mutable_links(); + private: + const ::opentelemetry::proto::trace::v1::Span_Link& _internal_links(int index) const; + ::opentelemetry::proto::trace::v1::Span_Link* _internal_add_links(); + public: + const ::opentelemetry::proto::trace::v1::Span_Link& links(int index) const; + ::opentelemetry::proto::trace::v1::Span_Link* add_links(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Link >& + links() const; + + // bytes trace_id = 1; + void clear_trace_id(); + const std::string& trace_id() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_trace_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_trace_id(); + PROTOBUF_NODISCARD std::string* release_trace_id(); + void set_allocated_trace_id(std::string* trace_id); + private: + const std::string& _internal_trace_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_trace_id(const std::string& value); + std::string* _internal_mutable_trace_id(); + public: + + // bytes span_id = 2; + void clear_span_id(); + const std::string& span_id() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_span_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_span_id(); + PROTOBUF_NODISCARD std::string* release_span_id(); + void set_allocated_span_id(std::string* span_id); + private: + const std::string& _internal_span_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_span_id(const std::string& value); + std::string* _internal_mutable_span_id(); + public: + + // string trace_state = 3; + void clear_trace_state(); + const std::string& trace_state() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_trace_state(ArgT0&& arg0, ArgT... args); + std::string* mutable_trace_state(); + PROTOBUF_NODISCARD std::string* release_trace_state(); + void set_allocated_trace_state(std::string* trace_state); + private: + const std::string& _internal_trace_state() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_trace_state(const std::string& value); + std::string* _internal_mutable_trace_state(); + public: + + // bytes parent_span_id = 4; + void clear_parent_span_id(); + const std::string& parent_span_id() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_parent_span_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_parent_span_id(); + PROTOBUF_NODISCARD std::string* release_parent_span_id(); + void set_allocated_parent_span_id(std::string* parent_span_id); + private: + const std::string& _internal_parent_span_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_parent_span_id(const std::string& value); + std::string* _internal_mutable_parent_span_id(); + public: + + // string name = 5; + 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: + + // .opentelemetry.proto.trace.v1.Status status = 15; + bool has_status() const; + private: + bool _internal_has_status() const; + public: + void clear_status(); + const ::opentelemetry::proto::trace::v1::Status& status() const; + PROTOBUF_NODISCARD ::opentelemetry::proto::trace::v1::Status* release_status(); + ::opentelemetry::proto::trace::v1::Status* mutable_status(); + void set_allocated_status(::opentelemetry::proto::trace::v1::Status* status); + private: + const ::opentelemetry::proto::trace::v1::Status& _internal_status() const; + ::opentelemetry::proto::trace::v1::Status* _internal_mutable_status(); + public: + void unsafe_arena_set_allocated_status( + ::opentelemetry::proto::trace::v1::Status* status); + ::opentelemetry::proto::trace::v1::Status* unsafe_arena_release_status(); + + // fixed64 start_time_unix_nano = 7; + void clear_start_time_unix_nano(); + uint64_t start_time_unix_nano() const; + void set_start_time_unix_nano(uint64_t value); + private: + uint64_t _internal_start_time_unix_nano() const; + void _internal_set_start_time_unix_nano(uint64_t value); + public: + + // fixed64 end_time_unix_nano = 8; + void clear_end_time_unix_nano(); + uint64_t end_time_unix_nano() const; + void set_end_time_unix_nano(uint64_t value); + private: + uint64_t _internal_end_time_unix_nano() const; + void _internal_set_end_time_unix_nano(uint64_t value); + public: + + // .opentelemetry.proto.trace.v1.Span.SpanKind kind = 6; + void clear_kind(); + ::opentelemetry::proto::trace::v1::Span_SpanKind kind() const; + void set_kind(::opentelemetry::proto::trace::v1::Span_SpanKind value); + private: + ::opentelemetry::proto::trace::v1::Span_SpanKind _internal_kind() const; + void _internal_set_kind(::opentelemetry::proto::trace::v1::Span_SpanKind value); + public: + + // uint32 dropped_attributes_count = 10; + void clear_dropped_attributes_count(); + uint32_t dropped_attributes_count() const; + void set_dropped_attributes_count(uint32_t value); + private: + uint32_t _internal_dropped_attributes_count() const; + void _internal_set_dropped_attributes_count(uint32_t value); + public: + + // uint32 dropped_events_count = 12; + void clear_dropped_events_count(); + uint32_t dropped_events_count() const; + void set_dropped_events_count(uint32_t value); + private: + uint32_t _internal_dropped_events_count() const; + void _internal_set_dropped_events_count(uint32_t value); + public: + + // uint32 dropped_links_count = 14; + void clear_dropped_links_count(); + uint32_t dropped_links_count() const; + void set_dropped_links_count(uint32_t value); + private: + uint32_t _internal_dropped_links_count() const; + void _internal_set_dropped_links_count(uint32_t value); + public: + + // fixed32 flags = 16; + void clear_flags(); + uint32_t flags() const; + void set_flags(uint32_t value); + private: + uint32_t _internal_flags() const; + void _internal_set_flags(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.trace.v1.Span) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue > attributes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Event > events_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Link > links_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trace_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr span_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trace_state_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr parent_span_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::opentelemetry::proto::trace::v1::Status* status_; + uint64_t start_time_unix_nano_; + uint64_t end_time_unix_nano_; + int kind_; + uint32_t dropped_attributes_count_; + uint32_t dropped_events_count_; + uint32_t dropped_links_count_; + uint32_t flags_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto; +}; +// ------------------------------------------------------------------- + +class Status final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opentelemetry.proto.trace.v1.Status) */ { + public: + inline Status() : Status(nullptr) {} + ~Status() override; + explicit PROTOBUF_CONSTEXPR Status(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Status(const Status& from); + Status(Status&& from) noexcept + : Status() { + *this = ::std::move(from); + } + + inline Status& operator=(const Status& from) { + CopyFrom(from); + return *this; + } + inline Status& operator=(Status&& 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 Status& default_instance() { + return *internal_default_instance(); + } + static inline const Status* internal_default_instance() { + return reinterpret_cast<const Status*>( + &_Status_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(Status& a, Status& b) { + a.Swap(&b); + } + inline void Swap(Status* 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(Status* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<Status>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Status& from); + void MergeFrom(const Status& from); + 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; + void InternalSwap(Status* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opentelemetry.proto.trace.v1.Status"; + } + protected: + explicit Status(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef Status_StatusCode StatusCode; + static constexpr StatusCode STATUS_CODE_UNSET = + Status_StatusCode_STATUS_CODE_UNSET; + static constexpr StatusCode STATUS_CODE_OK = + Status_StatusCode_STATUS_CODE_OK; + static constexpr StatusCode STATUS_CODE_ERROR = + Status_StatusCode_STATUS_CODE_ERROR; + static inline bool StatusCode_IsValid(int value) { + return Status_StatusCode_IsValid(value); + } + static constexpr StatusCode StatusCode_MIN = + Status_StatusCode_StatusCode_MIN; + static constexpr StatusCode StatusCode_MAX = + Status_StatusCode_StatusCode_MAX; + static constexpr int StatusCode_ARRAYSIZE = + Status_StatusCode_StatusCode_ARRAYSIZE; + template<typename T> + static inline const std::string& StatusCode_Name(T enum_t_value) { + static_assert(::std::is_same<T, StatusCode>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function StatusCode_Name."); + return Status_StatusCode_Name(enum_t_value); + } + static inline bool StatusCode_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + StatusCode* value) { + return Status_StatusCode_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kMessageFieldNumber = 2, + kCodeFieldNumber = 3, + }; + // string message = 2; + void clear_message(); + const std::string& message() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_message(ArgT0&& arg0, ArgT... args); + std::string* mutable_message(); + PROTOBUF_NODISCARD std::string* release_message(); + void set_allocated_message(std::string* message); + private: + const std::string& _internal_message() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_message(const std::string& value); + std::string* _internal_mutable_message(); + public: + + // .opentelemetry.proto.trace.v1.Status.StatusCode code = 3; + void clear_code(); + ::opentelemetry::proto::trace::v1::Status_StatusCode code() const; + void set_code(::opentelemetry::proto::trace::v1::Status_StatusCode value); + private: + ::opentelemetry::proto::trace::v1::Status_StatusCode _internal_code() const; + void _internal_set_code(::opentelemetry::proto::trace::v1::Status_StatusCode value); + public: + + // @@protoc_insertion_point(class_scope:opentelemetry.proto.trace.v1.Status) + 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 message_; + int code_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TracesData + +// repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; +inline int TracesData::_internal_resource_spans_size() const { + return _impl_.resource_spans_.size(); +} +inline int TracesData::resource_spans_size() const { + return _internal_resource_spans_size(); +} +inline void TracesData::clear_resource_spans() { + _impl_.resource_spans_.Clear(); +} +inline ::opentelemetry::proto::trace::v1::ResourceSpans* TracesData::mutable_resource_spans(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.TracesData.resource_spans) + return _impl_.resource_spans_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans >* +TracesData::mutable_resource_spans() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.trace.v1.TracesData.resource_spans) + return &_impl_.resource_spans_; +} +inline const ::opentelemetry::proto::trace::v1::ResourceSpans& TracesData::_internal_resource_spans(int index) const { + return _impl_.resource_spans_.Get(index); +} +inline const ::opentelemetry::proto::trace::v1::ResourceSpans& TracesData::resource_spans(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.TracesData.resource_spans) + return _internal_resource_spans(index); +} +inline ::opentelemetry::proto::trace::v1::ResourceSpans* TracesData::_internal_add_resource_spans() { + return _impl_.resource_spans_.Add(); +} +inline ::opentelemetry::proto::trace::v1::ResourceSpans* TracesData::add_resource_spans() { + ::opentelemetry::proto::trace::v1::ResourceSpans* _add = _internal_add_resource_spans(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.trace.v1.TracesData.resource_spans) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ResourceSpans >& +TracesData::resource_spans() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.trace.v1.TracesData.resource_spans) + return _impl_.resource_spans_; +} + +// ------------------------------------------------------------------- + +// ResourceSpans + +// .opentelemetry.proto.resource.v1.Resource resource = 1; +inline bool ResourceSpans::_internal_has_resource() const { + return this != internal_default_instance() && _impl_.resource_ != nullptr; +} +inline bool ResourceSpans::has_resource() const { + return _internal_has_resource(); +} +inline const ::opentelemetry::proto::resource::v1::Resource& ResourceSpans::_internal_resource() const { + const ::opentelemetry::proto::resource::v1::Resource* p = _impl_.resource_; + return p != nullptr ? *p : reinterpret_cast<const ::opentelemetry::proto::resource::v1::Resource&>( + ::opentelemetry::proto::resource::v1::_Resource_default_instance_); +} +inline const ::opentelemetry::proto::resource::v1::Resource& ResourceSpans::resource() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.ResourceSpans.resource) + return _internal_resource(); +} +inline void ResourceSpans::unsafe_arena_set_allocated_resource( + ::opentelemetry::proto::resource::v1::Resource* resource) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.resource_); + } + _impl_.resource_ = resource; + if (resource) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opentelemetry.proto.trace.v1.ResourceSpans.resource) +} +inline ::opentelemetry::proto::resource::v1::Resource* ResourceSpans::release_resource() { + + ::opentelemetry::proto::resource::v1::Resource* temp = _impl_.resource_; + _impl_.resource_ = 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 ::opentelemetry::proto::resource::v1::Resource* ResourceSpans::unsafe_arena_release_resource() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.ResourceSpans.resource) + + ::opentelemetry::proto::resource::v1::Resource* temp = _impl_.resource_; + _impl_.resource_ = nullptr; + return temp; +} +inline ::opentelemetry::proto::resource::v1::Resource* ResourceSpans::_internal_mutable_resource() { + + if (_impl_.resource_ == nullptr) { + auto* p = CreateMaybeMessage<::opentelemetry::proto::resource::v1::Resource>(GetArenaForAllocation()); + _impl_.resource_ = p; + } + return _impl_.resource_; +} +inline ::opentelemetry::proto::resource::v1::Resource* ResourceSpans::mutable_resource() { + ::opentelemetry::proto::resource::v1::Resource* _msg = _internal_mutable_resource(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.ResourceSpans.resource) + return _msg; +} +inline void ResourceSpans::set_allocated_resource(::opentelemetry::proto::resource::v1::Resource* resource) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.resource_); + } + if (resource) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(resource)); + if (message_arena != submessage_arena) { + resource = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, resource, submessage_arena); + } + + } else { + + } + _impl_.resource_ = resource; + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.ResourceSpans.resource) +} + +// repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; +inline int ResourceSpans::_internal_scope_spans_size() const { + return _impl_.scope_spans_.size(); +} +inline int ResourceSpans::scope_spans_size() const { + return _internal_scope_spans_size(); +} +inline void ResourceSpans::clear_scope_spans() { + _impl_.scope_spans_.Clear(); +} +inline ::opentelemetry::proto::trace::v1::ScopeSpans* ResourceSpans::mutable_scope_spans(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.ResourceSpans.scope_spans) + return _impl_.scope_spans_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ScopeSpans >* +ResourceSpans::mutable_scope_spans() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.trace.v1.ResourceSpans.scope_spans) + return &_impl_.scope_spans_; +} +inline const ::opentelemetry::proto::trace::v1::ScopeSpans& ResourceSpans::_internal_scope_spans(int index) const { + return _impl_.scope_spans_.Get(index); +} +inline const ::opentelemetry::proto::trace::v1::ScopeSpans& ResourceSpans::scope_spans(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.ResourceSpans.scope_spans) + return _internal_scope_spans(index); +} +inline ::opentelemetry::proto::trace::v1::ScopeSpans* ResourceSpans::_internal_add_scope_spans() { + return _impl_.scope_spans_.Add(); +} +inline ::opentelemetry::proto::trace::v1::ScopeSpans* ResourceSpans::add_scope_spans() { + ::opentelemetry::proto::trace::v1::ScopeSpans* _add = _internal_add_scope_spans(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.trace.v1.ResourceSpans.scope_spans) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::ScopeSpans >& +ResourceSpans::scope_spans() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.trace.v1.ResourceSpans.scope_spans) + return _impl_.scope_spans_; +} + +// string schema_url = 3; +inline void ResourceSpans::clear_schema_url() { + _impl_.schema_url_.ClearToEmpty(); +} +inline const std::string& ResourceSpans::schema_url() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.ResourceSpans.schema_url) + return _internal_schema_url(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ResourceSpans::set_schema_url(ArgT0&& arg0, ArgT... args) { + + _impl_.schema_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.ResourceSpans.schema_url) +} +inline std::string* ResourceSpans::mutable_schema_url() { + std::string* _s = _internal_mutable_schema_url(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.ResourceSpans.schema_url) + return _s; +} +inline const std::string& ResourceSpans::_internal_schema_url() const { + return _impl_.schema_url_.Get(); +} +inline void ResourceSpans::_internal_set_schema_url(const std::string& value) { + + _impl_.schema_url_.Set(value, GetArenaForAllocation()); +} +inline std::string* ResourceSpans::_internal_mutable_schema_url() { + + return _impl_.schema_url_.Mutable(GetArenaForAllocation()); +} +inline std::string* ResourceSpans::release_schema_url() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.ResourceSpans.schema_url) + return _impl_.schema_url_.Release(); +} +inline void ResourceSpans::set_allocated_schema_url(std::string* schema_url) { + if (schema_url != nullptr) { + + } else { + + } + _impl_.schema_url_.SetAllocated(schema_url, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.schema_url_.IsDefault()) { + _impl_.schema_url_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.ResourceSpans.schema_url) +} + +// ------------------------------------------------------------------- + +// ScopeSpans + +// .opentelemetry.proto.common.v1.InstrumentationScope scope = 1; +inline bool ScopeSpans::_internal_has_scope() const { + return this != internal_default_instance() && _impl_.scope_ != nullptr; +} +inline bool ScopeSpans::has_scope() const { + return _internal_has_scope(); +} +inline const ::opentelemetry::proto::common::v1::InstrumentationScope& ScopeSpans::_internal_scope() const { + const ::opentelemetry::proto::common::v1::InstrumentationScope* p = _impl_.scope_; + return p != nullptr ? *p : reinterpret_cast<const ::opentelemetry::proto::common::v1::InstrumentationScope&>( + ::opentelemetry::proto::common::v1::_InstrumentationScope_default_instance_); +} +inline const ::opentelemetry::proto::common::v1::InstrumentationScope& ScopeSpans::scope() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.ScopeSpans.scope) + return _internal_scope(); +} +inline void ScopeSpans::unsafe_arena_set_allocated_scope( + ::opentelemetry::proto::common::v1::InstrumentationScope* scope) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.scope_); + } + _impl_.scope_ = scope; + if (scope) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opentelemetry.proto.trace.v1.ScopeSpans.scope) +} +inline ::opentelemetry::proto::common::v1::InstrumentationScope* ScopeSpans::release_scope() { + + ::opentelemetry::proto::common::v1::InstrumentationScope* temp = _impl_.scope_; + _impl_.scope_ = 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 ::opentelemetry::proto::common::v1::InstrumentationScope* ScopeSpans::unsafe_arena_release_scope() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.ScopeSpans.scope) + + ::opentelemetry::proto::common::v1::InstrumentationScope* temp = _impl_.scope_; + _impl_.scope_ = nullptr; + return temp; +} +inline ::opentelemetry::proto::common::v1::InstrumentationScope* ScopeSpans::_internal_mutable_scope() { + + if (_impl_.scope_ == nullptr) { + auto* p = CreateMaybeMessage<::opentelemetry::proto::common::v1::InstrumentationScope>(GetArenaForAllocation()); + _impl_.scope_ = p; + } + return _impl_.scope_; +} +inline ::opentelemetry::proto::common::v1::InstrumentationScope* ScopeSpans::mutable_scope() { + ::opentelemetry::proto::common::v1::InstrumentationScope* _msg = _internal_mutable_scope(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.ScopeSpans.scope) + return _msg; +} +inline void ScopeSpans::set_allocated_scope(::opentelemetry::proto::common::v1::InstrumentationScope* scope) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.scope_); + } + if (scope) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(scope)); + if (message_arena != submessage_arena) { + scope = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, scope, submessage_arena); + } + + } else { + + } + _impl_.scope_ = scope; + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.ScopeSpans.scope) +} + +// repeated .opentelemetry.proto.trace.v1.Span spans = 2; +inline int ScopeSpans::_internal_spans_size() const { + return _impl_.spans_.size(); +} +inline int ScopeSpans::spans_size() const { + return _internal_spans_size(); +} +inline void ScopeSpans::clear_spans() { + _impl_.spans_.Clear(); +} +inline ::opentelemetry::proto::trace::v1::Span* ScopeSpans::mutable_spans(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.ScopeSpans.spans) + return _impl_.spans_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span >* +ScopeSpans::mutable_spans() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.trace.v1.ScopeSpans.spans) + return &_impl_.spans_; +} +inline const ::opentelemetry::proto::trace::v1::Span& ScopeSpans::_internal_spans(int index) const { + return _impl_.spans_.Get(index); +} +inline const ::opentelemetry::proto::trace::v1::Span& ScopeSpans::spans(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.ScopeSpans.spans) + return _internal_spans(index); +} +inline ::opentelemetry::proto::trace::v1::Span* ScopeSpans::_internal_add_spans() { + return _impl_.spans_.Add(); +} +inline ::opentelemetry::proto::trace::v1::Span* ScopeSpans::add_spans() { + ::opentelemetry::proto::trace::v1::Span* _add = _internal_add_spans(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.trace.v1.ScopeSpans.spans) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span >& +ScopeSpans::spans() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.trace.v1.ScopeSpans.spans) + return _impl_.spans_; +} + +// string schema_url = 3; +inline void ScopeSpans::clear_schema_url() { + _impl_.schema_url_.ClearToEmpty(); +} +inline const std::string& ScopeSpans::schema_url() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.ScopeSpans.schema_url) + return _internal_schema_url(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ScopeSpans::set_schema_url(ArgT0&& arg0, ArgT... args) { + + _impl_.schema_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.ScopeSpans.schema_url) +} +inline std::string* ScopeSpans::mutable_schema_url() { + std::string* _s = _internal_mutable_schema_url(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.ScopeSpans.schema_url) + return _s; +} +inline const std::string& ScopeSpans::_internal_schema_url() const { + return _impl_.schema_url_.Get(); +} +inline void ScopeSpans::_internal_set_schema_url(const std::string& value) { + + _impl_.schema_url_.Set(value, GetArenaForAllocation()); +} +inline std::string* ScopeSpans::_internal_mutable_schema_url() { + + return _impl_.schema_url_.Mutable(GetArenaForAllocation()); +} +inline std::string* ScopeSpans::release_schema_url() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.ScopeSpans.schema_url) + return _impl_.schema_url_.Release(); +} +inline void ScopeSpans::set_allocated_schema_url(std::string* schema_url) { + if (schema_url != nullptr) { + + } else { + + } + _impl_.schema_url_.SetAllocated(schema_url, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.schema_url_.IsDefault()) { + _impl_.schema_url_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.ScopeSpans.schema_url) +} + +// ------------------------------------------------------------------- + +// Span_Event + +// fixed64 time_unix_nano = 1; +inline void Span_Event::clear_time_unix_nano() { + _impl_.time_unix_nano_ = uint64_t{0u}; +} +inline uint64_t Span_Event::_internal_time_unix_nano() const { + return _impl_.time_unix_nano_; +} +inline uint64_t Span_Event::time_unix_nano() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Event.time_unix_nano) + return _internal_time_unix_nano(); +} +inline void Span_Event::_internal_set_time_unix_nano(uint64_t value) { + + _impl_.time_unix_nano_ = value; +} +inline void Span_Event::set_time_unix_nano(uint64_t value) { + _internal_set_time_unix_nano(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.Event.time_unix_nano) +} + +// string name = 2; +inline void Span_Event::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& Span_Event::name() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Event.name) + return _internal_name(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Span_Event::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.Event.name) +} +inline std::string* Span_Event::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.Event.name) + return _s; +} +inline const std::string& Span_Event::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Span_Event::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Span_Event::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Span_Event::release_name() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.Event.name) + return _impl_.name_.Release(); +} +inline void Span_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:opentelemetry.proto.trace.v1.Span.Event.name) +} + +// repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3; +inline int Span_Event::_internal_attributes_size() const { + return _impl_.attributes_.size(); +} +inline int Span_Event::attributes_size() const { + return _internal_attributes_size(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Span_Event::mutable_attributes(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.Event.attributes) + return _impl_.attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* +Span_Event::mutable_attributes() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.trace.v1.Span.Event.attributes) + return &_impl_.attributes_; +} +inline const ::opentelemetry::proto::common::v1::KeyValue& Span_Event::_internal_attributes(int index) const { + return _impl_.attributes_.Get(index); +} +inline const ::opentelemetry::proto::common::v1::KeyValue& Span_Event::attributes(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Event.attributes) + return _internal_attributes(index); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Span_Event::_internal_add_attributes() { + return _impl_.attributes_.Add(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Span_Event::add_attributes() { + ::opentelemetry::proto::common::v1::KeyValue* _add = _internal_add_attributes(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.trace.v1.Span.Event.attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& +Span_Event::attributes() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.trace.v1.Span.Event.attributes) + return _impl_.attributes_; +} + +// uint32 dropped_attributes_count = 4; +inline void Span_Event::clear_dropped_attributes_count() { + _impl_.dropped_attributes_count_ = 0u; +} +inline uint32_t Span_Event::_internal_dropped_attributes_count() const { + return _impl_.dropped_attributes_count_; +} +inline uint32_t Span_Event::dropped_attributes_count() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Event.dropped_attributes_count) + return _internal_dropped_attributes_count(); +} +inline void Span_Event::_internal_set_dropped_attributes_count(uint32_t value) { + + _impl_.dropped_attributes_count_ = value; +} +inline void Span_Event::set_dropped_attributes_count(uint32_t value) { + _internal_set_dropped_attributes_count(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.Event.dropped_attributes_count) +} + +// ------------------------------------------------------------------- + +// Span_Link + +// bytes trace_id = 1; +inline void Span_Link::clear_trace_id() { + _impl_.trace_id_.ClearToEmpty(); +} +inline const std::string& Span_Link::trace_id() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Link.trace_id) + return _internal_trace_id(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Span_Link::set_trace_id(ArgT0&& arg0, ArgT... args) { + + _impl_.trace_id_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.Link.trace_id) +} +inline std::string* Span_Link::mutable_trace_id() { + std::string* _s = _internal_mutable_trace_id(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.Link.trace_id) + return _s; +} +inline const std::string& Span_Link::_internal_trace_id() const { + return _impl_.trace_id_.Get(); +} +inline void Span_Link::_internal_set_trace_id(const std::string& value) { + + _impl_.trace_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* Span_Link::_internal_mutable_trace_id() { + + return _impl_.trace_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* Span_Link::release_trace_id() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.Link.trace_id) + return _impl_.trace_id_.Release(); +} +inline void Span_Link::set_allocated_trace_id(std::string* trace_id) { + if (trace_id != nullptr) { + + } else { + + } + _impl_.trace_id_.SetAllocated(trace_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.trace_id_.IsDefault()) { + _impl_.trace_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.Span.Link.trace_id) +} + +// bytes span_id = 2; +inline void Span_Link::clear_span_id() { + _impl_.span_id_.ClearToEmpty(); +} +inline const std::string& Span_Link::span_id() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Link.span_id) + return _internal_span_id(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Span_Link::set_span_id(ArgT0&& arg0, ArgT... args) { + + _impl_.span_id_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.Link.span_id) +} +inline std::string* Span_Link::mutable_span_id() { + std::string* _s = _internal_mutable_span_id(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.Link.span_id) + return _s; +} +inline const std::string& Span_Link::_internal_span_id() const { + return _impl_.span_id_.Get(); +} +inline void Span_Link::_internal_set_span_id(const std::string& value) { + + _impl_.span_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* Span_Link::_internal_mutable_span_id() { + + return _impl_.span_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* Span_Link::release_span_id() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.Link.span_id) + return _impl_.span_id_.Release(); +} +inline void Span_Link::set_allocated_span_id(std::string* span_id) { + if (span_id != nullptr) { + + } else { + + } + _impl_.span_id_.SetAllocated(span_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.span_id_.IsDefault()) { + _impl_.span_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.Span.Link.span_id) +} + +// string trace_state = 3; +inline void Span_Link::clear_trace_state() { + _impl_.trace_state_.ClearToEmpty(); +} +inline const std::string& Span_Link::trace_state() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Link.trace_state) + return _internal_trace_state(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Span_Link::set_trace_state(ArgT0&& arg0, ArgT... args) { + + _impl_.trace_state_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.Link.trace_state) +} +inline std::string* Span_Link::mutable_trace_state() { + std::string* _s = _internal_mutable_trace_state(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.Link.trace_state) + return _s; +} +inline const std::string& Span_Link::_internal_trace_state() const { + return _impl_.trace_state_.Get(); +} +inline void Span_Link::_internal_set_trace_state(const std::string& value) { + + _impl_.trace_state_.Set(value, GetArenaForAllocation()); +} +inline std::string* Span_Link::_internal_mutable_trace_state() { + + return _impl_.trace_state_.Mutable(GetArenaForAllocation()); +} +inline std::string* Span_Link::release_trace_state() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.Link.trace_state) + return _impl_.trace_state_.Release(); +} +inline void Span_Link::set_allocated_trace_state(std::string* trace_state) { + if (trace_state != nullptr) { + + } else { + + } + _impl_.trace_state_.SetAllocated(trace_state, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.trace_state_.IsDefault()) { + _impl_.trace_state_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.Span.Link.trace_state) +} + +// repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4; +inline int Span_Link::_internal_attributes_size() const { + return _impl_.attributes_.size(); +} +inline int Span_Link::attributes_size() const { + return _internal_attributes_size(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Span_Link::mutable_attributes(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.Link.attributes) + return _impl_.attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* +Span_Link::mutable_attributes() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.trace.v1.Span.Link.attributes) + return &_impl_.attributes_; +} +inline const ::opentelemetry::proto::common::v1::KeyValue& Span_Link::_internal_attributes(int index) const { + return _impl_.attributes_.Get(index); +} +inline const ::opentelemetry::proto::common::v1::KeyValue& Span_Link::attributes(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Link.attributes) + return _internal_attributes(index); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Span_Link::_internal_add_attributes() { + return _impl_.attributes_.Add(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Span_Link::add_attributes() { + ::opentelemetry::proto::common::v1::KeyValue* _add = _internal_add_attributes(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.trace.v1.Span.Link.attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& +Span_Link::attributes() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.trace.v1.Span.Link.attributes) + return _impl_.attributes_; +} + +// uint32 dropped_attributes_count = 5; +inline void Span_Link::clear_dropped_attributes_count() { + _impl_.dropped_attributes_count_ = 0u; +} +inline uint32_t Span_Link::_internal_dropped_attributes_count() const { + return _impl_.dropped_attributes_count_; +} +inline uint32_t Span_Link::dropped_attributes_count() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Link.dropped_attributes_count) + return _internal_dropped_attributes_count(); +} +inline void Span_Link::_internal_set_dropped_attributes_count(uint32_t value) { + + _impl_.dropped_attributes_count_ = value; +} +inline void Span_Link::set_dropped_attributes_count(uint32_t value) { + _internal_set_dropped_attributes_count(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.Link.dropped_attributes_count) +} + +// fixed32 flags = 6; +inline void Span_Link::clear_flags() { + _impl_.flags_ = 0u; +} +inline uint32_t Span_Link::_internal_flags() const { + return _impl_.flags_; +} +inline uint32_t Span_Link::flags() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.Link.flags) + return _internal_flags(); +} +inline void Span_Link::_internal_set_flags(uint32_t value) { + + _impl_.flags_ = value; +} +inline void Span_Link::set_flags(uint32_t value) { + _internal_set_flags(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.Link.flags) +} + +// ------------------------------------------------------------------- + +// Span + +// bytes trace_id = 1; +inline void Span::clear_trace_id() { + _impl_.trace_id_.ClearToEmpty(); +} +inline const std::string& Span::trace_id() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.trace_id) + return _internal_trace_id(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Span::set_trace_id(ArgT0&& arg0, ArgT... args) { + + _impl_.trace_id_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.trace_id) +} +inline std::string* Span::mutable_trace_id() { + std::string* _s = _internal_mutable_trace_id(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.trace_id) + return _s; +} +inline const std::string& Span::_internal_trace_id() const { + return _impl_.trace_id_.Get(); +} +inline void Span::_internal_set_trace_id(const std::string& value) { + + _impl_.trace_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* Span::_internal_mutable_trace_id() { + + return _impl_.trace_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* Span::release_trace_id() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.trace_id) + return _impl_.trace_id_.Release(); +} +inline void Span::set_allocated_trace_id(std::string* trace_id) { + if (trace_id != nullptr) { + + } else { + + } + _impl_.trace_id_.SetAllocated(trace_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.trace_id_.IsDefault()) { + _impl_.trace_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.Span.trace_id) +} + +// bytes span_id = 2; +inline void Span::clear_span_id() { + _impl_.span_id_.ClearToEmpty(); +} +inline const std::string& Span::span_id() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.span_id) + return _internal_span_id(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Span::set_span_id(ArgT0&& arg0, ArgT... args) { + + _impl_.span_id_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.span_id) +} +inline std::string* Span::mutable_span_id() { + std::string* _s = _internal_mutable_span_id(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.span_id) + return _s; +} +inline const std::string& Span::_internal_span_id() const { + return _impl_.span_id_.Get(); +} +inline void Span::_internal_set_span_id(const std::string& value) { + + _impl_.span_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* Span::_internal_mutable_span_id() { + + return _impl_.span_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* Span::release_span_id() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.span_id) + return _impl_.span_id_.Release(); +} +inline void Span::set_allocated_span_id(std::string* span_id) { + if (span_id != nullptr) { + + } else { + + } + _impl_.span_id_.SetAllocated(span_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.span_id_.IsDefault()) { + _impl_.span_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.Span.span_id) +} + +// string trace_state = 3; +inline void Span::clear_trace_state() { + _impl_.trace_state_.ClearToEmpty(); +} +inline const std::string& Span::trace_state() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.trace_state) + return _internal_trace_state(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Span::set_trace_state(ArgT0&& arg0, ArgT... args) { + + _impl_.trace_state_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.trace_state) +} +inline std::string* Span::mutable_trace_state() { + std::string* _s = _internal_mutable_trace_state(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.trace_state) + return _s; +} +inline const std::string& Span::_internal_trace_state() const { + return _impl_.trace_state_.Get(); +} +inline void Span::_internal_set_trace_state(const std::string& value) { + + _impl_.trace_state_.Set(value, GetArenaForAllocation()); +} +inline std::string* Span::_internal_mutable_trace_state() { + + return _impl_.trace_state_.Mutable(GetArenaForAllocation()); +} +inline std::string* Span::release_trace_state() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.trace_state) + return _impl_.trace_state_.Release(); +} +inline void Span::set_allocated_trace_state(std::string* trace_state) { + if (trace_state != nullptr) { + + } else { + + } + _impl_.trace_state_.SetAllocated(trace_state, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.trace_state_.IsDefault()) { + _impl_.trace_state_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.Span.trace_state) +} + +// bytes parent_span_id = 4; +inline void Span::clear_parent_span_id() { + _impl_.parent_span_id_.ClearToEmpty(); +} +inline const std::string& Span::parent_span_id() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.parent_span_id) + return _internal_parent_span_id(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Span::set_parent_span_id(ArgT0&& arg0, ArgT... args) { + + _impl_.parent_span_id_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.parent_span_id) +} +inline std::string* Span::mutable_parent_span_id() { + std::string* _s = _internal_mutable_parent_span_id(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.parent_span_id) + return _s; +} +inline const std::string& Span::_internal_parent_span_id() const { + return _impl_.parent_span_id_.Get(); +} +inline void Span::_internal_set_parent_span_id(const std::string& value) { + + _impl_.parent_span_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* Span::_internal_mutable_parent_span_id() { + + return _impl_.parent_span_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* Span::release_parent_span_id() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.parent_span_id) + return _impl_.parent_span_id_.Release(); +} +inline void Span::set_allocated_parent_span_id(std::string* parent_span_id) { + if (parent_span_id != nullptr) { + + } else { + + } + _impl_.parent_span_id_.SetAllocated(parent_span_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.parent_span_id_.IsDefault()) { + _impl_.parent_span_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.Span.parent_span_id) +} + +// fixed32 flags = 16; +inline void Span::clear_flags() { + _impl_.flags_ = 0u; +} +inline uint32_t Span::_internal_flags() const { + return _impl_.flags_; +} +inline uint32_t Span::flags() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.flags) + return _internal_flags(); +} +inline void Span::_internal_set_flags(uint32_t value) { + + _impl_.flags_ = value; +} +inline void Span::set_flags(uint32_t value) { + _internal_set_flags(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.flags) +} + +// string name = 5; +inline void Span::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& Span::name() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.name) + return _internal_name(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Span::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.name) +} +inline std::string* Span::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.name) + return _s; +} +inline const std::string& Span::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Span::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Span::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Span::release_name() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.name) + return _impl_.name_.Release(); +} +inline void Span::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:opentelemetry.proto.trace.v1.Span.name) +} + +// .opentelemetry.proto.trace.v1.Span.SpanKind kind = 6; +inline void Span::clear_kind() { + _impl_.kind_ = 0; +} +inline ::opentelemetry::proto::trace::v1::Span_SpanKind Span::_internal_kind() const { + return static_cast< ::opentelemetry::proto::trace::v1::Span_SpanKind >(_impl_.kind_); +} +inline ::opentelemetry::proto::trace::v1::Span_SpanKind Span::kind() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.kind) + return _internal_kind(); +} +inline void Span::_internal_set_kind(::opentelemetry::proto::trace::v1::Span_SpanKind value) { + + _impl_.kind_ = value; +} +inline void Span::set_kind(::opentelemetry::proto::trace::v1::Span_SpanKind value) { + _internal_set_kind(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.kind) +} + +// fixed64 start_time_unix_nano = 7; +inline void Span::clear_start_time_unix_nano() { + _impl_.start_time_unix_nano_ = uint64_t{0u}; +} +inline uint64_t Span::_internal_start_time_unix_nano() const { + return _impl_.start_time_unix_nano_; +} +inline uint64_t Span::start_time_unix_nano() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.start_time_unix_nano) + return _internal_start_time_unix_nano(); +} +inline void Span::_internal_set_start_time_unix_nano(uint64_t value) { + + _impl_.start_time_unix_nano_ = value; +} +inline void Span::set_start_time_unix_nano(uint64_t value) { + _internal_set_start_time_unix_nano(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.start_time_unix_nano) +} + +// fixed64 end_time_unix_nano = 8; +inline void Span::clear_end_time_unix_nano() { + _impl_.end_time_unix_nano_ = uint64_t{0u}; +} +inline uint64_t Span::_internal_end_time_unix_nano() const { + return _impl_.end_time_unix_nano_; +} +inline uint64_t Span::end_time_unix_nano() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.end_time_unix_nano) + return _internal_end_time_unix_nano(); +} +inline void Span::_internal_set_end_time_unix_nano(uint64_t value) { + + _impl_.end_time_unix_nano_ = value; +} +inline void Span::set_end_time_unix_nano(uint64_t value) { + _internal_set_end_time_unix_nano(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.end_time_unix_nano) +} + +// repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9; +inline int Span::_internal_attributes_size() const { + return _impl_.attributes_.size(); +} +inline int Span::attributes_size() const { + return _internal_attributes_size(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Span::mutable_attributes(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.attributes) + return _impl_.attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >* +Span::mutable_attributes() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.trace.v1.Span.attributes) + return &_impl_.attributes_; +} +inline const ::opentelemetry::proto::common::v1::KeyValue& Span::_internal_attributes(int index) const { + return _impl_.attributes_.Get(index); +} +inline const ::opentelemetry::proto::common::v1::KeyValue& Span::attributes(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.attributes) + return _internal_attributes(index); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Span::_internal_add_attributes() { + return _impl_.attributes_.Add(); +} +inline ::opentelemetry::proto::common::v1::KeyValue* Span::add_attributes() { + ::opentelemetry::proto::common::v1::KeyValue* _add = _internal_add_attributes(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.trace.v1.Span.attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::common::v1::KeyValue >& +Span::attributes() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.trace.v1.Span.attributes) + return _impl_.attributes_; +} + +// uint32 dropped_attributes_count = 10; +inline void Span::clear_dropped_attributes_count() { + _impl_.dropped_attributes_count_ = 0u; +} +inline uint32_t Span::_internal_dropped_attributes_count() const { + return _impl_.dropped_attributes_count_; +} +inline uint32_t Span::dropped_attributes_count() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.dropped_attributes_count) + return _internal_dropped_attributes_count(); +} +inline void Span::_internal_set_dropped_attributes_count(uint32_t value) { + + _impl_.dropped_attributes_count_ = value; +} +inline void Span::set_dropped_attributes_count(uint32_t value) { + _internal_set_dropped_attributes_count(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.dropped_attributes_count) +} + +// repeated .opentelemetry.proto.trace.v1.Span.Event events = 11; +inline int Span::_internal_events_size() const { + return _impl_.events_.size(); +} +inline int Span::events_size() const { + return _internal_events_size(); +} +inline void Span::clear_events() { + _impl_.events_.Clear(); +} +inline ::opentelemetry::proto::trace::v1::Span_Event* Span::mutable_events(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.events) + return _impl_.events_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Event >* +Span::mutable_events() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.trace.v1.Span.events) + return &_impl_.events_; +} +inline const ::opentelemetry::proto::trace::v1::Span_Event& Span::_internal_events(int index) const { + return _impl_.events_.Get(index); +} +inline const ::opentelemetry::proto::trace::v1::Span_Event& Span::events(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.events) + return _internal_events(index); +} +inline ::opentelemetry::proto::trace::v1::Span_Event* Span::_internal_add_events() { + return _impl_.events_.Add(); +} +inline ::opentelemetry::proto::trace::v1::Span_Event* Span::add_events() { + ::opentelemetry::proto::trace::v1::Span_Event* _add = _internal_add_events(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.trace.v1.Span.events) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Event >& +Span::events() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.trace.v1.Span.events) + return _impl_.events_; +} + +// uint32 dropped_events_count = 12; +inline void Span::clear_dropped_events_count() { + _impl_.dropped_events_count_ = 0u; +} +inline uint32_t Span::_internal_dropped_events_count() const { + return _impl_.dropped_events_count_; +} +inline uint32_t Span::dropped_events_count() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.dropped_events_count) + return _internal_dropped_events_count(); +} +inline void Span::_internal_set_dropped_events_count(uint32_t value) { + + _impl_.dropped_events_count_ = value; +} +inline void Span::set_dropped_events_count(uint32_t value) { + _internal_set_dropped_events_count(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.dropped_events_count) +} + +// repeated .opentelemetry.proto.trace.v1.Span.Link links = 13; +inline int Span::_internal_links_size() const { + return _impl_.links_.size(); +} +inline int Span::links_size() const { + return _internal_links_size(); +} +inline void Span::clear_links() { + _impl_.links_.Clear(); +} +inline ::opentelemetry::proto::trace::v1::Span_Link* Span::mutable_links(int index) { + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.links) + return _impl_.links_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Link >* +Span::mutable_links() { + // @@protoc_insertion_point(field_mutable_list:opentelemetry.proto.trace.v1.Span.links) + return &_impl_.links_; +} +inline const ::opentelemetry::proto::trace::v1::Span_Link& Span::_internal_links(int index) const { + return _impl_.links_.Get(index); +} +inline const ::opentelemetry::proto::trace::v1::Span_Link& Span::links(int index) const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.links) + return _internal_links(index); +} +inline ::opentelemetry::proto::trace::v1::Span_Link* Span::_internal_add_links() { + return _impl_.links_.Add(); +} +inline ::opentelemetry::proto::trace::v1::Span_Link* Span::add_links() { + ::opentelemetry::proto::trace::v1::Span_Link* _add = _internal_add_links(); + // @@protoc_insertion_point(field_add:opentelemetry.proto.trace.v1.Span.links) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opentelemetry::proto::trace::v1::Span_Link >& +Span::links() const { + // @@protoc_insertion_point(field_list:opentelemetry.proto.trace.v1.Span.links) + return _impl_.links_; +} + +// uint32 dropped_links_count = 14; +inline void Span::clear_dropped_links_count() { + _impl_.dropped_links_count_ = 0u; +} +inline uint32_t Span::_internal_dropped_links_count() const { + return _impl_.dropped_links_count_; +} +inline uint32_t Span::dropped_links_count() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.dropped_links_count) + return _internal_dropped_links_count(); +} +inline void Span::_internal_set_dropped_links_count(uint32_t value) { + + _impl_.dropped_links_count_ = value; +} +inline void Span::set_dropped_links_count(uint32_t value) { + _internal_set_dropped_links_count(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Span.dropped_links_count) +} + +// .opentelemetry.proto.trace.v1.Status status = 15; +inline bool Span::_internal_has_status() const { + return this != internal_default_instance() && _impl_.status_ != nullptr; +} +inline bool Span::has_status() const { + return _internal_has_status(); +} +inline void Span::clear_status() { + if (GetArenaForAllocation() == nullptr && _impl_.status_ != nullptr) { + delete _impl_.status_; + } + _impl_.status_ = nullptr; +} +inline const ::opentelemetry::proto::trace::v1::Status& Span::_internal_status() const { + const ::opentelemetry::proto::trace::v1::Status* p = _impl_.status_; + return p != nullptr ? *p : reinterpret_cast<const ::opentelemetry::proto::trace::v1::Status&>( + ::opentelemetry::proto::trace::v1::_Status_default_instance_); +} +inline const ::opentelemetry::proto::trace::v1::Status& Span::status() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Span.status) + return _internal_status(); +} +inline void Span::unsafe_arena_set_allocated_status( + ::opentelemetry::proto::trace::v1::Status* status) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.status_); + } + _impl_.status_ = status; + if (status) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opentelemetry.proto.trace.v1.Span.status) +} +inline ::opentelemetry::proto::trace::v1::Status* Span::release_status() { + + ::opentelemetry::proto::trace::v1::Status* temp = _impl_.status_; + _impl_.status_ = 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 ::opentelemetry::proto::trace::v1::Status* Span::unsafe_arena_release_status() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Span.status) + + ::opentelemetry::proto::trace::v1::Status* temp = _impl_.status_; + _impl_.status_ = nullptr; + return temp; +} +inline ::opentelemetry::proto::trace::v1::Status* Span::_internal_mutable_status() { + + if (_impl_.status_ == nullptr) { + auto* p = CreateMaybeMessage<::opentelemetry::proto::trace::v1::Status>(GetArenaForAllocation()); + _impl_.status_ = p; + } + return _impl_.status_; +} +inline ::opentelemetry::proto::trace::v1::Status* Span::mutable_status() { + ::opentelemetry::proto::trace::v1::Status* _msg = _internal_mutable_status(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Span.status) + return _msg; +} +inline void Span::set_allocated_status(::opentelemetry::proto::trace::v1::Status* status) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.status_; + } + if (status) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(status); + if (message_arena != submessage_arena) { + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + _impl_.status_ = status; + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.Span.status) +} + +// ------------------------------------------------------------------- + +// Status + +// string message = 2; +inline void Status::clear_message() { + _impl_.message_.ClearToEmpty(); +} +inline const std::string& Status::message() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Status.message) + return _internal_message(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Status::set_message(ArgT0&& arg0, ArgT... args) { + + _impl_.message_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Status.message) +} +inline std::string* Status::mutable_message() { + std::string* _s = _internal_mutable_message(); + // @@protoc_insertion_point(field_mutable:opentelemetry.proto.trace.v1.Status.message) + return _s; +} +inline const std::string& Status::_internal_message() const { + return _impl_.message_.Get(); +} +inline void Status::_internal_set_message(const std::string& value) { + + _impl_.message_.Set(value, GetArenaForAllocation()); +} +inline std::string* Status::_internal_mutable_message() { + + return _impl_.message_.Mutable(GetArenaForAllocation()); +} +inline std::string* Status::release_message() { + // @@protoc_insertion_point(field_release:opentelemetry.proto.trace.v1.Status.message) + return _impl_.message_.Release(); +} +inline void Status::set_allocated_message(std::string* message) { + if (message != nullptr) { + + } else { + + } + _impl_.message_.SetAllocated(message, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.message_.IsDefault()) { + _impl_.message_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opentelemetry.proto.trace.v1.Status.message) +} + +// .opentelemetry.proto.trace.v1.Status.StatusCode code = 3; +inline void Status::clear_code() { + _impl_.code_ = 0; +} +inline ::opentelemetry::proto::trace::v1::Status_StatusCode Status::_internal_code() const { + return static_cast< ::opentelemetry::proto::trace::v1::Status_StatusCode >(_impl_.code_); +} +inline ::opentelemetry::proto::trace::v1::Status_StatusCode Status::code() const { + // @@protoc_insertion_point(field_get:opentelemetry.proto.trace.v1.Status.code) + return _internal_code(); +} +inline void Status::_internal_set_code(::opentelemetry::proto::trace::v1::Status_StatusCode value) { + + _impl_.code_ = value; +} +inline void Status::set_code(::opentelemetry::proto::trace::v1::Status_StatusCode value) { + _internal_set_code(value); + // @@protoc_insertion_point(field_set:opentelemetry.proto.trace.v1.Status.code) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1 +} // namespace trace +} // namespace proto +} // namespace opentelemetry + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::opentelemetry::proto::trace::v1::Span_SpanKind> : ::std::true_type {}; +template <> struct is_proto_enum< ::opentelemetry::proto::trace::v1::Status_StatusCode> : ::std::true_type {}; +template <> struct is_proto_enum< ::opentelemetry::proto::trace::v1::SpanFlags> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_opentelemetry_2fproto_2ftrace_2fv1_2ftrace_2eproto diff --git a/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto b/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto @@ -14,6 +14,8 @@ syntax = "proto3"; +option optimize_for = LITE_RUNTIME; + package opentelemetry.proto.trace.v1; import "opentelemetry/proto/common/v1/common.proto";