diff --git a/cmd/pdatagen/internal/base_fields.go b/cmd/pdatagen/internal/base_fields.go index 32b9d05bd52..f77a18a46b3 100644 --- a/cmd/pdatagen/internal/base_fields.go +++ b/cmd/pdatagen/internal/base_fields.go @@ -20,8 +20,6 @@ import ( ) const accessorSliceTemplate = `// ${fieldName} returns the ${originFieldName} associated with this ${structName}. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ${structName}) ${fieldName}() ${returnType} { return new${returnType}(&(*ms.orig).${originFieldName}) }` @@ -35,8 +33,6 @@ const accessorsSliceTestTemplate = `func Test${structName}_${fieldName}(t *testi }` const accessorsMessageValueTemplate = `// ${fieldName} returns the ${lowerFieldName} associated with this ${structName}. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ${structName}) ${fieldName}() ${returnType} { return new${returnType}(&(*ms.orig).${originFieldName}) }` @@ -48,15 +44,11 @@ const accessorsMessageValueTestTemplate = `func Test${structName}_${fieldName}(t }` const accessorsPrimitiveTemplate = `// ${fieldName} returns the ${lowerFieldName} associated with this ${structName}. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ${structName}) ${fieldName}() ${returnType} { return (*ms.orig).${originFieldName} } // Set${fieldName} replaces the ${lowerFieldName} associated with this ${structName}. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ${structName}) Set${fieldName}(v ${returnType}) { (*ms.orig).${originFieldName} = v }` @@ -70,22 +62,16 @@ const accessorsPrimitiveTestTemplate = `func Test${structName}_${fieldName}(t *t }` const accessorsPrimitiveTypedTemplate = `// ${fieldName} returns the ${lowerFieldName} associated with this ${structName}. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ${structName}) ${fieldName}() ${returnType} { return ${returnType}((*ms.orig).${originFieldName}) } // Set${fieldName} replaces the ${lowerFieldName} associated with this ${structName}. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ${structName}) Set${fieldName}(v ${returnType}) { (*ms.orig).${originFieldName} = ${rawType}(v) }` const accessorsPrimitiveWithoutSetterTypedTemplate = `// ${fieldName} returns the ${lowerFieldName} associated with this ${structName}. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ${structName}) ${fieldName}() ${returnType} { return ${returnType}((*ms.orig).${originFieldName}) }` diff --git a/consumer/pdata/generated_common.go b/consumer/pdata/generated_common.go index 8b9f69a86f6..1028bf4933d 100644 --- a/consumer/pdata/generated_common.go +++ b/consumer/pdata/generated_common.go @@ -44,29 +44,21 @@ func NewInstrumentationLibrary() InstrumentationLibrary { } // Name returns the name associated with this InstrumentationLibrary. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibrary) Name() string { return (*ms.orig).Name } // SetName replaces the name associated with this InstrumentationLibrary. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibrary) SetName(v string) { (*ms.orig).Name = v } // Version returns the version associated with this InstrumentationLibrary. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibrary) Version() string { return (*ms.orig).Version } // SetVersion replaces the version associated with this InstrumentationLibrary. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibrary) SetVersion(v string) { (*ms.orig).Version = v } diff --git a/consumer/pdata/generated_log.go b/consumer/pdata/generated_log.go index d52a35a8778..76bb19dfb81 100644 --- a/consumer/pdata/generated_log.go +++ b/consumer/pdata/generated_log.go @@ -159,15 +159,11 @@ func NewResourceLogs() ResourceLogs { } // Resource returns the resource associated with this ResourceLogs. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ResourceLogs) Resource() Resource { return newResource(&(*ms.orig).Resource) } // InstrumentationLibraryLogs returns the InstrumentationLibraryLogs associated with this ResourceLogs. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ResourceLogs) InstrumentationLibraryLogs() InstrumentationLibraryLogsSlice { return newInstrumentationLibraryLogsSlice(&(*ms.orig).InstrumentationLibraryLogs) } @@ -315,15 +311,11 @@ func NewInstrumentationLibraryLogs() InstrumentationLibraryLogs { } // InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibraryLogs. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibraryLogs) InstrumentationLibrary() InstrumentationLibrary { return newInstrumentationLibrary(&(*ms.orig).InstrumentationLibrary) } // Logs returns the Logs associated with this InstrumentationLibraryLogs. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibraryLogs) Logs() LogSlice { return newLogSlice(&(*ms.orig).Logs) } @@ -472,127 +464,91 @@ func NewLogRecord() LogRecord { } // Timestamp returns the timestamp associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) Timestamp() TimestampUnixNano { return TimestampUnixNano((*ms.orig).TimeUnixNano) } // SetTimestamp replaces the timestamp associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SetTimestamp(v TimestampUnixNano) { (*ms.orig).TimeUnixNano = uint64(v) } // TraceID returns the traceid associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) TraceID() TraceID { return TraceID((*ms.orig).TraceId) } // SetTraceID replaces the traceid associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SetTraceID(v TraceID) { (*ms.orig).TraceId = data.TraceID(v) } // SpanID returns the spanid associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SpanID() SpanID { return SpanID((*ms.orig).SpanId) } // SetSpanID replaces the spanid associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SetSpanID(v SpanID) { (*ms.orig).SpanId = data.SpanID(v) } // Flags returns the flags associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) Flags() uint32 { return uint32((*ms.orig).Flags) } // SetFlags replaces the flags associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SetFlags(v uint32) { (*ms.orig).Flags = uint32(v) } // SeverityText returns the severitytext associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SeverityText() string { return (*ms.orig).SeverityText } // SetSeverityText replaces the severitytext associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SetSeverityText(v string) { (*ms.orig).SeverityText = v } // SeverityNumber returns the severitynumber associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SeverityNumber() SeverityNumber { return SeverityNumber((*ms.orig).SeverityNumber) } // SetSeverityNumber replaces the severitynumber associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SetSeverityNumber(v SeverityNumber) { (*ms.orig).SeverityNumber = otlplogs.SeverityNumber(v) } // Name returns the name associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) Name() string { return (*ms.orig).Name } // SetName replaces the name associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SetName(v string) { (*ms.orig).Name = v } // Body returns the body associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) Body() AttributeValue { return newAttributeValue(&(*ms.orig).Body) } // Attributes returns the Attributes associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) Attributes() AttributeMap { return newAttributeMap(&(*ms.orig).Attributes) } // DroppedAttributesCount returns the droppedattributescount associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) DroppedAttributesCount() uint32 { return (*ms.orig).DroppedAttributesCount } // SetDroppedAttributesCount replaces the droppedattributescount associated with this LogRecord. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms LogRecord) SetDroppedAttributesCount(v uint32) { (*ms.orig).DroppedAttributesCount = v } diff --git a/consumer/pdata/generated_metrics.go b/consumer/pdata/generated_metrics.go index d35cddf67d0..fd675ee5284 100644 --- a/consumer/pdata/generated_metrics.go +++ b/consumer/pdata/generated_metrics.go @@ -158,15 +158,11 @@ func NewResourceMetrics() ResourceMetrics { } // Resource returns the resource associated with this ResourceMetrics. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ResourceMetrics) Resource() Resource { return newResource(&(*ms.orig).Resource) } // InstrumentationLibraryMetrics returns the InstrumentationLibraryMetrics associated with this ResourceMetrics. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ResourceMetrics) InstrumentationLibraryMetrics() InstrumentationLibraryMetricsSlice { return newInstrumentationLibraryMetricsSlice(&(*ms.orig).InstrumentationLibraryMetrics) } @@ -314,15 +310,11 @@ func NewInstrumentationLibraryMetrics() InstrumentationLibraryMetrics { } // InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibraryMetrics. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibraryMetrics) InstrumentationLibrary() InstrumentationLibrary { return newInstrumentationLibrary(&(*ms.orig).InstrumentationLibrary) } // Metrics returns the Metrics associated with this InstrumentationLibraryMetrics. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibraryMetrics) Metrics() MetricSlice { return newMetricSlice(&(*ms.orig).Metrics) } @@ -471,43 +463,31 @@ func NewMetric() Metric { } // Name returns the name associated with this Metric. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Metric) Name() string { return (*ms.orig).Name } // SetName replaces the name associated with this Metric. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Metric) SetName(v string) { (*ms.orig).Name = v } // Description returns the description associated with this Metric. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Metric) Description() string { return (*ms.orig).Description } // SetDescription replaces the description associated with this Metric. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Metric) SetDescription(v string) { (*ms.orig).Description = v } // Unit returns the unit associated with this Metric. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Metric) Unit() string { return (*ms.orig).Unit } // SetUnit replaces the unit associated with this Metric. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Metric) SetUnit(v string) { (*ms.orig).Unit = v } @@ -543,8 +523,6 @@ func NewIntGauge() IntGauge { } // DataPoints returns the DataPoints associated with this IntGauge. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntGauge) DataPoints() IntDataPointSlice { return newIntDataPointSlice(&(*ms.orig).DataPoints) } @@ -577,8 +555,6 @@ func NewDoubleGauge() DoubleGauge { } // DataPoints returns the DataPoints associated with this DoubleGauge. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleGauge) DataPoints() DoubleDataPointSlice { return newDoubleDataPointSlice(&(*ms.orig).DataPoints) } @@ -611,36 +587,26 @@ func NewIntSum() IntSum { } // AggregationTemporality returns the aggregationtemporality associated with this IntSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntSum) AggregationTemporality() AggregationTemporality { return AggregationTemporality((*ms.orig).AggregationTemporality) } // SetAggregationTemporality replaces the aggregationtemporality associated with this IntSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntSum) SetAggregationTemporality(v AggregationTemporality) { (*ms.orig).AggregationTemporality = otlpmetrics.AggregationTemporality(v) } // IsMonotonic returns the ismonotonic associated with this IntSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntSum) IsMonotonic() bool { return (*ms.orig).IsMonotonic } // SetIsMonotonic replaces the ismonotonic associated with this IntSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntSum) SetIsMonotonic(v bool) { (*ms.orig).IsMonotonic = v } // DataPoints returns the DataPoints associated with this IntSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntSum) DataPoints() IntDataPointSlice { return newIntDataPointSlice(&(*ms.orig).DataPoints) } @@ -675,36 +641,26 @@ func NewDoubleSum() DoubleSum { } // AggregationTemporality returns the aggregationtemporality associated with this DoubleSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSum) AggregationTemporality() AggregationTemporality { return AggregationTemporality((*ms.orig).AggregationTemporality) } // SetAggregationTemporality replaces the aggregationtemporality associated with this DoubleSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSum) SetAggregationTemporality(v AggregationTemporality) { (*ms.orig).AggregationTemporality = otlpmetrics.AggregationTemporality(v) } // IsMonotonic returns the ismonotonic associated with this DoubleSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSum) IsMonotonic() bool { return (*ms.orig).IsMonotonic } // SetIsMonotonic replaces the ismonotonic associated with this DoubleSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSum) SetIsMonotonic(v bool) { (*ms.orig).IsMonotonic = v } // DataPoints returns the DataPoints associated with this DoubleSum. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSum) DataPoints() DoubleDataPointSlice { return newDoubleDataPointSlice(&(*ms.orig).DataPoints) } @@ -739,22 +695,16 @@ func NewIntHistogram() IntHistogram { } // AggregationTemporality returns the aggregationtemporality associated with this IntHistogram. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogram) AggregationTemporality() AggregationTemporality { return AggregationTemporality((*ms.orig).AggregationTemporality) } // SetAggregationTemporality replaces the aggregationtemporality associated with this IntHistogram. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogram) SetAggregationTemporality(v AggregationTemporality) { (*ms.orig).AggregationTemporality = otlpmetrics.AggregationTemporality(v) } // DataPoints returns the DataPoints associated with this IntHistogram. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogram) DataPoints() IntHistogramDataPointSlice { return newIntHistogramDataPointSlice(&(*ms.orig).DataPoints) } @@ -788,22 +738,16 @@ func NewDoubleHistogram() DoubleHistogram { } // AggregationTemporality returns the aggregationtemporality associated with this DoubleHistogram. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogram) AggregationTemporality() AggregationTemporality { return AggregationTemporality((*ms.orig).AggregationTemporality) } // SetAggregationTemporality replaces the aggregationtemporality associated with this DoubleHistogram. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogram) SetAggregationTemporality(v AggregationTemporality) { (*ms.orig).AggregationTemporality = otlpmetrics.AggregationTemporality(v) } // DataPoints returns the DataPoints associated with this DoubleHistogram. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogram) DataPoints() DoubleHistogramDataPointSlice { return newDoubleHistogramDataPointSlice(&(*ms.orig).DataPoints) } @@ -837,8 +781,6 @@ func NewDoubleSummary() DoubleSummary { } // DataPoints returns the DataPoints associated with this DoubleSummary. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummary) DataPoints() DoubleSummaryDataPointSlice { return newDoubleSummaryDataPointSlice(&(*ms.orig).DataPoints) } @@ -985,57 +927,41 @@ func NewIntDataPoint() IntDataPoint { } // LabelsMap returns the Labels associated with this IntDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntDataPoint) LabelsMap() StringMap { return newStringMap(&(*ms.orig).Labels) } // StartTime returns the starttime associated with this IntDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntDataPoint) StartTime() TimestampUnixNano { return TimestampUnixNano((*ms.orig).StartTimeUnixNano) } // SetStartTime replaces the starttime associated with this IntDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntDataPoint) SetStartTime(v TimestampUnixNano) { (*ms.orig).StartTimeUnixNano = uint64(v) } // Timestamp returns the timestamp associated with this IntDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntDataPoint) Timestamp() TimestampUnixNano { return TimestampUnixNano((*ms.orig).TimeUnixNano) } // SetTimestamp replaces the timestamp associated with this IntDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntDataPoint) SetTimestamp(v TimestampUnixNano) { (*ms.orig).TimeUnixNano = uint64(v) } // Value returns the value associated with this IntDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntDataPoint) Value() int64 { return (*ms.orig).Value } // SetValue replaces the value associated with this IntDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntDataPoint) SetValue(v int64) { (*ms.orig).Value = v } // Exemplars returns the Exemplars associated with this IntDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntDataPoint) Exemplars() IntExemplarSlice { return newIntExemplarSlice(&(*ms.orig).Exemplars) } @@ -1186,57 +1112,41 @@ func NewDoubleDataPoint() DoubleDataPoint { } // LabelsMap returns the Labels associated with this DoubleDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleDataPoint) LabelsMap() StringMap { return newStringMap(&(*ms.orig).Labels) } // StartTime returns the starttime associated with this DoubleDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleDataPoint) StartTime() TimestampUnixNano { return TimestampUnixNano((*ms.orig).StartTimeUnixNano) } // SetStartTime replaces the starttime associated with this DoubleDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleDataPoint) SetStartTime(v TimestampUnixNano) { (*ms.orig).StartTimeUnixNano = uint64(v) } // Timestamp returns the timestamp associated with this DoubleDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleDataPoint) Timestamp() TimestampUnixNano { return TimestampUnixNano((*ms.orig).TimeUnixNano) } // SetTimestamp replaces the timestamp associated with this DoubleDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleDataPoint) SetTimestamp(v TimestampUnixNano) { (*ms.orig).TimeUnixNano = uint64(v) } // Value returns the value associated with this DoubleDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleDataPoint) Value() float64 { return (*ms.orig).Value } // SetValue replaces the value associated with this DoubleDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleDataPoint) SetValue(v float64) { (*ms.orig).Value = v } // Exemplars returns the Exemplars associated with this DoubleDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleDataPoint) Exemplars() DoubleExemplarSlice { return newDoubleExemplarSlice(&(*ms.orig).Exemplars) } @@ -1387,99 +1297,71 @@ func NewIntHistogramDataPoint() IntHistogramDataPoint { } // LabelsMap returns the Labels associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) LabelsMap() StringMap { return newStringMap(&(*ms.orig).Labels) } // StartTime returns the starttime associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) StartTime() TimestampUnixNano { return TimestampUnixNano((*ms.orig).StartTimeUnixNano) } // SetStartTime replaces the starttime associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) SetStartTime(v TimestampUnixNano) { (*ms.orig).StartTimeUnixNano = uint64(v) } // Timestamp returns the timestamp associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) Timestamp() TimestampUnixNano { return TimestampUnixNano((*ms.orig).TimeUnixNano) } // SetTimestamp replaces the timestamp associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) SetTimestamp(v TimestampUnixNano) { (*ms.orig).TimeUnixNano = uint64(v) } // Count returns the count associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) Count() uint64 { return (*ms.orig).Count } // SetCount replaces the count associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) SetCount(v uint64) { (*ms.orig).Count = v } // Sum returns the sum associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) Sum() int64 { return (*ms.orig).Sum } // SetSum replaces the sum associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) SetSum(v int64) { (*ms.orig).Sum = v } // BucketCounts returns the bucketcounts associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) BucketCounts() []uint64 { return (*ms.orig).BucketCounts } // SetBucketCounts replaces the bucketcounts associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) SetBucketCounts(v []uint64) { (*ms.orig).BucketCounts = v } // ExplicitBounds returns the explicitbounds associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) ExplicitBounds() []float64 { return (*ms.orig).ExplicitBounds } // SetExplicitBounds replaces the explicitbounds associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) SetExplicitBounds(v []float64) { (*ms.orig).ExplicitBounds = v } // Exemplars returns the Exemplars associated with this IntHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntHistogramDataPoint) Exemplars() IntExemplarSlice { return newIntExemplarSlice(&(*ms.orig).Exemplars) } @@ -1633,99 +1515,71 @@ func NewDoubleHistogramDataPoint() DoubleHistogramDataPoint { } // LabelsMap returns the Labels associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) LabelsMap() StringMap { return newStringMap(&(*ms.orig).Labels) } // StartTime returns the starttime associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) StartTime() TimestampUnixNano { return TimestampUnixNano((*ms.orig).StartTimeUnixNano) } // SetStartTime replaces the starttime associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) SetStartTime(v TimestampUnixNano) { (*ms.orig).StartTimeUnixNano = uint64(v) } // Timestamp returns the timestamp associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) Timestamp() TimestampUnixNano { return TimestampUnixNano((*ms.orig).TimeUnixNano) } // SetTimestamp replaces the timestamp associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) SetTimestamp(v TimestampUnixNano) { (*ms.orig).TimeUnixNano = uint64(v) } // Count returns the count associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) Count() uint64 { return (*ms.orig).Count } // SetCount replaces the count associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) SetCount(v uint64) { (*ms.orig).Count = v } // Sum returns the sum associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) Sum() float64 { return (*ms.orig).Sum } // SetSum replaces the sum associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) SetSum(v float64) { (*ms.orig).Sum = v } // BucketCounts returns the bucketcounts associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) BucketCounts() []uint64 { return (*ms.orig).BucketCounts } // SetBucketCounts replaces the bucketcounts associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) SetBucketCounts(v []uint64) { (*ms.orig).BucketCounts = v } // ExplicitBounds returns the explicitbounds associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) ExplicitBounds() []float64 { return (*ms.orig).ExplicitBounds } // SetExplicitBounds replaces the explicitbounds associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) SetExplicitBounds(v []float64) { (*ms.orig).ExplicitBounds = v } // Exemplars returns the Exemplars associated with this DoubleHistogramDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleHistogramDataPoint) Exemplars() DoubleExemplarSlice { return newDoubleExemplarSlice(&(*ms.orig).Exemplars) } @@ -1879,71 +1733,51 @@ func NewDoubleSummaryDataPoint() DoubleSummaryDataPoint { } // LabelsMap returns the Labels associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) LabelsMap() StringMap { return newStringMap(&(*ms.orig).Labels) } // StartTime returns the starttime associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) StartTime() TimestampUnixNano { return TimestampUnixNano((*ms.orig).StartTimeUnixNano) } // SetStartTime replaces the starttime associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) SetStartTime(v TimestampUnixNano) { (*ms.orig).StartTimeUnixNano = uint64(v) } // Timestamp returns the timestamp associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) Timestamp() TimestampUnixNano { return TimestampUnixNano((*ms.orig).TimeUnixNano) } // SetTimestamp replaces the timestamp associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) SetTimestamp(v TimestampUnixNano) { (*ms.orig).TimeUnixNano = uint64(v) } // Count returns the count associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) Count() uint64 { return (*ms.orig).Count } // SetCount replaces the count associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) SetCount(v uint64) { (*ms.orig).Count = v } // Sum returns the sum associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) Sum() float64 { return (*ms.orig).Sum } // SetSum replaces the sum associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) SetSum(v float64) { (*ms.orig).Sum = v } // QuantileValues returns the QuantileValues associated with this DoubleSummaryDataPoint. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleSummaryDataPoint) QuantileValues() ValueAtQuantileSlice { return newValueAtQuantileSlice(&(*ms.orig).QuantileValues) } @@ -2095,29 +1929,21 @@ func NewValueAtQuantile() ValueAtQuantile { } // Quantile returns the quantile associated with this ValueAtQuantile. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ValueAtQuantile) Quantile() float64 { return (*ms.orig).Quantile } // SetQuantile replaces the quantile associated with this ValueAtQuantile. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ValueAtQuantile) SetQuantile(v float64) { (*ms.orig).Quantile = v } // Value returns the value associated with this ValueAtQuantile. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ValueAtQuantile) Value() float64 { return (*ms.orig).Value } // SetValue replaces the value associated with this ValueAtQuantile. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ValueAtQuantile) SetValue(v float64) { (*ms.orig).Value = v } @@ -2263,36 +2089,26 @@ func NewIntExemplar() IntExemplar { } // Timestamp returns the timestamp associated with this IntExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntExemplar) Timestamp() TimestampUnixNano { return TimestampUnixNano((*ms.orig).TimeUnixNano) } // SetTimestamp replaces the timestamp associated with this IntExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntExemplar) SetTimestamp(v TimestampUnixNano) { (*ms.orig).TimeUnixNano = uint64(v) } // Value returns the value associated with this IntExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntExemplar) Value() int64 { return (*ms.orig).Value } // SetValue replaces the value associated with this IntExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntExemplar) SetValue(v int64) { (*ms.orig).Value = v } // FilteredLabels returns the FilteredLabels associated with this IntExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms IntExemplar) FilteredLabels() StringMap { return newStringMap(&(*ms.orig).FilteredLabels) } @@ -2439,36 +2255,26 @@ func NewDoubleExemplar() DoubleExemplar { } // Timestamp returns the timestamp associated with this DoubleExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleExemplar) Timestamp() TimestampUnixNano { return TimestampUnixNano((*ms.orig).TimeUnixNano) } // SetTimestamp replaces the timestamp associated with this DoubleExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleExemplar) SetTimestamp(v TimestampUnixNano) { (*ms.orig).TimeUnixNano = uint64(v) } // Value returns the value associated with this DoubleExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleExemplar) Value() float64 { return (*ms.orig).Value } // SetValue replaces the value associated with this DoubleExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleExemplar) SetValue(v float64) { (*ms.orig).Value = v } // FilteredLabels returns the FilteredLabels associated with this DoubleExemplar. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms DoubleExemplar) FilteredLabels() StringMap { return newStringMap(&(*ms.orig).FilteredLabels) } diff --git a/consumer/pdata/generated_resource.go b/consumer/pdata/generated_resource.go index f5f2dade494..9e4f2cb3fd0 100644 --- a/consumer/pdata/generated_resource.go +++ b/consumer/pdata/generated_resource.go @@ -44,8 +44,6 @@ func NewResource() Resource { } // Attributes returns the Attributes associated with this Resource. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Resource) Attributes() AttributeMap { return newAttributeMap(&(*ms.orig).Attributes) } diff --git a/consumer/pdata/generated_trace.go b/consumer/pdata/generated_trace.go index cec4af87a70..6ff96ddc706 100644 --- a/consumer/pdata/generated_trace.go +++ b/consumer/pdata/generated_trace.go @@ -159,15 +159,11 @@ func NewResourceSpans() ResourceSpans { } // Resource returns the resource associated with this ResourceSpans. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ResourceSpans) Resource() Resource { return newResource(&(*ms.orig).Resource) } // InstrumentationLibrarySpans returns the InstrumentationLibrarySpans associated with this ResourceSpans. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms ResourceSpans) InstrumentationLibrarySpans() InstrumentationLibrarySpansSlice { return newInstrumentationLibrarySpansSlice(&(*ms.orig).InstrumentationLibrarySpans) } @@ -315,15 +311,11 @@ func NewInstrumentationLibrarySpans() InstrumentationLibrarySpans { } // InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibrarySpans. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibrarySpans) InstrumentationLibrary() InstrumentationLibrary { return newInstrumentationLibrary(&(*ms.orig).InstrumentationLibrary) } // Spans returns the Spans associated with this InstrumentationLibrarySpans. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms InstrumentationLibrarySpans) Spans() SpanSlice { return newSpanSlice(&(*ms.orig).Spans) } @@ -472,183 +464,131 @@ func NewSpan() Span { } // TraceID returns the traceid associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) TraceID() TraceID { return TraceID((*ms.orig).TraceId) } // SetTraceID replaces the traceid associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetTraceID(v TraceID) { (*ms.orig).TraceId = data.TraceID(v) } // SpanID returns the spanid associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SpanID() SpanID { return SpanID((*ms.orig).SpanId) } // SetSpanID replaces the spanid associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetSpanID(v SpanID) { (*ms.orig).SpanId = data.SpanID(v) } // TraceState returns the tracestate associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) TraceState() TraceState { return TraceState((*ms.orig).TraceState) } // SetTraceState replaces the tracestate associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetTraceState(v TraceState) { (*ms.orig).TraceState = string(v) } // ParentSpanID returns the parentspanid associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) ParentSpanID() SpanID { return SpanID((*ms.orig).ParentSpanId) } // SetParentSpanID replaces the parentspanid associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetParentSpanID(v SpanID) { (*ms.orig).ParentSpanId = data.SpanID(v) } // Name returns the name associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) Name() string { return (*ms.orig).Name } // SetName replaces the name associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetName(v string) { (*ms.orig).Name = v } // Kind returns the kind associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) Kind() SpanKind { return SpanKind((*ms.orig).Kind) } // SetKind replaces the kind associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetKind(v SpanKind) { (*ms.orig).Kind = otlptrace.Span_SpanKind(v) } // StartTime returns the starttime associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) StartTime() TimestampUnixNano { return TimestampUnixNano((*ms.orig).StartTimeUnixNano) } // SetStartTime replaces the starttime associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetStartTime(v TimestampUnixNano) { (*ms.orig).StartTimeUnixNano = uint64(v) } // EndTime returns the endtime associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) EndTime() TimestampUnixNano { return TimestampUnixNano((*ms.orig).EndTimeUnixNano) } // SetEndTime replaces the endtime associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetEndTime(v TimestampUnixNano) { (*ms.orig).EndTimeUnixNano = uint64(v) } // Attributes returns the Attributes associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) Attributes() AttributeMap { return newAttributeMap(&(*ms.orig).Attributes) } // DroppedAttributesCount returns the droppedattributescount associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) DroppedAttributesCount() uint32 { return (*ms.orig).DroppedAttributesCount } // SetDroppedAttributesCount replaces the droppedattributescount associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetDroppedAttributesCount(v uint32) { (*ms.orig).DroppedAttributesCount = v } // Events returns the Events associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) Events() SpanEventSlice { return newSpanEventSlice(&(*ms.orig).Events) } // DroppedEventsCount returns the droppedeventscount associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) DroppedEventsCount() uint32 { return (*ms.orig).DroppedEventsCount } // SetDroppedEventsCount replaces the droppedeventscount associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetDroppedEventsCount(v uint32) { (*ms.orig).DroppedEventsCount = v } // Links returns the Links associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) Links() SpanLinkSlice { return newSpanLinkSlice(&(*ms.orig).Links) } // DroppedLinksCount returns the droppedlinkscount associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) DroppedLinksCount() uint32 { return (*ms.orig).DroppedLinksCount } // SetDroppedLinksCount replaces the droppedlinkscount associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) SetDroppedLinksCount(v uint32) { (*ms.orig).DroppedLinksCount = v } // Status returns the status associated with this Span. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms Span) Status() SpanStatus { return newSpanStatus(&(*ms.orig).Status) } @@ -810,50 +750,36 @@ func NewSpanEvent() SpanEvent { } // Timestamp returns the timestamp associated with this SpanEvent. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanEvent) Timestamp() TimestampUnixNano { return TimestampUnixNano((*ms.orig).TimeUnixNano) } // SetTimestamp replaces the timestamp associated with this SpanEvent. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanEvent) SetTimestamp(v TimestampUnixNano) { (*ms.orig).TimeUnixNano = uint64(v) } // Name returns the name associated with this SpanEvent. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanEvent) Name() string { return (*ms.orig).Name } // SetName replaces the name associated with this SpanEvent. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanEvent) SetName(v string) { (*ms.orig).Name = v } // Attributes returns the Attributes associated with this SpanEvent. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanEvent) Attributes() AttributeMap { return newAttributeMap(&(*ms.orig).Attributes) } // DroppedAttributesCount returns the droppedattributescount associated with this SpanEvent. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanEvent) DroppedAttributesCount() uint32 { return (*ms.orig).DroppedAttributesCount } // SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanEvent. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanEvent) SetDroppedAttributesCount(v uint32) { (*ms.orig).DroppedAttributesCount = v } @@ -1004,64 +930,46 @@ func NewSpanLink() SpanLink { } // TraceID returns the traceid associated with this SpanLink. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanLink) TraceID() TraceID { return TraceID((*ms.orig).TraceId) } // SetTraceID replaces the traceid associated with this SpanLink. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanLink) SetTraceID(v TraceID) { (*ms.orig).TraceId = data.TraceID(v) } // SpanID returns the spanid associated with this SpanLink. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanLink) SpanID() SpanID { return SpanID((*ms.orig).SpanId) } // SetSpanID replaces the spanid associated with this SpanLink. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanLink) SetSpanID(v SpanID) { (*ms.orig).SpanId = data.SpanID(v) } // TraceState returns the tracestate associated with this SpanLink. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanLink) TraceState() TraceState { return TraceState((*ms.orig).TraceState) } // SetTraceState replaces the tracestate associated with this SpanLink. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanLink) SetTraceState(v TraceState) { (*ms.orig).TraceState = string(v) } // Attributes returns the Attributes associated with this SpanLink. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanLink) Attributes() AttributeMap { return newAttributeMap(&(*ms.orig).Attributes) } // DroppedAttributesCount returns the droppedattributescount associated with this SpanLink. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanLink) DroppedAttributesCount() uint32 { return (*ms.orig).DroppedAttributesCount } // SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanLink. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanLink) SetDroppedAttributesCount(v uint32) { (*ms.orig).DroppedAttributesCount = v } @@ -1099,36 +1007,26 @@ func NewSpanStatus() SpanStatus { } // Code returns the code associated with this SpanStatus. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanStatus) Code() StatusCode { return StatusCode((*ms.orig).Code) } // DeprecatedCode returns the deprecatedcode associated with this SpanStatus. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanStatus) DeprecatedCode() DeprecatedStatusCode { return DeprecatedStatusCode((*ms.orig).DeprecatedCode) } // SetDeprecatedCode replaces the deprecatedcode associated with this SpanStatus. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanStatus) SetDeprecatedCode(v DeprecatedStatusCode) { (*ms.orig).DeprecatedCode = otlptrace.Status_DeprecatedStatusCode(v) } // Message returns the message associated with this SpanStatus. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanStatus) Message() string { return (*ms.orig).Message } // SetMessage replaces the message associated with this SpanStatus. -// -// Important: This causes a runtime error if IsNil() returns "true". func (ms SpanStatus) SetMessage(v string) { (*ms.orig).Message = v }