From 8da139ea3260f5d9836ebc97925905bf808b2516 Mon Sep 17 00:00:00 2001 From: Jack Berg <34418638+jack-berg@users.noreply.github.com> Date: Tue, 23 Jun 2026 10:59:03 -0500 Subject: [PATCH] Adjust declarative config pojo toString, hashCode, equals to match autovalue --- buildSrc/build.gradle.kts | 1 + .../gradle/js2p/NullableAnnotator.java | 43 +++ .../gradle/js2p/OtelObjectRule.java | 134 ++++++++++ .../gradle/js2p/OtelRuleFactory.java | 29 +++ .../declarative-config/build.gradle.kts | 34 ++- .../model/AggregationModel.java | 140 ++++------ .../model/AlwaysOffSamplerModel.java | 30 +-- .../model/AlwaysOnSamplerModel.java | 30 +-- .../model/AttributeLimitsModel.java | 77 ++---- .../model/AttributeNameValueModel.java | 70 ++--- .../model/B3MultiPropagatorModel.java | 30 +-- .../model/B3PropagatorModel.java | 30 +-- .../model/BaggagePropagatorModel.java | 30 +-- ...entialBucketHistogramAggregationModel.java | 88 +++---- .../model/BatchLogRecordProcessorModel.java | 128 ++++----- .../model/BatchSpanProcessorModel.java | 128 ++++----- .../model/CardinalityLimitsModel.java | 177 +++++-------- .../model/ConsoleExporterModel.java | 30 +-- .../model/ConsoleMetricExporterModel.java | 74 ++---- .../model/DefaultAggregationModel.java | 30 +-- .../model/DistributionModel.java | 43 +-- .../model/DistributionPropertyModel.java | 43 +-- .../model/DropAggregationModel.java | 30 +-- .../ExperimentalCodeInstrumentationModel.java | 40 +-- ...mentalComposableAlwaysOffSamplerModel.java | 32 +-- ...imentalComposableAlwaysOnSamplerModel.java | 32 +-- ...ComposableParentThresholdSamplerModel.java | 41 +-- ...ntalComposableProbabilitySamplerModel.java | 46 +--- ...mentalComposableRuleBasedSamplerModel.java | 42 +-- ...asedSamplerRuleAttributePatternsModel.java | 77 ++---- ...eBasedSamplerRuleAttributeValuesModel.java | 59 ++--- ...alComposableRuleBasedSamplerRuleModel.java | 116 ++++----- .../ExperimentalComposableSamplerModel.java | 129 ++++----- ...imentalComposableSamplerPropertyModel.java | 48 ++-- ...imentalContainerResourceDetectorModel.java | 32 +-- .../ExperimentalDbInstrumentationModel.java | 40 +-- ...panEventBridgeLogRecordProcessorModel.java | 32 +-- ...ExperimentalGenAiInstrumentationModel.java | 40 +-- ...perimentalGeneralInstrumentationModel.java | 158 +++++------- ...ExperimentalHostResourceDetectorModel.java | 30 +-- ...imentalHttpClientInstrumentationModel.java | 92 +++---- .../ExperimentalHttpInstrumentationModel.java | 73 ++---- ...imentalHttpServerInstrumentationModel.java | 92 +++---- .../ExperimentalInstrumentationModel.java | 209 ++++++--------- .../ExperimentalJaegerRemoteSamplerModel.java | 75 +++--- ...lLanguageSpecificInstrumentationModel.java | 48 ++-- ...eSpecificInstrumentationPropertyModel.java | 48 ++-- .../model/ExperimentalLoggerConfigModel.java | 85 +++--- .../ExperimentalLoggerConfiguratorModel.java | 65 ++--- ...perimentalLoggerMatcherAndConfigModel.java | 51 ++-- ...rimentalMessagingInstrumentationModel.java | 42 +-- .../model/ExperimentalMeterConfigModel.java | 45 +--- .../ExperimentalMeterConfiguratorModel.java | 65 ++--- ...xperimentalMeterMatcherAndConfigModel.java | 51 ++-- .../ExperimentalOtlpFileExporterModel.java | 43 +-- ...perimentalOtlpFileMetricExporterModel.java | 92 +++---- .../ExperimentalProbabilitySamplerModel.java | 44 +--- ...erimentalProcessResourceDetectorModel.java | 31 +-- ...rimentalPrometheusMetricExporterModel.java | 159 +++++------- .../ExperimentalResourceDetectionModel.java | 63 ++--- .../ExperimentalResourceDetectorModel.java | 107 +++----- ...rimentalResourceDetectorPropertyModel.java | 48 ++-- .../ExperimentalRpcInstrumentationModel.java | 40 +-- .../model/ExperimentalSanitizationModel.java | 39 +-- .../model/ExperimentalSemconvConfigModel.java | 78 +++--- ...erimentalServiceResourceDetectorModel.java | 31 +-- .../model/ExperimentalSpanParent.java | 1 - .../model/ExperimentalTracerConfigModel.java | 45 +--- .../ExperimentalTracerConfiguratorModel.java | 65 ++--- ...perimentalTracerMatcherAndConfigModel.java | 51 ++-- .../ExperimentalUrlSanitizationModel.java | 51 ++-- ...plicitBucketHistogramAggregationModel.java | 68 ++--- .../declarativeconfig/model/GrpcTlsModel.java | 92 +++---- .../declarativeconfig/model/HttpTlsModel.java | 76 ++---- .../model/IdGeneratorModel.java | 60 ++--- .../model/IdGeneratorPropertyModel.java | 43 +-- .../model/IncludeExcludeModel.java | 55 ++-- .../model/LastValueAggregationModel.java | 30 +-- .../model/LogRecordExporterModel.java | 110 +++----- .../model/LogRecordExporterPropertyModel.java | 43 +-- .../model/LogRecordLimitsModel.java | 73 ++---- .../model/LogRecordProcessorModel.java | 102 +++----- .../LogRecordProcessorPropertyModel.java | 46 ++-- .../model/LoggerProviderModel.java | 88 +++---- .../model/MeterProviderModel.java | 106 +++----- .../model/MetricProducerModel.java | 62 ++--- .../model/MetricProducerPropertyModel.java | 43 +-- .../model/MetricReaderModel.java | 50 ++-- .../model/NameStringValuePairModel.java | 50 ++-- .../model/OpenCensusMetricProducerModel.java | 30 +-- .../OpenTelemetryConfigurationModel.java | 244 +++++++----------- .../model/OtlpGrpcExporterModel.java | 131 ++++------ .../model/OtlpGrpcMetricExporterModel.java | 180 +++++-------- .../model/OtlpHttpExporterModel.java | 143 ++++------ .../model/OtlpHttpMetricExporterModel.java | 198 ++++++-------- .../model/ParentBasedSamplerModel.java | 122 ++++----- .../model/PeriodicMetricReaderModel.java | 151 ++++------- .../model/PropagatorModel.java | 59 ++--- .../model/PullMetricExporterModel.java | 65 ++--- .../PullMetricExporterPropertyModel.java | 46 ++-- .../model/PullMetricReaderModel.java | 85 +++--- .../model/PushMetricExporterModel.java | 110 +++----- .../PushMetricExporterPropertyModel.java | 46 ++-- .../model/RandomIdGeneratorModel.java | 30 +-- .../model/ResourceModel.java | 107 +++----- .../declarativeconfig/model/SamplerModel.java | 178 +++++-------- .../model/SamplerPropertyModel.java | 43 +-- .../model/SimpleLogRecordProcessorModel.java | 40 +-- .../model/SimpleSpanProcessorModel.java | 40 +-- .../model/SpanExporterModel.java | 110 +++----- .../model/SpanExporterPropertyModel.java | 43 +-- .../declarativeconfig/model/SpanKind.java | 1 - .../model/SpanLimitsModel.java | 165 +++++------- .../model/SpanProcessorModel.java | 72 ++---- .../model/SpanProcessorPropertyModel.java | 43 +-- .../model/SumAggregationModel.java | 30 +-- .../model/TextMapPropagatorModel.java | 106 +++----- .../model/TextMapPropagatorPropertyModel.java | 43 +-- .../model/TraceContextPropagatorModel.java | 30 +-- .../model/TraceIdRatioBasedSamplerModel.java | 44 +--- .../model/TracerProviderModel.java | 121 ++++----- .../declarativeconfig/model/ViewModel.java | 52 ++-- .../model/ViewSelectorModel.java | 145 ++++------- .../model/ViewStreamModel.java | 123 ++++----- .../model/ModelEqualsHashCodeTest.java | 72 ++++++ 125 files changed, 3444 insertions(+), 5473 deletions(-) create mode 100644 buildSrc/src/main/java/io/opentelemetry/gradle/js2p/NullableAnnotator.java create mode 100644 buildSrc/src/main/java/io/opentelemetry/gradle/js2p/OtelObjectRule.java create mode 100644 buildSrc/src/main/java/io/opentelemetry/gradle/js2p/OtelRuleFactory.java create mode 100644 sdk-extensions/declarative-config/src/test/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ModelEqualsHashCodeTest.java diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 9cce39742ca..1393feac8f6 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -49,6 +49,7 @@ dependencies { implementation("net.ltgt.gradle:gradle-errorprone-plugin:5.1.0") implementation("net.ltgt.gradle:gradle-nullaway-plugin:3.1.0") implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.21") + implementation("org.jsonschema2pojo:jsonschema2pojo-core:1.3.3") implementation("org.sonatype.gradle.plugins:scan-gradle-plugin:3.1.5") implementation("ru.vyarus:gradle-animalsniffer-plugin:2.0.1") } diff --git a/buildSrc/src/main/java/io/opentelemetry/gradle/js2p/NullableAnnotator.java b/buildSrc/src/main/java/io/opentelemetry/gradle/js2p/NullableAnnotator.java new file mode 100644 index 00000000000..020aa4591fa --- /dev/null +++ b/buildSrc/src/main/java/io/opentelemetry/gradle/js2p/NullableAnnotator.java @@ -0,0 +1,43 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.gradle.js2p; + +import com.fasterxml.jackson.databind.JsonNode; +import com.sun.codemodel.JDefinedClass; +import com.sun.codemodel.JFieldVar; +import com.sun.codemodel.JMethod; +import javax.annotation.Nullable; +import org.jsonschema2pojo.AbstractAnnotator; + +/** + * Annotates every generated property field and getter with {@code @Nullable}. + * + *

jsonschema2pojo's built-in JSR-305 support ({@code includeJsr305Annotations}) annotates + * required fields with {@code @Nonnull} and optional fields with {@code @Nullable}. The {@code + * @Nonnull} fields are never initialized (Jackson populates them reflectively), which makes NullAway + * flag them as uninitialized {@code @NonNull} fields. Since the generated getters are uniformly + * {@code @Nullable} anyway and field presence is validated at runtime by the model factories, we + * disable {@code includeJsr305Annotations} and instead annotate everything {@code @Nullable} here. + */ +public class NullableAnnotator extends AbstractAnnotator { + + @Override + public void propertyField( + JFieldVar field, JDefinedClass clazz, String propertyName, JsonNode propertyNode) { + field.annotate(Nullable.class); + } + + @Override + public void propertyGetter(JMethod getter, JDefinedClass clazz, String propertyName) { + getter.annotate(Nullable.class); + } + + @Override + public boolean isPolymorphicDeserializationSupported(JsonNode node) { + // Defer to the composed Jackson annotator rather than vetoing polymorphic deserialization. + return true; + } +} diff --git a/buildSrc/src/main/java/io/opentelemetry/gradle/js2p/OtelObjectRule.java b/buildSrc/src/main/java/io/opentelemetry/gradle/js2p/OtelObjectRule.java new file mode 100644 index 00000000000..dd67b4a85dd --- /dev/null +++ b/buildSrc/src/main/java/io/opentelemetry/gradle/js2p/OtelObjectRule.java @@ -0,0 +1,134 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.gradle.js2p; + +import com.fasterxml.jackson.databind.JsonNode; +import com.sun.codemodel.ClassType; +import com.sun.codemodel.JBlock; +import com.sun.codemodel.JCodeModel; +import com.sun.codemodel.JDefinedClass; +import com.sun.codemodel.JExpr; +import com.sun.codemodel.JFieldVar; +import com.sun.codemodel.JMethod; +import com.sun.codemodel.JMod; +import com.sun.codemodel.JPackage; +import com.sun.codemodel.JType; +import com.sun.codemodel.JVar; +import javax.annotation.Nullable; +import org.jsonschema2pojo.Schema; +import org.jsonschema2pojo.rules.ObjectRule; +import org.jsonschema2pojo.rules.RuleFactory; +import org.jsonschema2pojo.util.ParcelableHelper; +import org.jsonschema2pojo.util.ReflectionHelper; + +/** + * An {@link ObjectRule} that replaces jsonschema2pojo's generated {@code toString}/{@code + * equals}/{@code hashCode} with implementations that mirror AutoValue's style. + */ +public class OtelObjectRule extends ObjectRule { + + public OtelObjectRule( + RuleFactory ruleFactory, + ParcelableHelper parcelableHelper, + ReflectionHelper reflectionHelper) { + super(ruleFactory, parcelableHelper, reflectionHelper); + } + + @Override + public JType apply( + String nodeName, JsonNode node, JsonNode parent, JPackage pkg, Schema schema) { + JType type = super.apply(nodeName, node, parent, pkg, schema); + if (type instanceof JDefinedClass + && ((JDefinedClass) type).getClassType() == ClassType.CLASS) { + addValueMethods((JDefinedClass) type); + } + return type; + } + + private static void addValueMethods(JDefinedClass clazz) { + JCodeModel model = clazz.owner(); + + addToString(clazz, model); + addHashCode(clazz, model); + addEquals(clazz, model); + } + + // toString: ClassName{field1=value1, field2=value2} + private static void addToString(JDefinedClass clazz, JCodeModel model) { + JMethod toString = clazz.method(JMod.PUBLIC, model.ref(String.class), "toString"); + toString.annotate(Override.class); + + StringBuilder expr = new StringBuilder("return \"").append(clazz.name()).append("{\""); + boolean first = true; + for (JFieldVar field : clazz.fields().values()) { + if (isStatic(field)) { + continue; + } + expr.append(" + \"") + .append(first ? "" : ", ") + .append(field.name()) + .append("=\" + ") + .append(field.name()); + first = false; + } + expr.append(" + \"}\";"); + toString.body().directStatement(expr.toString()); + } + + // equals: instanceof + cast + (this.f == null ? that.f == null : this.f.equals(that.f)) && ... + private static void addEquals(JDefinedClass clazz, JCodeModel model) { + JMethod equals = clazz.method(JMod.PUBLIC, model.BOOLEAN, "equals"); + equals.annotate(Override.class); + JVar other = equals.param(model.ref(Object.class), "o"); + other.annotate(Nullable.class); + JBlock body = equals.body(); + + body._if(other.eq(JExpr._this()))._then()._return(JExpr.TRUE); + + JBlock matched = body._if(other._instanceof(clazz))._then(); + matched.directStatement(clazz.name() + " that = (" + clazz.name() + ") o;"); + + StringBuilder comparison = new StringBuilder("return "); + boolean first = true; + for (JFieldVar field : clazz.fields().values()) { + if (isStatic(field)) { + continue; + } + String name = field.name(); + comparison + .append(first ? "" : " && ") + .append("(this.").append(name).append(" == null ? that.").append(name) + .append(" == null : this.").append(name).append(".equals(that.").append(name) + .append("))"); + first = false; + } + matched.directStatement(first ? "return true;" : comparison.append(";").toString()); + + body._return(JExpr.FALSE); + } + + // hashCode: h = 1; h *= 1000003; h ^= (f == null ? 0 : f.hashCode()); ... + private static void addHashCode(JDefinedClass clazz, JCodeModel model) { + JMethod hashCode = clazz.method(JMod.PUBLIC, model.INT, "hashCode"); + hashCode.annotate(Override.class); + JBlock body = hashCode.body(); + JVar h = body.decl(model.INT, "h", JExpr.lit(1)); + + for (JFieldVar field : clazz.fields().values()) { + if (isStatic(field)) { + continue; + } + String name = field.name(); + body.directStatement("h *= 1000003;"); + body.directStatement("h ^= (this." + name + " == null) ? 0 : this." + name + ".hashCode();"); + } + body._return(h); + } + + private static boolean isStatic(JFieldVar field) { + return (field.mods().getValue() & JMod.STATIC) == JMod.STATIC; + } +} diff --git a/buildSrc/src/main/java/io/opentelemetry/gradle/js2p/OtelRuleFactory.java b/buildSrc/src/main/java/io/opentelemetry/gradle/js2p/OtelRuleFactory.java new file mode 100644 index 00000000000..e52b77c3195 --- /dev/null +++ b/buildSrc/src/main/java/io/opentelemetry/gradle/js2p/OtelRuleFactory.java @@ -0,0 +1,29 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.gradle.js2p; + +import com.sun.codemodel.JPackage; +import com.sun.codemodel.JType; +import org.jsonschema2pojo.rules.ObjectRule; +import org.jsonschema2pojo.rules.Rule; +import org.jsonschema2pojo.rules.RuleFactory; +import org.jsonschema2pojo.util.ParcelableHelper; + +/** + * Custom {@link RuleFactory} that swaps in {@link OtelObjectRule} so generated POJOs get + * AutoValue-style {@code toString}/{@code equals}/{@code hashCode} implementations instead of + * jsonschema2pojo's defaults. + * + *

Referenced from {@code sdk-extensions/declarative-config/build.gradle.kts} via {@code + * jsonSchema2Pojo.customRuleFactory}. + */ +public class OtelRuleFactory extends RuleFactory { + + @Override + public Rule getObjectRule() { + return new OtelObjectRule(this, new ParcelableHelper(), getReflectionHelper()); + } +} diff --git a/sdk-extensions/declarative-config/build.gradle.kts b/sdk-extensions/declarative-config/build.gradle.kts index 5dca2b822db..dc6db434c18 100644 --- a/sdk-extensions/declarative-config/build.gradle.kts +++ b/sdk-extensions/declarative-config/build.gradle.kts @@ -47,6 +47,7 @@ dependencies { testImplementation("com.linecorp.armeria:armeria-junit5") // testImplementation("com.google.guava:guava-testlib") + testImplementation("nl.jqno.equalsverifier:equalsverifier") } // The following tasks download the JSON Schema files from open-telemetry/opentelemetry-configuration, @@ -100,9 +101,20 @@ jsonSchema2Pojo { // Clear old source files to avoid contaminated source dir when updating removeOldOutput = true - // Include @Nullable annotation. Note: jsonSchema2Pojo will not add @Nullable annotations on getters - // so we add these in syncPojoModelsToSrc. - includeJsr305Annotations = true + // Annotate fields/getters via NullableAnnotator instead of jsonschema2pojo's JSR-305 support. The + // built-in support adds @Nonnull to required fields, which NullAway flags as uninitialized (Jackson + // populates them reflectively). NullableAnnotator annotates everything @Nullable instead, matching + // the getters and letting the model factories validate required-ness at runtime. + includeJsr305Annotations = false + setCustomAnnotator(io.opentelemetry.gradle.js2p.NullableAnnotator::class.java) + + // Generate AutoValue-style toString/equals/hashCode via OtelObjectRule (wired through + // OtelRuleFactory) rather than jsonschema2pojo's defaults. The defaults use a commons-style + // toString (System.identityHashCode) and compare boxed fields with == (tripping ErrorProne's + // BoxedPrimitiveEquality). Disable the built-in generation so the custom rule can supply its own. + includeToString = false + includeHashcodeAndEquals = false + setCustomRuleFactory(io.opentelemetry.gradle.js2p.OtelRuleFactory::class.java) // Prefer builders to setters includeSetters = false @@ -146,22 +158,8 @@ val syncPojoModelsToSrc by tasks.registering(Copy::class) { it // Shorten FQCNs for same-package references generated by jsonschema2pojo .replace("io.opentelemetry.sdk.autoconfigure.declarativeconfig.model.", "") - // Remove @Nullable annotation so it can be deterministically added later - .replace("import javax.annotation.Nullable;\n", "") // Replace java 9+ @Generated annotation with java 8 version, add @Nullable annotation - .replace("import javax.annotation.processing.Generated;", "import javax.annotation.Nullable;\nimport javax.annotation.Generated;") - // Add @SuppressWarnings annotations for issues inherent in jsonschema2pojo-generated code: - // "rawtypes" - raw types used in builders - // "NullAway" - uninitialized @NonNull fields on Jackson-deserialized POJOs - // TODO(jack-berg): investigate jsonschema2pojo config to avoid @Nonnull on fields / generate initializing constructors - // "BoxedPrimitiveEquality" - == comparison of boxed primitives in generated equals() - // TODO(jack-berg): investigate jsonschema2pojo config for alternative equals implementation that avoids boxed primitives comparison - .replace( - "@Generated(\"jsonschema2pojo\")", - "@Generated(\"jsonschema2pojo\")\n@SuppressWarnings({\"NullAway\", \"rawtypes\", \"BoxedPrimitiveEquality\"})" - ) - // Add @Nullable annotations to all getters (except getAdditionalProperties which is non-null) - .replace("( *)public (.+) get(?!AdditionalProperties)([a-zA-Z]*)".toRegex(), "$1@Nullable\n$1public $2 get$3") + .replace("import javax.annotation.processing.Generated;", "import javax.annotation.Generated;") } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AggregationModel.java index 3fde4c5c0c2..aabed475abe 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AggregationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AggregationModel.java @@ -21,37 +21,30 @@ "sum" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class AggregationModel { - /** (Can be null) */ - @Nullable @JsonProperty("default") + @Nullable private DefaultAggregationModel _default; - /** (Can be null) */ - @Nullable @JsonProperty("drop") + @Nullable private DropAggregationModel drop; - /** (Can be null) */ - @Nullable @JsonProperty("explicit_bucket_histogram") + @Nullable private ExplicitBucketHistogramAggregationModel explicitBucketHistogram; - /** (Can be null) */ - @Nullable @JsonProperty("base2_exponential_bucket_histogram") + @Nullable private Base2ExponentialBucketHistogramAggregationModel base2ExponentialBucketHistogram; - /** (Can be null) */ - @Nullable @JsonProperty("last_value") + @Nullable private LastValueAggregationModel lastValue; - /** (Can be null) */ - @Nullable @JsonProperty("sum") + @Nullable private SumAggregationModel sum; @JsonProperty("default") @@ -124,88 +117,63 @@ public AggregationModel withSum(SumAggregationModel sum) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(AggregationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("_default"); - sb.append('='); - sb.append(((this._default == null) ? "" : this._default)); - sb.append(','); - sb.append("drop"); - sb.append('='); - sb.append(((this.drop == null) ? "" : this.drop)); - sb.append(','); - sb.append("explicitBucketHistogram"); - sb.append('='); - sb.append(((this.explicitBucketHistogram == null) ? "" : this.explicitBucketHistogram)); - sb.append(','); - sb.append("base2ExponentialBucketHistogram"); - sb.append('='); - sb.append( - ((this.base2ExponentialBucketHistogram == null) - ? "" - : this.base2ExponentialBucketHistogram)); - sb.append(','); - sb.append("lastValue"); - sb.append('='); - sb.append(((this.lastValue == null) ? "" : this.lastValue)); - sb.append(','); - sb.append("sum"); - sb.append('='); - sb.append(((this.sum == null) ? "" : this.sum)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "AggregationModel{" + + "_default=" + + _default + + ", drop=" + + drop + + ", explicitBucketHistogram=" + + explicitBucketHistogram + + ", base2ExponentialBucketHistogram=" + + base2ExponentialBucketHistogram + + ", lastValue=" + + lastValue + + ", sum=" + + sum + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.drop == null) ? 0 : this.drop.hashCode())); - result = - ((result * 31) - + ((this.explicitBucketHistogram == null) - ? 0 - : this.explicitBucketHistogram.hashCode())); - result = ((result * 31) + ((this._default == null) ? 0 : this._default.hashCode())); - result = ((result * 31) + ((this.lastValue == null) ? 0 : this.lastValue.hashCode())); - result = ((result * 31) + ((this.sum == null) ? 0 : this.sum.hashCode())); - result = - ((result * 31) - + ((this.base2ExponentialBucketHistogram == null) - ? 0 - : this.base2ExponentialBucketHistogram.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this._default == null) ? 0 : this._default.hashCode(); + h *= 1000003; + h ^= (this.drop == null) ? 0 : this.drop.hashCode(); + h *= 1000003; + h ^= (this.explicitBucketHistogram == null) ? 0 : this.explicitBucketHistogram.hashCode(); + h *= 1000003; + h ^= + (this.base2ExponentialBucketHistogram == null) + ? 0 + : this.base2ExponentialBucketHistogram.hashCode(); + h *= 1000003; + h ^= (this.lastValue == null) ? 0 : this.lastValue.hashCode(); + h *= 1000003; + h ^= (this.sum == null) ? 0 : this.sum.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof AggregationModel) == false) { - return false; + if (o instanceof AggregationModel) { + AggregationModel that = (AggregationModel) o; + return (this._default == null ? that._default == null : this._default.equals(that._default)) + && (this.drop == null ? that.drop == null : this.drop.equals(that.drop)) + && (this.explicitBucketHistogram == null + ? that.explicitBucketHistogram == null + : this.explicitBucketHistogram.equals(that.explicitBucketHistogram)) + && (this.base2ExponentialBucketHistogram == null + ? that.base2ExponentialBucketHistogram == null + : this.base2ExponentialBucketHistogram.equals(that.base2ExponentialBucketHistogram)) + && (this.lastValue == null + ? that.lastValue == null + : this.lastValue.equals(that.lastValue)) + && (this.sum == null ? that.sum == null : this.sum.equals(that.sum)); } - AggregationModel rhs = ((AggregationModel) other); - return (((((((this.drop == rhs.drop) || ((this.drop != null) && this.drop.equals(rhs.drop))) - && ((this.explicitBucketHistogram == rhs.explicitBucketHistogram) - || ((this.explicitBucketHistogram != null) - && this.explicitBucketHistogram.equals( - rhs.explicitBucketHistogram)))) - && ((this._default == rhs._default) - || ((this._default != null) && this._default.equals(rhs._default)))) - && ((this.lastValue == rhs.lastValue) - || ((this.lastValue != null) && this.lastValue.equals(rhs.lastValue)))) - && ((this.sum == rhs.sum) || ((this.sum != null) && this.sum.equals(rhs.sum)))) - && ((this.base2ExponentialBucketHistogram == rhs.base2ExponentialBucketHistogram) - || ((this.base2ExponentialBucketHistogram != null) - && this.base2ExponentialBucketHistogram.equals( - rhs.base2ExponentialBucketHistogram)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOffSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOffSamplerModel.java index ac920bf5757..2aa1123a9a7 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOffSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOffSamplerModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class AlwaysOffSamplerModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(AlwaysOffSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "AlwaysOffSamplerModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof AlwaysOffSamplerModel) == false) { - return false; + if (o instanceof AlwaysOffSamplerModel) { + AlwaysOffSamplerModel that = (AlwaysOffSamplerModel) o; + return true; } - AlwaysOffSamplerModel rhs = ((AlwaysOffSamplerModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOnSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOnSamplerModel.java index ad4ccbf0dab..b1346b2d370 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOnSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOnSamplerModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class AlwaysOnSamplerModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(AlwaysOnSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "AlwaysOnSamplerModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof AlwaysOnSamplerModel) == false) { - return false; + if (o instanceof AlwaysOnSamplerModel) { + AlwaysOnSamplerModel that = (AlwaysOnSamplerModel) o; + return true; } - AlwaysOnSamplerModel rhs = ((AlwaysOnSamplerModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeLimitsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeLimitsModel.java index 9472232580c..960dff18384 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeLimitsModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeLimitsModel.java @@ -15,30 +15,23 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"attribute_value_length_limit", "attribute_count_limit"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class AttributeLimitsModel { /** * Configure max attribute value size. Value must be non-negative. If omitted or null, there is no * limit. - * - *

(Can be null) */ - @Nullable @JsonProperty("attribute_value_length_limit") @JsonPropertyDescription( "Configure max attribute value size. \nValue must be non-negative.\nIf omitted or null, there is no limit.\n") + @Nullable private Integer attributeValueLengthLimit; - /** - * Configure max attribute count. Value must be non-negative. If omitted or null, 128 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure max attribute count. Value must be non-negative. If omitted or null, 128 is used. */ @JsonProperty("attribute_count_limit") @JsonPropertyDescription( "Configure max attribute count. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + @Nullable private Integer attributeCountLimit; /** @@ -70,56 +63,38 @@ public AttributeLimitsModel withAttributeCountLimit(Integer attributeCountLimit) @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(AttributeLimitsModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("attributeValueLengthLimit"); - sb.append('='); - sb.append( - ((this.attributeValueLengthLimit == null) ? "" : this.attributeValueLengthLimit)); - sb.append(','); - sb.append("attributeCountLimit"); - sb.append('='); - sb.append(((this.attributeCountLimit == null) ? "" : this.attributeCountLimit)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "AttributeLimitsModel{" + + "attributeValueLengthLimit=" + + attributeValueLengthLimit + + ", attributeCountLimit=" + + attributeCountLimit + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.attributeValueLengthLimit == null) - ? 0 - : this.attributeValueLengthLimit.hashCode())); - result = - ((result * 31) - + ((this.attributeCountLimit == null) ? 0 : this.attributeCountLimit.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.attributeValueLengthLimit == null) ? 0 : this.attributeValueLengthLimit.hashCode(); + h *= 1000003; + h ^= (this.attributeCountLimit == null) ? 0 : this.attributeCountLimit.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof AttributeLimitsModel) == false) { - return false; + if (o instanceof AttributeLimitsModel) { + AttributeLimitsModel that = (AttributeLimitsModel) o; + return (this.attributeValueLengthLimit == null + ? that.attributeValueLengthLimit == null + : this.attributeValueLengthLimit.equals(that.attributeValueLengthLimit)) + && (this.attributeCountLimit == null + ? that.attributeCountLimit == null + : this.attributeCountLimit.equals(that.attributeCountLimit)); } - AttributeLimitsModel rhs = ((AttributeLimitsModel) other); - return (((this.attributeValueLengthLimit == rhs.attributeValueLengthLimit) - || ((this.attributeValueLengthLimit != null) - && this.attributeValueLengthLimit.equals(rhs.attributeValueLengthLimit))) - && ((this.attributeCountLimit == rhs.attributeCountLimit) - || ((this.attributeCountLimit != null) - && this.attributeCountLimit.equals(rhs.attributeCountLimit)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeNameValueModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeNameValueModel.java index 77762836576..919dba5ea67 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeNameValueModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeNameValueModel.java @@ -14,13 +14,11 @@ import java.util.HashMap; import java.util.Map; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"name", "value", "type"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class AttributeNameValueModel { /** @@ -30,7 +28,7 @@ public class AttributeNameValueModel { */ @JsonProperty("name") @JsonPropertyDescription("The attribute name.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private String name; /** @@ -42,12 +40,11 @@ public class AttributeNameValueModel { @JsonProperty("value") @JsonPropertyDescription( "The attribute value.\nThe type of value must match .type.\nProperty must be present, but if null the entry is ignored.\n") - @Nonnull + @Nullable private Object value; - /** (Can be null) */ - @Nullable @JsonProperty("type") + @Nullable private AttributeNameValueModel.AttributeType type; /** @@ -96,56 +93,43 @@ public AttributeNameValueModel withType(AttributeNameValueModel.AttributeType ty @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(AttributeNameValueModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null) ? "" : this.name)); - sb.append(','); - sb.append("value"); - sb.append('='); - sb.append(((this.value == null) ? "" : this.value)); - sb.append(','); - sb.append("type"); - sb.append('='); - sb.append(((this.type == null) ? "" : this.type)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "AttributeNameValueModel{" + + "name=" + + name + + ", value=" + + value + + ", type=" + + type + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); - result = ((result * 31) + ((this.type == null) ? 0 : this.type.hashCode())); - result = ((result * 31) + ((this.value == null) ? 0 : this.value.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.name == null) ? 0 : this.name.hashCode(); + h *= 1000003; + h ^= (this.value == null) ? 0 : this.value.hashCode(); + h *= 1000003; + h ^= (this.type == null) ? 0 : this.type.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof AttributeNameValueModel) == false) { - return false; + if (o instanceof AttributeNameValueModel) { + AttributeNameValueModel that = (AttributeNameValueModel) o; + return (this.name == null ? that.name == null : this.name.equals(that.name)) + && (this.value == null ? that.value == null : this.value.equals(that.value)) + && (this.type == null ? that.type == null : this.type.equals(that.type)); } - AttributeNameValueModel rhs = ((AttributeNameValueModel) other); - return ((((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) - && ((this.type == rhs.type) || ((this.type != null) && this.type.equals(rhs.type)))) - && ((this.value == rhs.value) || ((this.value != null) && this.value.equals(rhs.value)))); + return false; } @Generated("jsonschema2pojo") - @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum AttributeType { STRING("string"), BOOL("bool"), diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3MultiPropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3MultiPropagatorModel.java index ff4405cfc98..f4d61443dc1 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3MultiPropagatorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3MultiPropagatorModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class B3MultiPropagatorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(B3MultiPropagatorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "B3MultiPropagatorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof B3MultiPropagatorModel) == false) { - return false; + if (o instanceof B3MultiPropagatorModel) { + B3MultiPropagatorModel that = (B3MultiPropagatorModel) o; + return true; } - B3MultiPropagatorModel rhs = ((B3MultiPropagatorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3PropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3PropagatorModel.java index aa40b3086ed..78a2f24eba9 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3PropagatorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3PropagatorModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class B3PropagatorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(B3PropagatorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "B3PropagatorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof B3PropagatorModel) == false) { - return false; + if (o instanceof B3PropagatorModel) { + B3PropagatorModel that = (B3PropagatorModel) o; + return true; } - B3PropagatorModel rhs = ((B3PropagatorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BaggagePropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BaggagePropagatorModel.java index 990522a652c..8db9759a7f4 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BaggagePropagatorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BaggagePropagatorModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class BaggagePropagatorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(BaggagePropagatorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "BaggagePropagatorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof BaggagePropagatorModel) == false) { - return false; + if (o instanceof BaggagePropagatorModel) { + BaggagePropagatorModel that = (BaggagePropagatorModel) o; + return true; } - BaggagePropagatorModel rhs = ((BaggagePropagatorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/Base2ExponentialBucketHistogramAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/Base2ExponentialBucketHistogramAggregationModel.java index cb82c537d11..751b12e361c 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/Base2ExponentialBucketHistogramAggregationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/Base2ExponentialBucketHistogramAggregationModel.java @@ -15,40 +15,29 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"max_scale", "max_size", "record_min_max"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class Base2ExponentialBucketHistogramAggregationModel { - /** - * Configure the max scale factor. If omitted or null, 20 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure the max scale factor. If omitted or null, 20 is used. */ @JsonProperty("max_scale") @JsonPropertyDescription("Configure the max scale factor.\nIf omitted or null, 20 is used.\n") + @Nullable private Integer maxScale; /** * Configure the maximum number of buckets in each of the positive and negative ranges, not * counting the special zero bucket. If omitted or null, 160 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("max_size") @JsonPropertyDescription( "Configure the maximum number of buckets in each of the positive and negative ranges, not counting the special zero bucket.\nIf omitted or null, 160 is used.\n") + @Nullable private Integer maxSize; - /** - * Configure whether or not to record min and max. If omitted or null, true is used. - * - *

(Can be null) - */ - @Nullable + /** Configure whether or not to record min and max. If omitted or null, true is used. */ @JsonProperty("record_min_max") @JsonPropertyDescription( "Configure whether or not to record min and max.\nIf omitted or null, true is used.\n") + @Nullable private Boolean recordMinMax; /** Configure the max scale factor. If omitted or null, 20 is used. */ @@ -92,55 +81,42 @@ public Base2ExponentialBucketHistogramAggregationModel withRecordMinMax(Boolean @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(Base2ExponentialBucketHistogramAggregationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("maxScale"); - sb.append('='); - sb.append(((this.maxScale == null) ? "" : this.maxScale)); - sb.append(','); - sb.append("maxSize"); - sb.append('='); - sb.append(((this.maxSize == null) ? "" : this.maxSize)); - sb.append(','); - sb.append("recordMinMax"); - sb.append('='); - sb.append(((this.recordMinMax == null) ? "" : this.recordMinMax)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "Base2ExponentialBucketHistogramAggregationModel{" + + "maxScale=" + + maxScale + + ", maxSize=" + + maxSize + + ", recordMinMax=" + + recordMinMax + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.maxScale == null) ? 0 : this.maxScale.hashCode())); - result = ((result * 31) + ((this.recordMinMax == null) ? 0 : this.recordMinMax.hashCode())); - result = ((result * 31) + ((this.maxSize == null) ? 0 : this.maxSize.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.maxScale == null) ? 0 : this.maxScale.hashCode(); + h *= 1000003; + h ^= (this.maxSize == null) ? 0 : this.maxSize.hashCode(); + h *= 1000003; + h ^= (this.recordMinMax == null) ? 0 : this.recordMinMax.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof Base2ExponentialBucketHistogramAggregationModel) == false) { - return false; + if (o instanceof Base2ExponentialBucketHistogramAggregationModel) { + Base2ExponentialBucketHistogramAggregationModel that = + (Base2ExponentialBucketHistogramAggregationModel) o; + return (this.maxScale == null ? that.maxScale == null : this.maxScale.equals(that.maxScale)) + && (this.maxSize == null ? that.maxSize == null : this.maxSize.equals(that.maxSize)) + && (this.recordMinMax == null + ? that.recordMinMax == null + : this.recordMinMax.equals(that.recordMinMax)); } - Base2ExponentialBucketHistogramAggregationModel rhs = - ((Base2ExponentialBucketHistogramAggregationModel) other); - return ((((this.maxScale == rhs.maxScale) - || ((this.maxScale != null) && this.maxScale.equals(rhs.maxScale))) - && ((this.recordMinMax == rhs.recordMinMax) - || ((this.recordMinMax != null) && this.recordMinMax.equals(rhs.recordMinMax)))) - && ((this.maxSize == rhs.maxSize) - || ((this.maxSize != null) && this.maxSize.equals(rhs.maxSize)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchLogRecordProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchLogRecordProcessorModel.java index 73506f8a31d..86802310312 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchLogRecordProcessorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchLogRecordProcessorModel.java @@ -10,7 +10,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @@ -22,58 +21,45 @@ "exporter" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class BatchLogRecordProcessorModel { /** * Configure delay interval (in milliseconds) between two consecutive exports. Value must be * non-negative. If omitted or null, 1000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("schedule_delay") @JsonPropertyDescription( "Configure delay interval (in milliseconds) between two consecutive exports. \nValue must be non-negative.\nIf omitted or null, 1000 is used.\n") + @Nullable private Integer scheduleDelay; /** * Configure maximum allowed time (in milliseconds) to export data. Value must be non-negative. A * value of 0 indicates no limit (infinity). If omitted or null, 30000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("export_timeout") @JsonPropertyDescription( "Configure maximum allowed time (in milliseconds) to export data. \nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 30000 is used.\n") + @Nullable private Integer exportTimeout; - /** - * Configure maximum queue size. Value must be positive. If omitted or null, 2048 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure maximum queue size. Value must be positive. If omitted or null, 2048 is used. */ @JsonProperty("max_queue_size") @JsonPropertyDescription( "Configure maximum queue size. Value must be positive.\nIf omitted or null, 2048 is used.\n") + @Nullable private Integer maxQueueSize; - /** - * Configure maximum batch size. Value must be positive. If omitted or null, 512 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure maximum batch size. Value must be positive. If omitted or null, 512 is used. */ @JsonProperty("max_export_batch_size") @JsonPropertyDescription( "Configure maximum batch size. Value must be positive.\nIf omitted or null, 512 is used.\n") + @Nullable private Integer maxExportBatchSize; /** (Required) */ @JsonProperty("exporter") - @Nonnull + @Nullable private LogRecordExporterModel exporter; /** @@ -144,73 +130,57 @@ public BatchLogRecordProcessorModel withExporter(LogRecordExporterModel exporter @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(BatchLogRecordProcessorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("scheduleDelay"); - sb.append('='); - sb.append(((this.scheduleDelay == null) ? "" : this.scheduleDelay)); - sb.append(','); - sb.append("exportTimeout"); - sb.append('='); - sb.append(((this.exportTimeout == null) ? "" : this.exportTimeout)); - sb.append(','); - sb.append("maxQueueSize"); - sb.append('='); - sb.append(((this.maxQueueSize == null) ? "" : this.maxQueueSize)); - sb.append(','); - sb.append("maxExportBatchSize"); - sb.append('='); - sb.append(((this.maxExportBatchSize == null) ? "" : this.maxExportBatchSize)); - sb.append(','); - sb.append("exporter"); - sb.append('='); - sb.append(((this.exporter == null) ? "" : this.exporter)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "BatchLogRecordProcessorModel{" + + "scheduleDelay=" + + scheduleDelay + + ", exportTimeout=" + + exportTimeout + + ", maxQueueSize=" + + maxQueueSize + + ", maxExportBatchSize=" + + maxExportBatchSize + + ", exporter=" + + exporter + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.scheduleDelay == null) ? 0 : this.scheduleDelay.hashCode())); - result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); - result = ((result * 31) + ((this.exportTimeout == null) ? 0 : this.exportTimeout.hashCode())); - result = - ((result * 31) - + ((this.maxExportBatchSize == null) ? 0 : this.maxExportBatchSize.hashCode())); - result = ((result * 31) + ((this.maxQueueSize == null) ? 0 : this.maxQueueSize.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.scheduleDelay == null) ? 0 : this.scheduleDelay.hashCode(); + h *= 1000003; + h ^= (this.exportTimeout == null) ? 0 : this.exportTimeout.hashCode(); + h *= 1000003; + h ^= (this.maxQueueSize == null) ? 0 : this.maxQueueSize.hashCode(); + h *= 1000003; + h ^= (this.maxExportBatchSize == null) ? 0 : this.maxExportBatchSize.hashCode(); + h *= 1000003; + h ^= (this.exporter == null) ? 0 : this.exporter.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof BatchLogRecordProcessorModel) == false) { - return false; + if (o instanceof BatchLogRecordProcessorModel) { + BatchLogRecordProcessorModel that = (BatchLogRecordProcessorModel) o; + return (this.scheduleDelay == null + ? that.scheduleDelay == null + : this.scheduleDelay.equals(that.scheduleDelay)) + && (this.exportTimeout == null + ? that.exportTimeout == null + : this.exportTimeout.equals(that.exportTimeout)) + && (this.maxQueueSize == null + ? that.maxQueueSize == null + : this.maxQueueSize.equals(that.maxQueueSize)) + && (this.maxExportBatchSize == null + ? that.maxExportBatchSize == null + : this.maxExportBatchSize.equals(that.maxExportBatchSize)) + && (this.exporter == null ? that.exporter == null : this.exporter.equals(that.exporter)); } - BatchLogRecordProcessorModel rhs = ((BatchLogRecordProcessorModel) other); - return ((((((this.scheduleDelay == rhs.scheduleDelay) - || ((this.scheduleDelay != null) - && this.scheduleDelay.equals(rhs.scheduleDelay))) - && ((this.exporter == rhs.exporter) - || ((this.exporter != null) && this.exporter.equals(rhs.exporter)))) - && ((this.exportTimeout == rhs.exportTimeout) - || ((this.exportTimeout != null) - && this.exportTimeout.equals(rhs.exportTimeout)))) - && ((this.maxExportBatchSize == rhs.maxExportBatchSize) - || ((this.maxExportBatchSize != null) - && this.maxExportBatchSize.equals(rhs.maxExportBatchSize)))) - && ((this.maxQueueSize == rhs.maxQueueSize) - || ((this.maxQueueSize != null) && this.maxQueueSize.equals(rhs.maxQueueSize)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchSpanProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchSpanProcessorModel.java index 3a074ae0a98..c14f2ab98b8 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchSpanProcessorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchSpanProcessorModel.java @@ -10,7 +10,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @@ -22,58 +21,45 @@ "exporter" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class BatchSpanProcessorModel { /** * Configure delay interval (in milliseconds) between two consecutive exports. Value must be * non-negative. If omitted or null, 5000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("schedule_delay") @JsonPropertyDescription( "Configure delay interval (in milliseconds) between two consecutive exports. \nValue must be non-negative.\nIf omitted or null, 5000 is used.\n") + @Nullable private Integer scheduleDelay; /** * Configure maximum allowed time (in milliseconds) to export data. Value must be non-negative. A * value of 0 indicates no limit (infinity). If omitted or null, 30000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("export_timeout") @JsonPropertyDescription( "Configure maximum allowed time (in milliseconds) to export data. \nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 30000 is used.\n") + @Nullable private Integer exportTimeout; - /** - * Configure maximum queue size. Value must be positive. If omitted or null, 2048 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure maximum queue size. Value must be positive. If omitted or null, 2048 is used. */ @JsonProperty("max_queue_size") @JsonPropertyDescription( "Configure maximum queue size. Value must be positive.\nIf omitted or null, 2048 is used.\n") + @Nullable private Integer maxQueueSize; - /** - * Configure maximum batch size. Value must be positive. If omitted or null, 512 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure maximum batch size. Value must be positive. If omitted or null, 512 is used. */ @JsonProperty("max_export_batch_size") @JsonPropertyDescription( "Configure maximum batch size. Value must be positive.\nIf omitted or null, 512 is used.\n") + @Nullable private Integer maxExportBatchSize; /** (Required) */ @JsonProperty("exporter") - @Nonnull + @Nullable private SpanExporterModel exporter; /** @@ -144,73 +130,57 @@ public BatchSpanProcessorModel withExporter(SpanExporterModel exporter) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(BatchSpanProcessorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("scheduleDelay"); - sb.append('='); - sb.append(((this.scheduleDelay == null) ? "" : this.scheduleDelay)); - sb.append(','); - sb.append("exportTimeout"); - sb.append('='); - sb.append(((this.exportTimeout == null) ? "" : this.exportTimeout)); - sb.append(','); - sb.append("maxQueueSize"); - sb.append('='); - sb.append(((this.maxQueueSize == null) ? "" : this.maxQueueSize)); - sb.append(','); - sb.append("maxExportBatchSize"); - sb.append('='); - sb.append(((this.maxExportBatchSize == null) ? "" : this.maxExportBatchSize)); - sb.append(','); - sb.append("exporter"); - sb.append('='); - sb.append(((this.exporter == null) ? "" : this.exporter)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "BatchSpanProcessorModel{" + + "scheduleDelay=" + + scheduleDelay + + ", exportTimeout=" + + exportTimeout + + ", maxQueueSize=" + + maxQueueSize + + ", maxExportBatchSize=" + + maxExportBatchSize + + ", exporter=" + + exporter + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.scheduleDelay == null) ? 0 : this.scheduleDelay.hashCode())); - result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); - result = ((result * 31) + ((this.exportTimeout == null) ? 0 : this.exportTimeout.hashCode())); - result = - ((result * 31) - + ((this.maxExportBatchSize == null) ? 0 : this.maxExportBatchSize.hashCode())); - result = ((result * 31) + ((this.maxQueueSize == null) ? 0 : this.maxQueueSize.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.scheduleDelay == null) ? 0 : this.scheduleDelay.hashCode(); + h *= 1000003; + h ^= (this.exportTimeout == null) ? 0 : this.exportTimeout.hashCode(); + h *= 1000003; + h ^= (this.maxQueueSize == null) ? 0 : this.maxQueueSize.hashCode(); + h *= 1000003; + h ^= (this.maxExportBatchSize == null) ? 0 : this.maxExportBatchSize.hashCode(); + h *= 1000003; + h ^= (this.exporter == null) ? 0 : this.exporter.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof BatchSpanProcessorModel) == false) { - return false; + if (o instanceof BatchSpanProcessorModel) { + BatchSpanProcessorModel that = (BatchSpanProcessorModel) o; + return (this.scheduleDelay == null + ? that.scheduleDelay == null + : this.scheduleDelay.equals(that.scheduleDelay)) + && (this.exportTimeout == null + ? that.exportTimeout == null + : this.exportTimeout.equals(that.exportTimeout)) + && (this.maxQueueSize == null + ? that.maxQueueSize == null + : this.maxQueueSize.equals(that.maxQueueSize)) + && (this.maxExportBatchSize == null + ? that.maxExportBatchSize == null + : this.maxExportBatchSize.equals(that.maxExportBatchSize)) + && (this.exporter == null ? that.exporter == null : this.exporter.equals(that.exporter)); } - BatchSpanProcessorModel rhs = ((BatchSpanProcessorModel) other); - return ((((((this.scheduleDelay == rhs.scheduleDelay) - || ((this.scheduleDelay != null) - && this.scheduleDelay.equals(rhs.scheduleDelay))) - && ((this.exporter == rhs.exporter) - || ((this.exporter != null) && this.exporter.equals(rhs.exporter)))) - && ((this.exportTimeout == rhs.exportTimeout) - || ((this.exportTimeout != null) - && this.exportTimeout.equals(rhs.exportTimeout)))) - && ((this.maxExportBatchSize == rhs.maxExportBatchSize) - || ((this.maxExportBatchSize != null) - && this.maxExportBatchSize.equals(rhs.maxExportBatchSize)))) - && ((this.maxQueueSize == rhs.maxQueueSize) - || ((this.maxQueueSize != null) && this.maxQueueSize.equals(rhs.maxQueueSize)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/CardinalityLimitsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/CardinalityLimitsModel.java index b828258dd78..43bfb74aae2 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/CardinalityLimitsModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/CardinalityLimitsModel.java @@ -24,103 +24,86 @@ "up_down_counter" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class CardinalityLimitsModel { /** * Configure default cardinality limit for all instrument types. Instrument-specific cardinality * limits take priority. If omitted or null, 2000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("default") @JsonPropertyDescription( "Configure default cardinality limit for all instrument types.\nInstrument-specific cardinality limits take priority.\nIf omitted or null, 2000 is used.\n") + @Nullable private Integer _default; /** * Configure default cardinality limit for counter instruments. If omitted or null, the value from * .default is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("counter") @JsonPropertyDescription( "Configure default cardinality limit for counter instruments.\nIf omitted or null, the value from .default is used.\n") + @Nullable private Integer counter; /** * Configure default cardinality limit for gauge instruments. If omitted or null, the value from * .default is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("gauge") @JsonPropertyDescription( "Configure default cardinality limit for gauge instruments.\nIf omitted or null, the value from .default is used.\n") + @Nullable private Integer gauge; /** * Configure default cardinality limit for histogram instruments. If omitted or null, the value * from .default is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("histogram") @JsonPropertyDescription( "Configure default cardinality limit for histogram instruments.\nIf omitted or null, the value from .default is used.\n") + @Nullable private Integer histogram; /** * Configure default cardinality limit for observable_counter instruments. If omitted or null, the * value from .default is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("observable_counter") @JsonPropertyDescription( "Configure default cardinality limit for observable_counter instruments.\nIf omitted or null, the value from .default is used.\n") + @Nullable private Integer observableCounter; /** * Configure default cardinality limit for observable_gauge instruments. If omitted or null, the * value from .default is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("observable_gauge") @JsonPropertyDescription( "Configure default cardinality limit for observable_gauge instruments.\nIf omitted or null, the value from .default is used.\n") + @Nullable private Integer observableGauge; /** * Configure default cardinality limit for observable_up_down_counter instruments. If omitted or * null, the value from .default is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("observable_up_down_counter") @JsonPropertyDescription( "Configure default cardinality limit for observable_up_down_counter instruments.\nIf omitted or null, the value from .default is used.\n") + @Nullable private Integer observableUpDownCounter; /** * Configure default cardinality limit for up_down_counter instruments. If omitted or null, the * value from .default is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("up_down_counter") @JsonPropertyDescription( "Configure default cardinality limit for up_down_counter instruments.\nIf omitted or null, the value from .default is used.\n") + @Nullable private Integer upDownCounter; /** @@ -245,100 +228,74 @@ public CardinalityLimitsModel withUpDownCounter(Integer upDownCounter) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(CardinalityLimitsModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("_default"); - sb.append('='); - sb.append(((this._default == null) ? "" : this._default)); - sb.append(','); - sb.append("counter"); - sb.append('='); - sb.append(((this.counter == null) ? "" : this.counter)); - sb.append(','); - sb.append("gauge"); - sb.append('='); - sb.append(((this.gauge == null) ? "" : this.gauge)); - sb.append(','); - sb.append("histogram"); - sb.append('='); - sb.append(((this.histogram == null) ? "" : this.histogram)); - sb.append(','); - sb.append("observableCounter"); - sb.append('='); - sb.append(((this.observableCounter == null) ? "" : this.observableCounter)); - sb.append(','); - sb.append("observableGauge"); - sb.append('='); - sb.append(((this.observableGauge == null) ? "" : this.observableGauge)); - sb.append(','); - sb.append("observableUpDownCounter"); - sb.append('='); - sb.append(((this.observableUpDownCounter == null) ? "" : this.observableUpDownCounter)); - sb.append(','); - sb.append("upDownCounter"); - sb.append('='); - sb.append(((this.upDownCounter == null) ? "" : this.upDownCounter)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "CardinalityLimitsModel{" + + "_default=" + + _default + + ", counter=" + + counter + + ", gauge=" + + gauge + + ", histogram=" + + histogram + + ", observableCounter=" + + observableCounter + + ", observableGauge=" + + observableGauge + + ", observableUpDownCounter=" + + observableUpDownCounter + + ", upDownCounter=" + + upDownCounter + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.gauge == null) ? 0 : this.gauge.hashCode())); - result = ((result * 31) + ((this.histogram == null) ? 0 : this.histogram.hashCode())); - result = ((result * 31) + ((this._default == null) ? 0 : this._default.hashCode())); - result = - ((result * 31) + ((this.observableGauge == null) ? 0 : this.observableGauge.hashCode())); - result = ((result * 31) + ((this.counter == null) ? 0 : this.counter.hashCode())); - result = - ((result * 31) - + ((this.observableUpDownCounter == null) - ? 0 - : this.observableUpDownCounter.hashCode())); - result = - ((result * 31) - + ((this.observableCounter == null) ? 0 : this.observableCounter.hashCode())); - result = ((result * 31) + ((this.upDownCounter == null) ? 0 : this.upDownCounter.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this._default == null) ? 0 : this._default.hashCode(); + h *= 1000003; + h ^= (this.counter == null) ? 0 : this.counter.hashCode(); + h *= 1000003; + h ^= (this.gauge == null) ? 0 : this.gauge.hashCode(); + h *= 1000003; + h ^= (this.histogram == null) ? 0 : this.histogram.hashCode(); + h *= 1000003; + h ^= (this.observableCounter == null) ? 0 : this.observableCounter.hashCode(); + h *= 1000003; + h ^= (this.observableGauge == null) ? 0 : this.observableGauge.hashCode(); + h *= 1000003; + h ^= (this.observableUpDownCounter == null) ? 0 : this.observableUpDownCounter.hashCode(); + h *= 1000003; + h ^= (this.upDownCounter == null) ? 0 : this.upDownCounter.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof CardinalityLimitsModel) == false) { - return false; + if (o instanceof CardinalityLimitsModel) { + CardinalityLimitsModel that = (CardinalityLimitsModel) o; + return (this._default == null ? that._default == null : this._default.equals(that._default)) + && (this.counter == null ? that.counter == null : this.counter.equals(that.counter)) + && (this.gauge == null ? that.gauge == null : this.gauge.equals(that.gauge)) + && (this.histogram == null + ? that.histogram == null + : this.histogram.equals(that.histogram)) + && (this.observableCounter == null + ? that.observableCounter == null + : this.observableCounter.equals(that.observableCounter)) + && (this.observableGauge == null + ? that.observableGauge == null + : this.observableGauge.equals(that.observableGauge)) + && (this.observableUpDownCounter == null + ? that.observableUpDownCounter == null + : this.observableUpDownCounter.equals(that.observableUpDownCounter)) + && (this.upDownCounter == null + ? that.upDownCounter == null + : this.upDownCounter.equals(that.upDownCounter)); } - CardinalityLimitsModel rhs = ((CardinalityLimitsModel) other); - return (((((((((this.gauge == rhs.gauge) - || ((this.gauge != null) && this.gauge.equals(rhs.gauge))) - && ((this.histogram == rhs.histogram) - || ((this.histogram != null) - && this.histogram.equals(rhs.histogram)))) - && ((this._default == rhs._default) - || ((this._default != null) && this._default.equals(rhs._default)))) - && ((this.observableGauge == rhs.observableGauge) - || ((this.observableGauge != null) - && this.observableGauge.equals(rhs.observableGauge)))) - && ((this.counter == rhs.counter) - || ((this.counter != null) && this.counter.equals(rhs.counter)))) - && ((this.observableUpDownCounter == rhs.observableUpDownCounter) - || ((this.observableUpDownCounter != null) - && this.observableUpDownCounter.equals(rhs.observableUpDownCounter)))) - && ((this.observableCounter == rhs.observableCounter) - || ((this.observableCounter != null) - && this.observableCounter.equals(rhs.observableCounter)))) - && ((this.upDownCounter == rhs.upDownCounter) - || ((this.upDownCounter != null) && this.upDownCounter.equals(rhs.upDownCounter)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleExporterModel.java index c551dc76e49..bbd1028d657 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleExporterModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ConsoleExporterModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ConsoleExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ConsoleExporterModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ConsoleExporterModel) == false) { - return false; + if (o instanceof ConsoleExporterModel) { + ConsoleExporterModel that = (ConsoleExporterModel) o; + return true; } - ConsoleExporterModel rhs = ((ConsoleExporterModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleMetricExporterModel.java index 3a1d79214b2..ac732bc0ad2 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleMetricExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleMetricExporterModel.java @@ -14,17 +14,14 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"temporality_preference", "default_histogram_aggregation"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ConsoleMetricExporterModel { - /** (Can be null) */ - @Nullable @JsonProperty("temporality_preference") + @Nullable private OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference; - /** (Can be null) */ - @Nullable @JsonProperty("default_histogram_aggregation") + @Nullable private OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation defaultHistogramAggregation; @@ -55,56 +52,41 @@ public ConsoleMetricExporterModel withDefaultHistogramAggregation( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ConsoleMetricExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("temporalityPreference"); - sb.append('='); - sb.append(((this.temporalityPreference == null) ? "" : this.temporalityPreference)); - sb.append(','); - sb.append("defaultHistogramAggregation"); - sb.append('='); - sb.append( - ((this.defaultHistogramAggregation == null) ? "" : this.defaultHistogramAggregation)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ConsoleMetricExporterModel{" + + "temporalityPreference=" + + temporalityPreference + + ", defaultHistogramAggregation=" + + defaultHistogramAggregation + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode())); - result = - ((result * 31) - + ((this.defaultHistogramAggregation == null) - ? 0 - : this.defaultHistogramAggregation.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode(); + h *= 1000003; + h ^= + (this.defaultHistogramAggregation == null) + ? 0 + : this.defaultHistogramAggregation.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ConsoleMetricExporterModel) == false) { - return false; + if (o instanceof ConsoleMetricExporterModel) { + ConsoleMetricExporterModel that = (ConsoleMetricExporterModel) o; + return (this.temporalityPreference == null + ? that.temporalityPreference == null + : this.temporalityPreference.equals(that.temporalityPreference)) + && (this.defaultHistogramAggregation == null + ? that.defaultHistogramAggregation == null + : this.defaultHistogramAggregation.equals(that.defaultHistogramAggregation)); } - ConsoleMetricExporterModel rhs = ((ConsoleMetricExporterModel) other); - return (((this.temporalityPreference == rhs.temporalityPreference) - || ((this.temporalityPreference != null) - && this.temporalityPreference.equals(rhs.temporalityPreference))) - && ((this.defaultHistogramAggregation == rhs.defaultHistogramAggregation) - || ((this.defaultHistogramAggregation != null) - && this.defaultHistogramAggregation.equals(rhs.defaultHistogramAggregation)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DefaultAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DefaultAggregationModel.java index af37f448a39..e56de199f29 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DefaultAggregationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DefaultAggregationModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class DefaultAggregationModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DefaultAggregationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "DefaultAggregationModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof DefaultAggregationModel) == false) { - return false; + if (o instanceof DefaultAggregationModel) { + DefaultAggregationModel that = (DefaultAggregationModel) o; + return true; } - DefaultAggregationModel rhs = ((DefaultAggregationModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionModel.java index 8a782cd1bfe..9cdef41afbf 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class DistributionModel { @JsonIgnore @@ -41,43 +41,28 @@ public DistributionModel withAdditionalProperty(String name, DistributionPropert @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DistributionModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "DistributionModel{" + "additionalProperties=" + additionalProperties + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof DistributionModel) == false) { - return false; + if (o instanceof DistributionModel) { + DistributionModel that = (DistributionModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - DistributionModel rhs = ((DistributionModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionPropertyModel.java index 5006d6e6aa2..d54f7de6c74 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class DistributionPropertyModel { @JsonIgnore @@ -40,43 +40,28 @@ public DistributionPropertyModel withAdditionalProperty(String name, Object valu @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DistributionPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "DistributionPropertyModel{" + "additionalProperties=" + additionalProperties + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof DistributionPropertyModel) == false) { - return false; + if (o instanceof DistributionPropertyModel) { + DistributionPropertyModel that = (DistributionPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - DistributionPropertyModel rhs = ((DistributionPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DropAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DropAggregationModel.java index d46490b3866..ededb140f95 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DropAggregationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DropAggregationModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class DropAggregationModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(DropAggregationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "DropAggregationModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof DropAggregationModel) == false) { - return false; + if (o instanceof DropAggregationModel) { + DropAggregationModel that = (DropAggregationModel) o; + return true; } - DropAggregationModel rhs = ((DropAggregationModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalCodeInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalCodeInstrumentationModel.java index 49eff9f4775..26866771803 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalCodeInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalCodeInstrumentationModel.java @@ -14,12 +14,10 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"semconv"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalCodeInstrumentationModel { - /** (Can be null) */ - @Nullable @JsonProperty("semconv") + @Nullable private ExperimentalSemconvConfigModel semconv; @JsonProperty("semconv") @@ -35,40 +33,26 @@ public ExperimentalCodeInstrumentationModel withSemconv(ExperimentalSemconvConfi @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalCodeInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("semconv"); - sb.append('='); - sb.append(((this.semconv == null) ? "" : this.semconv)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalCodeInstrumentationModel{" + "semconv=" + semconv + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.semconv == null) ? 0 : this.semconv.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalCodeInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalCodeInstrumentationModel) { + ExperimentalCodeInstrumentationModel that = (ExperimentalCodeInstrumentationModel) o; + return (this.semconv == null ? that.semconv == null : this.semconv.equals(that.semconv)); } - ExperimentalCodeInstrumentationModel rhs = ((ExperimentalCodeInstrumentationModel) other); - return ((this.semconv == rhs.semconv) - || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOffSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOffSamplerModel.java index 178b9f69f73..cc7410f857c 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOffSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOffSamplerModel.java @@ -8,44 +8,34 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableAlwaysOffSamplerModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableAlwaysOffSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableAlwaysOffSamplerModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableAlwaysOffSamplerModel) == false) { - return false; + if (o instanceof ExperimentalComposableAlwaysOffSamplerModel) { + ExperimentalComposableAlwaysOffSamplerModel that = + (ExperimentalComposableAlwaysOffSamplerModel) o; + return true; } - ExperimentalComposableAlwaysOffSamplerModel rhs = - ((ExperimentalComposableAlwaysOffSamplerModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOnSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOnSamplerModel.java index f630a30307a..2fe199525f8 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOnSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOnSamplerModel.java @@ -8,44 +8,34 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableAlwaysOnSamplerModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableAlwaysOnSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableAlwaysOnSamplerModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableAlwaysOnSamplerModel) == false) { - return false; + if (o instanceof ExperimentalComposableAlwaysOnSamplerModel) { + ExperimentalComposableAlwaysOnSamplerModel that = + (ExperimentalComposableAlwaysOnSamplerModel) o; + return true; } - ExperimentalComposableAlwaysOnSamplerModel rhs = - ((ExperimentalComposableAlwaysOnSamplerModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableParentThresholdSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableParentThresholdSamplerModel.java index 129219e9d5a..5ed8a4132b4 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableParentThresholdSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableParentThresholdSamplerModel.java @@ -9,18 +9,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"root"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableParentThresholdSamplerModel { /** (Required) */ @JsonProperty("root") - @Nonnull + @Nullable private ExperimentalComposableSamplerModel root; /** (Required) */ @@ -38,40 +36,27 @@ public ExperimentalComposableParentThresholdSamplerModel withRoot( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableParentThresholdSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("root"); - sb.append('='); - sb.append(((this.root == null) ? "" : this.root)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableParentThresholdSamplerModel{" + "root=" + root + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.root == null) ? 0 : this.root.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.root == null) ? 0 : this.root.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableParentThresholdSamplerModel) == false) { - return false; + if (o instanceof ExperimentalComposableParentThresholdSamplerModel) { + ExperimentalComposableParentThresholdSamplerModel that = + (ExperimentalComposableParentThresholdSamplerModel) o; + return (this.root == null ? that.root == null : this.root.equals(that.root)); } - ExperimentalComposableParentThresholdSamplerModel rhs = - ((ExperimentalComposableParentThresholdSamplerModel) other); - return ((this.root == rhs.root) || ((this.root != null) && this.root.equals(rhs.root))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableProbabilitySamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableProbabilitySamplerModel.java index bcb656cd002..575e994f058 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableProbabilitySamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableProbabilitySamplerModel.java @@ -15,17 +15,12 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"ratio"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableProbabilitySamplerModel { - /** - * Configure ratio. If omitted or null, 1.0 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure ratio. If omitted or null, 1.0 is used. */ @JsonProperty("ratio") @JsonPropertyDescription("Configure ratio.\nIf omitted or null, 1.0 is used.\n") + @Nullable private Double ratio; /** Configure ratio. If omitted or null, 1.0 is used. */ @@ -42,40 +37,27 @@ public ExperimentalComposableProbabilitySamplerModel withRatio(Double ratio) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableProbabilitySamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("ratio"); - sb.append('='); - sb.append(((this.ratio == null) ? "" : this.ratio)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableProbabilitySamplerModel{" + "ratio=" + ratio + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.ratio == null) ? 0 : this.ratio.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.ratio == null) ? 0 : this.ratio.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableProbabilitySamplerModel) == false) { - return false; + if (o instanceof ExperimentalComposableProbabilitySamplerModel) { + ExperimentalComposableProbabilitySamplerModel that = + (ExperimentalComposableProbabilitySamplerModel) o; + return (this.ratio == null ? that.ratio == null : this.ratio.equals(that.ratio)); } - ExperimentalComposableProbabilitySamplerModel rhs = - ((ExperimentalComposableProbabilitySamplerModel) other); - return ((this.ratio == rhs.ratio) || ((this.ratio != null) && this.ratio.equals(rhs.ratio))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerModel.java index ef2eb094c86..0f39145a994 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerModel.java @@ -16,7 +16,6 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"rules"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableRuleBasedSamplerModel { /** @@ -24,13 +23,11 @@ public class ExperimentalComposableRuleBasedSamplerModel { * conditions must match for the rule to match. If no conditions are specified, the rule matches * all spans that reach it. If no rules match, the span is not sampled. If omitted, no span is * sampled. - * - *

(Can be null) */ - @Nullable @JsonProperty("rules") @JsonPropertyDescription( "The rules for the sampler, matched in order.\nEach rule can have multiple match conditions. All conditions must match for the rule to match.\nIf no conditions are specified, the rule matches all spans that reach it.\nIf no rules match, the span is not sampled.\nIf omitted, no span is sampled.\n") + @Nullable private List rules; /** @@ -53,40 +50,27 @@ public ExperimentalComposableRuleBasedSamplerModel withRules( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableRuleBasedSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("rules"); - sb.append('='); - sb.append(((this.rules == null) ? "" : this.rules)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableRuleBasedSamplerModel{" + "rules=" + rules + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.rules == null) ? 0 : this.rules.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.rules == null) ? 0 : this.rules.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableRuleBasedSamplerModel) == false) { - return false; + if (o instanceof ExperimentalComposableRuleBasedSamplerModel) { + ExperimentalComposableRuleBasedSamplerModel that = + (ExperimentalComposableRuleBasedSamplerModel) o; + return (this.rules == null ? that.rules == null : this.rules.equals(that.rules)); } - ExperimentalComposableRuleBasedSamplerModel rhs = - ((ExperimentalComposableRuleBasedSamplerModel) other); - return ((this.rules == rhs.rules) || ((this.rules != null) && this.rules.equals(rhs.rules))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.java index a22593994fa..0283fa97ea4 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.java @@ -11,13 +11,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.List; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"key", "included", "excluded"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel { /** @@ -28,7 +26,7 @@ public class ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel { @JsonProperty("key") @JsonPropertyDescription( "The attribute key to match against.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private String key; /** @@ -36,13 +34,11 @@ public class ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel { * to match as follows: * If the value exactly matches. * If the value matches the wildcard * pattern, where '?' matches any single character and '*' matches any number of characters * including none. If omitted, all values are included. - * - *

(Can be null) */ - @Nullable @JsonProperty("included") @JsonPropertyDescription( "Configure list of value patterns to include.\nMatching is case-sensitive. Values are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, all values are included.\n") + @Nullable private List included; /** @@ -51,13 +47,11 @@ public class ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel { * * If the value exactly matches. * If the value matches the wildcard pattern, where '?' matches * any single character and '*' matches any number of characters including none. If omitted, * .included attributes are included. - * - *

(Can be null) */ - @Nullable @JsonProperty("excluded") @JsonPropertyDescription( "Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).\nMatching is case-sensitive. Values are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, .included attributes are included.\n") + @Nullable private List excluded; /** @@ -115,55 +109,40 @@ public ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel withExcl @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("key"); - sb.append('='); - sb.append(((this.key == null) ? "" : this.key)); - sb.append(','); - sb.append("included"); - sb.append('='); - sb.append(((this.included == null) ? "" : this.included)); - sb.append(','); - sb.append("excluded"); - sb.append('='); - sb.append(((this.excluded == null) ? "" : this.excluded)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel{" + + "key=" + + key + + ", included=" + + included + + ", excluded=" + + excluded + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.excluded == null) ? 0 : this.excluded.hashCode())); - result = ((result * 31) + ((this.included == null) ? 0 : this.included.hashCode())); - result = ((result * 31) + ((this.key == null) ? 0 : this.key.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.key == null) ? 0 : this.key.hashCode(); + h *= 1000003; + h ^= (this.included == null) ? 0 : this.included.hashCode(); + h *= 1000003; + h ^= (this.excluded == null) ? 0 : this.excluded.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel) - == false) { - return false; + if (o instanceof ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel) { + ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel that = + (ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel) o; + return (this.key == null ? that.key == null : this.key.equals(that.key)) + && (this.included == null ? that.included == null : this.included.equals(that.included)) + && (this.excluded == null ? that.excluded == null : this.excluded.equals(that.excluded)); } - ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel rhs = - ((ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel) other); - return ((((this.excluded == rhs.excluded) - || ((this.excluded != null) && this.excluded.equals(rhs.excluded))) - && ((this.included == rhs.included) - || ((this.included != null) && this.included.equals(rhs.included)))) - && ((this.key == rhs.key) || ((this.key != null) && this.key.equals(rhs.key)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.java index 1977565b4b4..9ed87f0bdfe 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.java @@ -11,13 +11,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.List; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"key", "values"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel { /** @@ -28,7 +26,7 @@ public class ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel { @JsonProperty("key") @JsonPropertyDescription( "The attribute key to match against.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private String key; /** @@ -40,7 +38,7 @@ public class ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel { @JsonProperty("values") @JsonPropertyDescription( "The attribute values to match against. If the attribute's value matches any of these, it matches.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private List values; /** @@ -79,48 +77,35 @@ public ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel withValues @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("key"); - sb.append('='); - sb.append(((this.key == null) ? "" : this.key)); - sb.append(','); - sb.append("values"); - sb.append('='); - sb.append(((this.values == null) ? "" : this.values)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel{" + + "key=" + + key + + ", values=" + + values + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.key == null) ? 0 : this.key.hashCode())); - result = ((result * 31) + ((this.values == null) ? 0 : this.values.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.key == null) ? 0 : this.key.hashCode(); + h *= 1000003; + h ^= (this.values == null) ? 0 : this.values.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel) - == false) { - return false; + if (o instanceof ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel) { + ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel that = + (ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel) o; + return (this.key == null ? that.key == null : this.key.equals(that.key)) + && (this.values == null ? that.values == null : this.values.equals(that.values)); } - ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel rhs = - ((ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel) other); - return (((this.key == rhs.key) || ((this.key != null) && this.key.equals(rhs.key))) - && ((this.values == rhs.values) - || ((this.values != null) && this.values.equals(rhs.values)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleModel.java index da677b0e53c..fe52aec7d74 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleModel.java @@ -11,7 +11,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.List; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; /** @@ -22,15 +21,14 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"attribute_values", "attribute_patterns", "span_kinds", "parent", "sampler"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableRuleBasedSamplerRuleModel { - @Nullable @JsonProperty("attribute_values") + @Nullable private ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel attributeValues; - @Nullable @JsonProperty("attribute_patterns") + @Nullable private ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel attributePatterns; /** @@ -38,30 +36,26 @@ public class ExperimentalComposableRuleBasedSamplerRuleModel { * client: client, a client span. * consumer: consumer, a consumer span. * internal: internal, an * internal span. * producer: producer, a producer span. * server: server, a server span. If * omitted, ignore. - * - *

(Can be null) */ - @Nullable @JsonProperty("span_kinds") @JsonPropertyDescription( "The span kinds to match. If the span's kind matches any of these, it matches.\nValues include:\n* client: client, a client span.\n* consumer: consumer, a consumer span.\n* internal: internal, an internal span.\n* producer: producer, a producer span.\n* server: server, a server span.\nIf omitted, ignore.\n") + @Nullable private List spanKinds; /** * The parent span types to match. Values include: * local: local, a local parent. * none: none, * no parent, i.e., the trace root. * remote: remote, a remote parent. If omitted, ignore. - * - *

(Can be null) */ - @Nullable @JsonProperty("parent") @JsonPropertyDescription( "The parent span types to match.\nValues include:\n* local: local, a local parent.\n* none: none, no parent, i.e., the trace root.\n* remote: remote, a remote parent.\nIf omitted, ignore.\n") + @Nullable private List parent; /** (Required) */ @JsonProperty("sampler") - @Nonnull + @Nullable private ExperimentalComposableSamplerModel sampler; @JsonProperty("attribute_values") @@ -136,74 +130,56 @@ public ExperimentalComposableRuleBasedSamplerRuleModel withSampler( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableRuleBasedSamplerRuleModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("attributeValues"); - sb.append('='); - sb.append(((this.attributeValues == null) ? "" : this.attributeValues)); - sb.append(','); - sb.append("attributePatterns"); - sb.append('='); - sb.append(((this.attributePatterns == null) ? "" : this.attributePatterns)); - sb.append(','); - sb.append("spanKinds"); - sb.append('='); - sb.append(((this.spanKinds == null) ? "" : this.spanKinds)); - sb.append(','); - sb.append("parent"); - sb.append('='); - sb.append(((this.parent == null) ? "" : this.parent)); - sb.append(','); - sb.append("sampler"); - sb.append('='); - sb.append(((this.sampler == null) ? "" : this.sampler)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableRuleBasedSamplerRuleModel{" + + "attributeValues=" + + attributeValues + + ", attributePatterns=" + + attributePatterns + + ", spanKinds=" + + spanKinds + + ", parent=" + + parent + + ", sampler=" + + sampler + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) + ((this.attributeValues == null) ? 0 : this.attributeValues.hashCode())); - result = ((result * 31) + ((this.spanKinds == null) ? 0 : this.spanKinds.hashCode())); - result = ((result * 31) + ((this.parent == null) ? 0 : this.parent.hashCode())); - result = - ((result * 31) - + ((this.attributePatterns == null) ? 0 : this.attributePatterns.hashCode())); - result = ((result * 31) + ((this.sampler == null) ? 0 : this.sampler.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.attributeValues == null) ? 0 : this.attributeValues.hashCode(); + h *= 1000003; + h ^= (this.attributePatterns == null) ? 0 : this.attributePatterns.hashCode(); + h *= 1000003; + h ^= (this.spanKinds == null) ? 0 : this.spanKinds.hashCode(); + h *= 1000003; + h ^= (this.parent == null) ? 0 : this.parent.hashCode(); + h *= 1000003; + h ^= (this.sampler == null) ? 0 : this.sampler.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableRuleBasedSamplerRuleModel) == false) { - return false; + if (o instanceof ExperimentalComposableRuleBasedSamplerRuleModel) { + ExperimentalComposableRuleBasedSamplerRuleModel that = + (ExperimentalComposableRuleBasedSamplerRuleModel) o; + return (this.attributeValues == null + ? that.attributeValues == null + : this.attributeValues.equals(that.attributeValues)) + && (this.attributePatterns == null + ? that.attributePatterns == null + : this.attributePatterns.equals(that.attributePatterns)) + && (this.spanKinds == null + ? that.spanKinds == null + : this.spanKinds.equals(that.spanKinds)) + && (this.parent == null ? that.parent == null : this.parent.equals(that.parent)) + && (this.sampler == null ? that.sampler == null : this.sampler.equals(that.sampler)); } - ExperimentalComposableRuleBasedSamplerRuleModel rhs = - ((ExperimentalComposableRuleBasedSamplerRuleModel) other); - return ((((((this.attributeValues == rhs.attributeValues) - || ((this.attributeValues != null) - && this.attributeValues.equals(rhs.attributeValues))) - && ((this.spanKinds == rhs.spanKinds) - || ((this.spanKinds != null) && this.spanKinds.equals(rhs.spanKinds)))) - && ((this.parent == rhs.parent) - || ((this.parent != null) && this.parent.equals(rhs.parent)))) - && ((this.attributePatterns == rhs.attributePatterns) - || ((this.attributePatterns != null) - && this.attributePatterns.equals(rhs.attributePatterns)))) - && ((this.sampler == rhs.sampler) - || ((this.sampler != null) && this.sampler.equals(rhs.sampler)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerModel.java index fb2cab29307..676011f6276 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerModel.java @@ -19,31 +19,26 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"always_off", "always_on", "parent_threshold", "probability", "rule_based"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableSamplerModel { - /** (Can be null) */ - @Nullable @JsonProperty("always_off") + @Nullable private ExperimentalComposableAlwaysOffSamplerModel alwaysOff; - /** (Can be null) */ - @Nullable @JsonProperty("always_on") + @Nullable private ExperimentalComposableAlwaysOnSamplerModel alwaysOn; - @Nullable @JsonProperty("parent_threshold") + @Nullable private ExperimentalComposableParentThresholdSamplerModel parentThreshold; - /** (Can be null) */ - @Nullable @JsonProperty("probability") + @Nullable private ExperimentalComposableProbabilitySamplerModel probability; - /** (Can be null) */ - @Nullable @JsonProperty("rule_based") + @Nullable private ExperimentalComposableRuleBasedSamplerModel ruleBased; @JsonIgnore @@ -128,80 +123,64 @@ public ExperimentalComposableSamplerModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("alwaysOff"); - sb.append('='); - sb.append(((this.alwaysOff == null) ? "" : this.alwaysOff)); - sb.append(','); - sb.append("alwaysOn"); - sb.append('='); - sb.append(((this.alwaysOn == null) ? "" : this.alwaysOn)); - sb.append(','); - sb.append("parentThreshold"); - sb.append('='); - sb.append(((this.parentThreshold == null) ? "" : this.parentThreshold)); - sb.append(','); - sb.append("probability"); - sb.append('='); - sb.append(((this.probability == null) ? "" : this.probability)); - sb.append(','); - sb.append("ruleBased"); - sb.append('='); - sb.append(((this.ruleBased == null) ? "" : this.ruleBased)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableSamplerModel{" + + "alwaysOff=" + + alwaysOff + + ", alwaysOn=" + + alwaysOn + + ", parentThreshold=" + + parentThreshold + + ", probability=" + + probability + + ", ruleBased=" + + ruleBased + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.ruleBased == null) ? 0 : this.ruleBased.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - result = ((result * 31) + ((this.alwaysOn == null) ? 0 : this.alwaysOn.hashCode())); - result = - ((result * 31) + ((this.parentThreshold == null) ? 0 : this.parentThreshold.hashCode())); - result = ((result * 31) + ((this.probability == null) ? 0 : this.probability.hashCode())); - result = ((result * 31) + ((this.alwaysOff == null) ? 0 : this.alwaysOff.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.alwaysOff == null) ? 0 : this.alwaysOff.hashCode(); + h *= 1000003; + h ^= (this.alwaysOn == null) ? 0 : this.alwaysOn.hashCode(); + h *= 1000003; + h ^= (this.parentThreshold == null) ? 0 : this.parentThreshold.hashCode(); + h *= 1000003; + h ^= (this.probability == null) ? 0 : this.probability.hashCode(); + h *= 1000003; + h ^= (this.ruleBased == null) ? 0 : this.ruleBased.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableSamplerModel) == false) { - return false; + if (o instanceof ExperimentalComposableSamplerModel) { + ExperimentalComposableSamplerModel that = (ExperimentalComposableSamplerModel) o; + return (this.alwaysOff == null + ? that.alwaysOff == null + : this.alwaysOff.equals(that.alwaysOff)) + && (this.alwaysOn == null ? that.alwaysOn == null : this.alwaysOn.equals(that.alwaysOn)) + && (this.parentThreshold == null + ? that.parentThreshold == null + : this.parentThreshold.equals(that.parentThreshold)) + && (this.probability == null + ? that.probability == null + : this.probability.equals(that.probability)) + && (this.ruleBased == null + ? that.ruleBased == null + : this.ruleBased.equals(that.ruleBased)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - ExperimentalComposableSamplerModel rhs = ((ExperimentalComposableSamplerModel) other); - return (((((((this.ruleBased == rhs.ruleBased) - || ((this.ruleBased != null) && this.ruleBased.equals(rhs.ruleBased))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))) - && ((this.alwaysOn == rhs.alwaysOn) - || ((this.alwaysOn != null) && this.alwaysOn.equals(rhs.alwaysOn)))) - && ((this.parentThreshold == rhs.parentThreshold) - || ((this.parentThreshold != null) - && this.parentThreshold.equals(rhs.parentThreshold)))) - && ((this.probability == rhs.probability) - || ((this.probability != null) && this.probability.equals(rhs.probability)))) - && ((this.alwaysOff == rhs.alwaysOff) - || ((this.alwaysOff != null) && this.alwaysOff.equals(rhs.alwaysOff)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerPropertyModel.java index 44a0df7aaac..62f054eca49 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalComposableSamplerPropertyModel { @JsonIgnore @@ -41,44 +41,32 @@ public ExperimentalComposableSamplerPropertyModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalComposableSamplerPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalComposableSamplerPropertyModel{" + + "additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalComposableSamplerPropertyModel) == false) { - return false; + if (o instanceof ExperimentalComposableSamplerPropertyModel) { + ExperimentalComposableSamplerPropertyModel that = + (ExperimentalComposableSamplerPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - ExperimentalComposableSamplerPropertyModel rhs = - ((ExperimentalComposableSamplerPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalContainerResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalContainerResourceDetectorModel.java index 97a5e0384fd..c48b99a00d0 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalContainerResourceDetectorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalContainerResourceDetectorModel.java @@ -8,44 +8,34 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalContainerResourceDetectorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalContainerResourceDetectorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalContainerResourceDetectorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalContainerResourceDetectorModel) == false) { - return false; + if (o instanceof ExperimentalContainerResourceDetectorModel) { + ExperimentalContainerResourceDetectorModel that = + (ExperimentalContainerResourceDetectorModel) o; + return true; } - ExperimentalContainerResourceDetectorModel rhs = - ((ExperimentalContainerResourceDetectorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalDbInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalDbInstrumentationModel.java index 8d8be08462b..27309ed4679 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalDbInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalDbInstrumentationModel.java @@ -14,12 +14,10 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"semconv"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalDbInstrumentationModel { - /** (Can be null) */ - @Nullable @JsonProperty("semconv") + @Nullable private ExperimentalSemconvConfigModel semconv; @JsonProperty("semconv") @@ -35,40 +33,26 @@ public ExperimentalDbInstrumentationModel withSemconv(ExperimentalSemconvConfigM @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalDbInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("semconv"); - sb.append('='); - sb.append(((this.semconv == null) ? "" : this.semconv)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalDbInstrumentationModel{" + "semconv=" + semconv + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.semconv == null) ? 0 : this.semconv.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalDbInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalDbInstrumentationModel) { + ExperimentalDbInstrumentationModel that = (ExperimentalDbInstrumentationModel) o; + return (this.semconv == null ? that.semconv == null : this.semconv.equals(that.semconv)); } - ExperimentalDbInstrumentationModel rhs = ((ExperimentalDbInstrumentationModel) other); - return ((this.semconv == rhs.semconv) - || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalEventToSpanEventBridgeLogRecordProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalEventToSpanEventBridgeLogRecordProcessorModel.java index ae31e8c771a..00f2a0d535f 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalEventToSpanEventBridgeLogRecordProcessorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalEventToSpanEventBridgeLogRecordProcessorModel.java @@ -8,44 +8,34 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalEventToSpanEventBridgeLogRecordProcessorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalEventToSpanEventBridgeLogRecordProcessorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalEventToSpanEventBridgeLogRecordProcessorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalEventToSpanEventBridgeLogRecordProcessorModel) == false) { - return false; + if (o instanceof ExperimentalEventToSpanEventBridgeLogRecordProcessorModel) { + ExperimentalEventToSpanEventBridgeLogRecordProcessorModel that = + (ExperimentalEventToSpanEventBridgeLogRecordProcessorModel) o; + return true; } - ExperimentalEventToSpanEventBridgeLogRecordProcessorModel rhs = - ((ExperimentalEventToSpanEventBridgeLogRecordProcessorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGenAiInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGenAiInstrumentationModel.java index 3d24e62c86c..0b858ed6c09 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGenAiInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGenAiInstrumentationModel.java @@ -14,12 +14,10 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"semconv"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalGenAiInstrumentationModel { - /** (Can be null) */ - @Nullable @JsonProperty("semconv") + @Nullable private ExperimentalSemconvConfigModel semconv; @JsonProperty("semconv") @@ -35,40 +33,26 @@ public ExperimentalGenAiInstrumentationModel withSemconv(ExperimentalSemconvConf @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalGenAiInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("semconv"); - sb.append('='); - sb.append(((this.semconv == null) ? "" : this.semconv)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalGenAiInstrumentationModel{" + "semconv=" + semconv + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.semconv == null) ? 0 : this.semconv.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalGenAiInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalGenAiInstrumentationModel) { + ExperimentalGenAiInstrumentationModel that = (ExperimentalGenAiInstrumentationModel) o; + return (this.semconv == null ? that.semconv == null : this.semconv.equals(that.semconv)); } - ExperimentalGenAiInstrumentationModel rhs = ((ExperimentalGenAiInstrumentationModel) other); - return ((this.semconv == rhs.semconv) - || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGeneralInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGeneralInstrumentationModel.java index 76e4cd36e4e..9dbfeadfe42 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGeneralInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGeneralInstrumentationModel.java @@ -24,42 +24,34 @@ "stability_opt_in_list" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalGeneralInstrumentationModel { - /** (Can be null) */ - @Nullable @JsonProperty("http") + @Nullable private ExperimentalHttpInstrumentationModel http; - /** (Can be null) */ - @Nullable @JsonProperty("code") + @Nullable private ExperimentalCodeInstrumentationModel code; - /** (Can be null) */ - @Nullable @JsonProperty("db") + @Nullable private ExperimentalDbInstrumentationModel db; - /** (Can be null) */ - @Nullable @JsonProperty("gen_ai") + @Nullable private ExperimentalGenAiInstrumentationModel genAi; - /** (Can be null) */ - @Nullable @JsonProperty("messaging") + @Nullable private ExperimentalMessagingInstrumentationModel messaging; - /** (Can be null) */ - @Nullable @JsonProperty("rpc") + @Nullable private ExperimentalRpcInstrumentationModel rpc; - /** (Can be null) */ - @Nullable @JsonProperty("sanitization") + @Nullable private ExperimentalSanitizationModel sanitization; /** @@ -90,13 +82,11 @@ public class ExperimentalGeneralInstrumentationModel { * https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/ If omitted or null, no * opt-in is configured and instrumentations continue emitting their default semantic convention * version. - * - *

(Can be null) */ - @Nullable @JsonProperty("stability_opt_in_list") @JsonPropertyDescription( "Configure semantic convention stability opt-in as a comma-separated list.\nThis property follows the format and semantics of the OTEL_SEMCONV_STABILITY_OPT_IN environment variable.\nControls the emission of stable vs. experimental semantic conventions for instrumentation.\nThis setting is only intended for migrating from experimental to stable semantic conventions.\n\nKnown values include:\n- http: Emit stable HTTP and networking conventions only\n- http/dup: Emit both old and stable HTTP and networking conventions (for phased migration)\n- database: Emit stable database conventions only\n- database/dup: Emit both old and stable database conventions (for phased migration)\n- rpc: Emit stable RPC conventions only\n- rpc/dup: Emit both experimental and stable RPC conventions (for phased migration)\n- messaging: Emit stable messaging conventions only\n- messaging/dup: Emit both old and stable messaging conventions (for phased migration)\n- code: Emit stable code conventions only\n- code/dup: Emit both old and stable code conventions (for phased migration)\n\nMultiple values can be specified as a comma-separated list (e.g., \"http,database/dup\").\nAdditional signal types may be supported in future versions.\n\nDomain-specific semconv properties (e.g., .instrumentation/development.general.db.semconv) take precedence over this general setting.\n\nSee:\n- HTTP migration: https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/\n- Database migration: https://opentelemetry.io/docs/specs/semconv/database/\n- RPC: https://opentelemetry.io/docs/specs/semconv/rpc/\n- Messaging: https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/\nIf omitted or null, no opt-in is configured and instrumentations continue emitting their default semantic convention version.\n") + @Nullable private String stabilityOptInList; @JsonProperty("http") @@ -223,92 +213,70 @@ public ExperimentalGeneralInstrumentationModel withStabilityOptInList(String sta @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalGeneralInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("http"); - sb.append('='); - sb.append(((this.http == null) ? "" : this.http)); - sb.append(','); - sb.append("code"); - sb.append('='); - sb.append(((this.code == null) ? "" : this.code)); - sb.append(','); - sb.append("db"); - sb.append('='); - sb.append(((this.db == null) ? "" : this.db)); - sb.append(','); - sb.append("genAi"); - sb.append('='); - sb.append(((this.genAi == null) ? "" : this.genAi)); - sb.append(','); - sb.append("messaging"); - sb.append('='); - sb.append(((this.messaging == null) ? "" : this.messaging)); - sb.append(','); - sb.append("rpc"); - sb.append('='); - sb.append(((this.rpc == null) ? "" : this.rpc)); - sb.append(','); - sb.append("sanitization"); - sb.append('='); - sb.append(((this.sanitization == null) ? "" : this.sanitization)); - sb.append(','); - sb.append("stabilityOptInList"); - sb.append('='); - sb.append(((this.stabilityOptInList == null) ? "" : this.stabilityOptInList)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalGeneralInstrumentationModel{" + + "http=" + + http + + ", code=" + + code + + ", db=" + + db + + ", genAi=" + + genAi + + ", messaging=" + + messaging + + ", rpc=" + + rpc + + ", sanitization=" + + sanitization + + ", stabilityOptInList=" + + stabilityOptInList + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.sanitization == null) ? 0 : this.sanitization.hashCode())); - result = ((result * 31) + ((this.code == null) ? 0 : this.code.hashCode())); - result = ((result * 31) + ((this.genAi == null) ? 0 : this.genAi.hashCode())); - result = ((result * 31) + ((this.rpc == null) ? 0 : this.rpc.hashCode())); - result = ((result * 31) + ((this.http == null) ? 0 : this.http.hashCode())); - result = - ((result * 31) - + ((this.stabilityOptInList == null) ? 0 : this.stabilityOptInList.hashCode())); - result = ((result * 31) + ((this.db == null) ? 0 : this.db.hashCode())); - result = ((result * 31) + ((this.messaging == null) ? 0 : this.messaging.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.http == null) ? 0 : this.http.hashCode(); + h *= 1000003; + h ^= (this.code == null) ? 0 : this.code.hashCode(); + h *= 1000003; + h ^= (this.db == null) ? 0 : this.db.hashCode(); + h *= 1000003; + h ^= (this.genAi == null) ? 0 : this.genAi.hashCode(); + h *= 1000003; + h ^= (this.messaging == null) ? 0 : this.messaging.hashCode(); + h *= 1000003; + h ^= (this.rpc == null) ? 0 : this.rpc.hashCode(); + h *= 1000003; + h ^= (this.sanitization == null) ? 0 : this.sanitization.hashCode(); + h *= 1000003; + h ^= (this.stabilityOptInList == null) ? 0 : this.stabilityOptInList.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalGeneralInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalGeneralInstrumentationModel) { + ExperimentalGeneralInstrumentationModel that = (ExperimentalGeneralInstrumentationModel) o; + return (this.http == null ? that.http == null : this.http.equals(that.http)) + && (this.code == null ? that.code == null : this.code.equals(that.code)) + && (this.db == null ? that.db == null : this.db.equals(that.db)) + && (this.genAi == null ? that.genAi == null : this.genAi.equals(that.genAi)) + && (this.messaging == null + ? that.messaging == null + : this.messaging.equals(that.messaging)) + && (this.rpc == null ? that.rpc == null : this.rpc.equals(that.rpc)) + && (this.sanitization == null + ? that.sanitization == null + : this.sanitization.equals(that.sanitization)) + && (this.stabilityOptInList == null + ? that.stabilityOptInList == null + : this.stabilityOptInList.equals(that.stabilityOptInList)); } - ExperimentalGeneralInstrumentationModel rhs = ((ExperimentalGeneralInstrumentationModel) other); - return (((((((((this.sanitization == rhs.sanitization) - || ((this.sanitization != null) - && this.sanitization.equals(rhs.sanitization))) - && ((this.code == rhs.code) - || ((this.code != null) && this.code.equals(rhs.code)))) - && ((this.genAi == rhs.genAi) - || ((this.genAi != null) && this.genAi.equals(rhs.genAi)))) - && ((this.rpc == rhs.rpc) - || ((this.rpc != null) && this.rpc.equals(rhs.rpc)))) - && ((this.http == rhs.http) - || ((this.http != null) && this.http.equals(rhs.http)))) - && ((this.stabilityOptInList == rhs.stabilityOptInList) - || ((this.stabilityOptInList != null) - && this.stabilityOptInList.equals(rhs.stabilityOptInList)))) - && ((this.db == rhs.db) || ((this.db != null) && this.db.equals(rhs.db)))) - && ((this.messaging == rhs.messaging) - || ((this.messaging != null) && this.messaging.equals(rhs.messaging)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHostResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHostResourceDetectorModel.java index 92e21634306..0c8623a09d1 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHostResourceDetectorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHostResourceDetectorModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalHostResourceDetectorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalHostResourceDetectorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalHostResourceDetectorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalHostResourceDetectorModel) == false) { - return false; + if (o instanceof ExperimentalHostResourceDetectorModel) { + ExperimentalHostResourceDetectorModel that = (ExperimentalHostResourceDetectorModel) o; + return true; } - ExperimentalHostResourceDetectorModel rhs = ((ExperimentalHostResourceDetectorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpClientInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpClientInstrumentationModel.java index 05ac0e67637..f0ef2ea6c32 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpClientInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpClientInstrumentationModel.java @@ -16,31 +16,26 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"request_captured_headers", "response_captured_headers", "known_methods"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalHttpClientInstrumentationModel { /** * Configure headers to capture for outbound http requests. If omitted, no outbound request * headers are captured. - * - *

(Can be null) */ - @Nullable @JsonProperty("request_captured_headers") @JsonPropertyDescription( "Configure headers to capture for outbound http requests.\nIf omitted, no outbound request headers are captured.\n") + @Nullable private List requestCapturedHeaders; /** * Configure headers to capture for inbound http responses. If omitted, no inbound response * headers are captured. - * - *

(Can be null) */ - @Nullable @JsonProperty("response_captured_headers") @JsonPropertyDescription( "Configure headers to capture for inbound http responses.\nIf omitted, no inbound response headers are captured.\n") + @Nullable private List responseCapturedHeaders; /** @@ -48,13 +43,11 @@ public class ExperimentalHttpClientInstrumentationModel { * full override of the default known methods, not a list of known methods in addition to the * defaults. If omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH * are known. - * - *

(Can be null) */ - @Nullable @JsonProperty("known_methods") @JsonPropertyDescription( "Override the default list of known HTTP methods.\nKnown methods are case-sensitive.\nThis is a full override of the default known methods, not a list of known methods in addition to the defaults.\nIf omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH are known.\n") + @Nullable private List knownMethods; /** @@ -108,63 +101,46 @@ public ExperimentalHttpClientInstrumentationModel withKnownMethods(List @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalHttpClientInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("requestCapturedHeaders"); - sb.append('='); - sb.append(((this.requestCapturedHeaders == null) ? "" : this.requestCapturedHeaders)); - sb.append(','); - sb.append("responseCapturedHeaders"); - sb.append('='); - sb.append(((this.responseCapturedHeaders == null) ? "" : this.responseCapturedHeaders)); - sb.append(','); - sb.append("knownMethods"); - sb.append('='); - sb.append(((this.knownMethods == null) ? "" : this.knownMethods)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalHttpClientInstrumentationModel{" + + "requestCapturedHeaders=" + + requestCapturedHeaders + + ", responseCapturedHeaders=" + + responseCapturedHeaders + + ", knownMethods=" + + knownMethods + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.requestCapturedHeaders == null) ? 0 : this.requestCapturedHeaders.hashCode())); - result = - ((result * 31) - + ((this.responseCapturedHeaders == null) - ? 0 - : this.responseCapturedHeaders.hashCode())); - result = ((result * 31) + ((this.knownMethods == null) ? 0 : this.knownMethods.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.requestCapturedHeaders == null) ? 0 : this.requestCapturedHeaders.hashCode(); + h *= 1000003; + h ^= (this.responseCapturedHeaders == null) ? 0 : this.responseCapturedHeaders.hashCode(); + h *= 1000003; + h ^= (this.knownMethods == null) ? 0 : this.knownMethods.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalHttpClientInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalHttpClientInstrumentationModel) { + ExperimentalHttpClientInstrumentationModel that = + (ExperimentalHttpClientInstrumentationModel) o; + return (this.requestCapturedHeaders == null + ? that.requestCapturedHeaders == null + : this.requestCapturedHeaders.equals(that.requestCapturedHeaders)) + && (this.responseCapturedHeaders == null + ? that.responseCapturedHeaders == null + : this.responseCapturedHeaders.equals(that.responseCapturedHeaders)) + && (this.knownMethods == null + ? that.knownMethods == null + : this.knownMethods.equals(that.knownMethods)); } - ExperimentalHttpClientInstrumentationModel rhs = - ((ExperimentalHttpClientInstrumentationModel) other); - return ((((this.requestCapturedHeaders == rhs.requestCapturedHeaders) - || ((this.requestCapturedHeaders != null) - && this.requestCapturedHeaders.equals(rhs.requestCapturedHeaders))) - && ((this.responseCapturedHeaders == rhs.responseCapturedHeaders) - || ((this.responseCapturedHeaders != null) - && this.responseCapturedHeaders.equals(rhs.responseCapturedHeaders)))) - && ((this.knownMethods == rhs.knownMethods) - || ((this.knownMethods != null) && this.knownMethods.equals(rhs.knownMethods)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpInstrumentationModel.java index a4004ed91d6..d0868e4abde 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpInstrumentationModel.java @@ -14,22 +14,18 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"semconv", "client", "server"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalHttpInstrumentationModel { - /** (Can be null) */ - @Nullable @JsonProperty("semconv") + @Nullable private ExperimentalSemconvConfigModel semconv; - /** (Can be null) */ - @Nullable @JsonProperty("client") + @Nullable private ExperimentalHttpClientInstrumentationModel client; - /** (Can be null) */ - @Nullable @JsonProperty("server") + @Nullable private ExperimentalHttpServerInstrumentationModel server; @JsonProperty("semconv") @@ -69,54 +65,39 @@ public ExperimentalHttpInstrumentationModel withServer( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalHttpInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("semconv"); - sb.append('='); - sb.append(((this.semconv == null) ? "" : this.semconv)); - sb.append(','); - sb.append("client"); - sb.append('='); - sb.append(((this.client == null) ? "" : this.client)); - sb.append(','); - sb.append("server"); - sb.append('='); - sb.append(((this.server == null) ? "" : this.server)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalHttpInstrumentationModel{" + + "semconv=" + + semconv + + ", client=" + + client + + ", server=" + + server + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.client == null) ? 0 : this.client.hashCode())); - result = ((result * 31) + ((this.server == null) ? 0 : this.server.hashCode())); - result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.semconv == null) ? 0 : this.semconv.hashCode(); + h *= 1000003; + h ^= (this.client == null) ? 0 : this.client.hashCode(); + h *= 1000003; + h ^= (this.server == null) ? 0 : this.server.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalHttpInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalHttpInstrumentationModel) { + ExperimentalHttpInstrumentationModel that = (ExperimentalHttpInstrumentationModel) o; + return (this.semconv == null ? that.semconv == null : this.semconv.equals(that.semconv)) + && (this.client == null ? that.client == null : this.client.equals(that.client)) + && (this.server == null ? that.server == null : this.server.equals(that.server)); } - ExperimentalHttpInstrumentationModel rhs = ((ExperimentalHttpInstrumentationModel) other); - return ((((this.client == rhs.client) - || ((this.client != null) && this.client.equals(rhs.client))) - && ((this.server == rhs.server) - || ((this.server != null) && this.server.equals(rhs.server)))) - && ((this.semconv == rhs.semconv) - || ((this.semconv != null) && this.semconv.equals(rhs.semconv)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpServerInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpServerInstrumentationModel.java index 5a6d449a9fb..756a0ae0209 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpServerInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpServerInstrumentationModel.java @@ -16,31 +16,26 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"request_captured_headers", "response_captured_headers", "known_methods"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalHttpServerInstrumentationModel { /** * Configure headers to capture for inbound http requests. If omitted, no request headers are * captured. - * - *

(Can be null) */ - @Nullable @JsonProperty("request_captured_headers") @JsonPropertyDescription( "Configure headers to capture for inbound http requests.\nIf omitted, no request headers are captured.\n") + @Nullable private List requestCapturedHeaders; /** * Configure headers to capture for outbound http responses. If omitted, no response headers are * captures. - * - *

(Can be null) */ - @Nullable @JsonProperty("response_captured_headers") @JsonPropertyDescription( "Configure headers to capture for outbound http responses.\nIf omitted, no response headers are captures.\n") + @Nullable private List responseCapturedHeaders; /** @@ -48,13 +43,11 @@ public class ExperimentalHttpServerInstrumentationModel { * full override of the default known methods, not a list of known methods in addition to the * defaults. If omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH * are known. - * - *

(Can be null) */ - @Nullable @JsonProperty("known_methods") @JsonPropertyDescription( "Override the default list of known HTTP methods.\nKnown methods are case-sensitive.\nThis is a full override of the default known methods, not a list of known methods in addition to the defaults.\nIf omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH are known.\n") + @Nullable private List knownMethods; /** @@ -108,63 +101,46 @@ public ExperimentalHttpServerInstrumentationModel withKnownMethods(List @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalHttpServerInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("requestCapturedHeaders"); - sb.append('='); - sb.append(((this.requestCapturedHeaders == null) ? "" : this.requestCapturedHeaders)); - sb.append(','); - sb.append("responseCapturedHeaders"); - sb.append('='); - sb.append(((this.responseCapturedHeaders == null) ? "" : this.responseCapturedHeaders)); - sb.append(','); - sb.append("knownMethods"); - sb.append('='); - sb.append(((this.knownMethods == null) ? "" : this.knownMethods)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalHttpServerInstrumentationModel{" + + "requestCapturedHeaders=" + + requestCapturedHeaders + + ", responseCapturedHeaders=" + + responseCapturedHeaders + + ", knownMethods=" + + knownMethods + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.requestCapturedHeaders == null) ? 0 : this.requestCapturedHeaders.hashCode())); - result = - ((result * 31) - + ((this.responseCapturedHeaders == null) - ? 0 - : this.responseCapturedHeaders.hashCode())); - result = ((result * 31) + ((this.knownMethods == null) ? 0 : this.knownMethods.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.requestCapturedHeaders == null) ? 0 : this.requestCapturedHeaders.hashCode(); + h *= 1000003; + h ^= (this.responseCapturedHeaders == null) ? 0 : this.responseCapturedHeaders.hashCode(); + h *= 1000003; + h ^= (this.knownMethods == null) ? 0 : this.knownMethods.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalHttpServerInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalHttpServerInstrumentationModel) { + ExperimentalHttpServerInstrumentationModel that = + (ExperimentalHttpServerInstrumentationModel) o; + return (this.requestCapturedHeaders == null + ? that.requestCapturedHeaders == null + : this.requestCapturedHeaders.equals(that.requestCapturedHeaders)) + && (this.responseCapturedHeaders == null + ? that.responseCapturedHeaders == null + : this.responseCapturedHeaders.equals(that.responseCapturedHeaders)) + && (this.knownMethods == null + ? that.knownMethods == null + : this.knownMethods.equals(that.knownMethods)); } - ExperimentalHttpServerInstrumentationModel rhs = - ((ExperimentalHttpServerInstrumentationModel) other); - return ((((this.requestCapturedHeaders == rhs.requestCapturedHeaders) - || ((this.requestCapturedHeaders != null) - && this.requestCapturedHeaders.equals(rhs.requestCapturedHeaders))) - && ((this.responseCapturedHeaders == rhs.responseCapturedHeaders) - || ((this.responseCapturedHeaders != null) - && this.responseCapturedHeaders.equals(rhs.responseCapturedHeaders)))) - && ((this.knownMethods == rhs.knownMethods) - || ((this.knownMethods != null) && this.knownMethods.equals(rhs.knownMethods)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalInstrumentationModel.java index f2021587d47..86608aa5d93 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalInstrumentationModel.java @@ -16,67 +16,54 @@ "general", "cpp", "dotnet", "erlang", "go", "java", "js", "php", "python", "ruby", "rust", "swift" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalInstrumentationModel { - /** (Can be null) */ - @Nullable @JsonProperty("general") + @Nullable private ExperimentalGeneralInstrumentationModel general; - /** (Can be null) */ - @Nullable @JsonProperty("cpp") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel cpp; - /** (Can be null) */ - @Nullable @JsonProperty("dotnet") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel dotnet; - /** (Can be null) */ - @Nullable @JsonProperty("erlang") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel erlang; - /** (Can be null) */ - @Nullable @JsonProperty("go") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel go; - /** (Can be null) */ - @Nullable @JsonProperty("java") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel java; - /** (Can be null) */ - @Nullable @JsonProperty("js") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel js; - /** (Can be null) */ - @Nullable @JsonProperty("php") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel php; - /** (Can be null) */ - @Nullable @JsonProperty("python") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel python; - /** (Can be null) */ - @Nullable @JsonProperty("ruby") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel ruby; - /** (Can be null) */ - @Nullable @JsonProperty("rust") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel rust; - /** (Can be null) */ - @Nullable @JsonProperty("swift") + @Nullable private ExperimentalLanguageSpecificInstrumentationModel swift; @JsonProperty("general") @@ -225,118 +212,84 @@ public ExperimentalInstrumentationModel withSwift( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("general"); - sb.append('='); - sb.append(((this.general == null) ? "" : this.general)); - sb.append(','); - sb.append("cpp"); - sb.append('='); - sb.append(((this.cpp == null) ? "" : this.cpp)); - sb.append(','); - sb.append("dotnet"); - sb.append('='); - sb.append(((this.dotnet == null) ? "" : this.dotnet)); - sb.append(','); - sb.append("erlang"); - sb.append('='); - sb.append(((this.erlang == null) ? "" : this.erlang)); - sb.append(','); - sb.append("go"); - sb.append('='); - sb.append(((this.go == null) ? "" : this.go)); - sb.append(','); - sb.append("java"); - sb.append('='); - sb.append(((this.java == null) ? "" : this.java)); - sb.append(','); - sb.append("js"); - sb.append('='); - sb.append(((this.js == null) ? "" : this.js)); - sb.append(','); - sb.append("php"); - sb.append('='); - sb.append(((this.php == null) ? "" : this.php)); - sb.append(','); - sb.append("python"); - sb.append('='); - sb.append(((this.python == null) ? "" : this.python)); - sb.append(','); - sb.append("ruby"); - sb.append('='); - sb.append(((this.ruby == null) ? "" : this.ruby)); - sb.append(','); - sb.append("rust"); - sb.append('='); - sb.append(((this.rust == null) ? "" : this.rust)); - sb.append(','); - sb.append("swift"); - sb.append('='); - sb.append(((this.swift == null) ? "" : this.swift)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalInstrumentationModel{" + + "general=" + + general + + ", cpp=" + + cpp + + ", dotnet=" + + dotnet + + ", erlang=" + + erlang + + ", go=" + + go + + ", java=" + + java + + ", js=" + + js + + ", php=" + + php + + ", python=" + + python + + ", ruby=" + + ruby + + ", rust=" + + rust + + ", swift=" + + swift + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.general == null) ? 0 : this.general.hashCode())); - result = ((result * 31) + ((this.rust == null) ? 0 : this.rust.hashCode())); - result = ((result * 31) + ((this.cpp == null) ? 0 : this.cpp.hashCode())); - result = ((result * 31) + ((this.python == null) ? 0 : this.python.hashCode())); - result = ((result * 31) + ((this.dotnet == null) ? 0 : this.dotnet.hashCode())); - result = ((result * 31) + ((this.java == null) ? 0 : this.java.hashCode())); - result = ((result * 31) + ((this.go == null) ? 0 : this.go.hashCode())); - result = ((result * 31) + ((this.erlang == null) ? 0 : this.erlang.hashCode())); - result = ((result * 31) + ((this.js == null) ? 0 : this.js.hashCode())); - result = ((result * 31) + ((this.php == null) ? 0 : this.php.hashCode())); - result = ((result * 31) + ((this.ruby == null) ? 0 : this.ruby.hashCode())); - result = ((result * 31) + ((this.swift == null) ? 0 : this.swift.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.general == null) ? 0 : this.general.hashCode(); + h *= 1000003; + h ^= (this.cpp == null) ? 0 : this.cpp.hashCode(); + h *= 1000003; + h ^= (this.dotnet == null) ? 0 : this.dotnet.hashCode(); + h *= 1000003; + h ^= (this.erlang == null) ? 0 : this.erlang.hashCode(); + h *= 1000003; + h ^= (this.go == null) ? 0 : this.go.hashCode(); + h *= 1000003; + h ^= (this.java == null) ? 0 : this.java.hashCode(); + h *= 1000003; + h ^= (this.js == null) ? 0 : this.js.hashCode(); + h *= 1000003; + h ^= (this.php == null) ? 0 : this.php.hashCode(); + h *= 1000003; + h ^= (this.python == null) ? 0 : this.python.hashCode(); + h *= 1000003; + h ^= (this.ruby == null) ? 0 : this.ruby.hashCode(); + h *= 1000003; + h ^= (this.rust == null) ? 0 : this.rust.hashCode(); + h *= 1000003; + h ^= (this.swift == null) ? 0 : this.swift.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalInstrumentationModel) { + ExperimentalInstrumentationModel that = (ExperimentalInstrumentationModel) o; + return (this.general == null ? that.general == null : this.general.equals(that.general)) + && (this.cpp == null ? that.cpp == null : this.cpp.equals(that.cpp)) + && (this.dotnet == null ? that.dotnet == null : this.dotnet.equals(that.dotnet)) + && (this.erlang == null ? that.erlang == null : this.erlang.equals(that.erlang)) + && (this.go == null ? that.go == null : this.go.equals(that.go)) + && (this.java == null ? that.java == null : this.java.equals(that.java)) + && (this.js == null ? that.js == null : this.js.equals(that.js)) + && (this.php == null ? that.php == null : this.php.equals(that.php)) + && (this.python == null ? that.python == null : this.python.equals(that.python)) + && (this.ruby == null ? that.ruby == null : this.ruby.equals(that.ruby)) + && (this.rust == null ? that.rust == null : this.rust.equals(that.rust)) + && (this.swift == null ? that.swift == null : this.swift.equals(that.swift)); } - ExperimentalInstrumentationModel rhs = ((ExperimentalInstrumentationModel) other); - return (((((((((((((this.general == rhs.general) - || ((this.general != null) - && this.general.equals(rhs.general))) - && ((this.rust == rhs.rust) - || ((this.rust != null) - && this.rust.equals(rhs.rust)))) - && ((this.cpp == rhs.cpp) - || ((this.cpp != null) - && this.cpp.equals(rhs.cpp)))) - && ((this.python == rhs.python) - || ((this.python != null) - && this.python.equals(rhs.python)))) - && ((this.dotnet == rhs.dotnet) - || ((this.dotnet != null) - && this.dotnet.equals(rhs.dotnet)))) - && ((this.java == rhs.java) - || ((this.java != null) && this.java.equals(rhs.java)))) - && ((this.go == rhs.go) - || ((this.go != null) && this.go.equals(rhs.go)))) - && ((this.erlang == rhs.erlang) - || ((this.erlang != null) && this.erlang.equals(rhs.erlang)))) - && ((this.js == rhs.js) || ((this.js != null) && this.js.equals(rhs.js)))) - && ((this.php == rhs.php) || ((this.php != null) && this.php.equals(rhs.php)))) - && ((this.ruby == rhs.ruby) || ((this.ruby != null) && this.ruby.equals(rhs.ruby)))) - && ((this.swift == rhs.swift) || ((this.swift != null) && this.swift.equals(rhs.swift)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalJaegerRemoteSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalJaegerRemoteSamplerModel.java index 53013412ee0..bcb2caf6499 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalJaegerRemoteSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalJaegerRemoteSamplerModel.java @@ -10,13 +10,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"endpoint", "interval", "initial_sampler"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalJaegerRemoteSamplerModel { /** @@ -28,24 +26,22 @@ public class ExperimentalJaegerRemoteSamplerModel { @JsonProperty("endpoint") @JsonPropertyDescription( "Configure the endpoint of the jaeger remote sampling service.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private String endpoint; /** * Configure the polling interval (in milliseconds) to fetch from the remote sampling service. If * omitted or null, 60000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("interval") @JsonPropertyDescription( "Configure the polling interval (in milliseconds) to fetch from the remote sampling service.\nIf omitted or null, 60000 is used.\n") + @Nullable private Integer interval; /** (Required) */ @JsonProperty("initial_sampler") - @Nonnull + @Nullable private SamplerModel initialSampler; /** @@ -94,54 +90,41 @@ public ExperimentalJaegerRemoteSamplerModel withInitialSampler(SamplerModel init @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalJaegerRemoteSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("endpoint"); - sb.append('='); - sb.append(((this.endpoint == null) ? "" : this.endpoint)); - sb.append(','); - sb.append("interval"); - sb.append('='); - sb.append(((this.interval == null) ? "" : this.interval)); - sb.append(','); - sb.append("initialSampler"); - sb.append('='); - sb.append(((this.initialSampler == null) ? "" : this.initialSampler)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalJaegerRemoteSamplerModel{" + + "endpoint=" + + endpoint + + ", interval=" + + interval + + ", initialSampler=" + + initialSampler + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); - result = ((result * 31) + ((this.interval == null) ? 0 : this.interval.hashCode())); - result = ((result * 31) + ((this.initialSampler == null) ? 0 : this.initialSampler.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.endpoint == null) ? 0 : this.endpoint.hashCode(); + h *= 1000003; + h ^= (this.interval == null) ? 0 : this.interval.hashCode(); + h *= 1000003; + h ^= (this.initialSampler == null) ? 0 : this.initialSampler.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalJaegerRemoteSamplerModel) == false) { - return false; + if (o instanceof ExperimentalJaegerRemoteSamplerModel) { + ExperimentalJaegerRemoteSamplerModel that = (ExperimentalJaegerRemoteSamplerModel) o; + return (this.endpoint == null ? that.endpoint == null : this.endpoint.equals(that.endpoint)) + && (this.interval == null ? that.interval == null : this.interval.equals(that.interval)) + && (this.initialSampler == null + ? that.initialSampler == null + : this.initialSampler.equals(that.initialSampler)); } - ExperimentalJaegerRemoteSamplerModel rhs = ((ExperimentalJaegerRemoteSamplerModel) other); - return ((((this.endpoint == rhs.endpoint) - || ((this.endpoint != null) && this.endpoint.equals(rhs.endpoint))) - && ((this.interval == rhs.interval) - || ((this.interval != null) && this.interval.equals(rhs.interval)))) - && ((this.initialSampler == rhs.initialSampler) - || ((this.initialSampler != null) && this.initialSampler.equals(rhs.initialSampler)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationModel.java index dc0f7712161..2c72d2e07b9 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalLanguageSpecificInstrumentationModel { @JsonIgnore @@ -45,44 +45,32 @@ public ExperimentalLanguageSpecificInstrumentationModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalLanguageSpecificInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalLanguageSpecificInstrumentationModel{" + + "additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalLanguageSpecificInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalLanguageSpecificInstrumentationModel) { + ExperimentalLanguageSpecificInstrumentationModel that = + (ExperimentalLanguageSpecificInstrumentationModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - ExperimentalLanguageSpecificInstrumentationModel rhs = - ((ExperimentalLanguageSpecificInstrumentationModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationPropertyModel.java index 8f4d865ed88..582c04837d5 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalLanguageSpecificInstrumentationPropertyModel { @JsonIgnore @@ -41,44 +41,32 @@ public ExperimentalLanguageSpecificInstrumentationPropertyModel withAdditionalPr @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalLanguageSpecificInstrumentationPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalLanguageSpecificInstrumentationPropertyModel{" + + "additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalLanguageSpecificInstrumentationPropertyModel) == false) { - return false; + if (o instanceof ExperimentalLanguageSpecificInstrumentationPropertyModel) { + ExperimentalLanguageSpecificInstrumentationPropertyModel that = + (ExperimentalLanguageSpecificInstrumentationPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - ExperimentalLanguageSpecificInstrumentationPropertyModel rhs = - ((ExperimentalLanguageSpecificInstrumentationPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfigModel.java index e6400c850aa..f1f04e3d0c7 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfigModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfigModel.java @@ -15,36 +15,28 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"enabled", "minimum_severity", "trace_based"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalLoggerConfigModel { - /** - * Configure if the logger is enabled or not. If omitted or null, true is used. - * - *

(Can be null) - */ - @Nullable + /** Configure if the logger is enabled or not. If omitted or null, true is used. */ @JsonProperty("enabled") @JsonPropertyDescription( "Configure if the logger is enabled or not.\nIf omitted or null, true is used.\n") + @Nullable private Boolean enabled; - /** (Can be null) */ - @Nullable @JsonProperty("minimum_severity") + @Nullable private OpenTelemetryConfigurationModel.SeverityNumber minimumSeverity; /** * Configure trace based filtering. If true, log records associated with unsampled trace contexts * traces are not processed. If false, or if a log record is not associated with a trace context, * trace based filtering is not applied. If omitted or null, trace based filtering is not applied. - * - *

(Can be null) */ - @Nullable @JsonProperty("trace_based") @JsonPropertyDescription( "Configure trace based filtering.\nIf true, log records associated with unsampled trace contexts traces are not processed. If false, or if a log record is not associated with a trace context, trace based filtering is not applied.\nIf omitted or null, trace based filtering is not applied.\n") + @Nullable private Boolean traceBased; /** Configure if the logger is enabled or not. If omitted or null, true is used. */ @@ -89,56 +81,43 @@ public ExperimentalLoggerConfigModel withTraceBased(Boolean traceBased) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalLoggerConfigModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("enabled"); - sb.append('='); - sb.append(((this.enabled == null) ? "" : this.enabled)); - sb.append(','); - sb.append("minimumSeverity"); - sb.append('='); - sb.append(((this.minimumSeverity == null) ? "" : this.minimumSeverity)); - sb.append(','); - sb.append("traceBased"); - sb.append('='); - sb.append(((this.traceBased == null) ? "" : this.traceBased)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalLoggerConfigModel{" + + "enabled=" + + enabled + + ", minimumSeverity=" + + minimumSeverity + + ", traceBased=" + + traceBased + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.enabled == null) ? 0 : this.enabled.hashCode())); - result = - ((result * 31) + ((this.minimumSeverity == null) ? 0 : this.minimumSeverity.hashCode())); - result = ((result * 31) + ((this.traceBased == null) ? 0 : this.traceBased.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.enabled == null) ? 0 : this.enabled.hashCode(); + h *= 1000003; + h ^= (this.minimumSeverity == null) ? 0 : this.minimumSeverity.hashCode(); + h *= 1000003; + h ^= (this.traceBased == null) ? 0 : this.traceBased.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalLoggerConfigModel) == false) { - return false; + if (o instanceof ExperimentalLoggerConfigModel) { + ExperimentalLoggerConfigModel that = (ExperimentalLoggerConfigModel) o; + return (this.enabled == null ? that.enabled == null : this.enabled.equals(that.enabled)) + && (this.minimumSeverity == null + ? that.minimumSeverity == null + : this.minimumSeverity.equals(that.minimumSeverity)) + && (this.traceBased == null + ? that.traceBased == null + : this.traceBased.equals(that.traceBased)); } - ExperimentalLoggerConfigModel rhs = ((ExperimentalLoggerConfigModel) other); - return ((((this.enabled == rhs.enabled) - || ((this.enabled != null) && this.enabled.equals(rhs.enabled))) - && ((this.minimumSeverity == rhs.minimumSeverity) - || ((this.minimumSeverity != null) - && this.minimumSeverity.equals(rhs.minimumSeverity)))) - && ((this.traceBased == rhs.traceBased) - || ((this.traceBased != null) && this.traceBased.equals(rhs.traceBased)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfiguratorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfiguratorModel.java index 7f1f9a8d44b..3944c097d6a 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfiguratorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfiguratorModel.java @@ -16,22 +16,16 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"default_config", "loggers"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalLoggerConfiguratorModel { - /** (Can be null) */ - @Nullable @JsonProperty("default_config") + @Nullable private ExperimentalLoggerConfigModel defaultConfig; - /** - * Configure loggers. If omitted, all loggers use .default_config. - * - *

(Can be null) - */ - @Nullable + /** Configure loggers. If omitted, all loggers use .default_config. */ @JsonProperty("loggers") @JsonPropertyDescription("Configure loggers.\nIf omitted, all loggers use .default_config.\n") + @Nullable private List loggers; @JsonProperty("default_config") @@ -61,47 +55,36 @@ public ExperimentalLoggerConfiguratorModel withLoggers( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalLoggerConfiguratorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("defaultConfig"); - sb.append('='); - sb.append(((this.defaultConfig == null) ? "" : this.defaultConfig)); - sb.append(','); - sb.append("loggers"); - sb.append('='); - sb.append(((this.loggers == null) ? "" : this.loggers)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalLoggerConfiguratorModel{" + + "defaultConfig=" + + defaultConfig + + ", loggers=" + + loggers + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.loggers == null) ? 0 : this.loggers.hashCode())); - result = ((result * 31) + ((this.defaultConfig == null) ? 0 : this.defaultConfig.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.defaultConfig == null) ? 0 : this.defaultConfig.hashCode(); + h *= 1000003; + h ^= (this.loggers == null) ? 0 : this.loggers.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalLoggerConfiguratorModel) == false) { - return false; + if (o instanceof ExperimentalLoggerConfiguratorModel) { + ExperimentalLoggerConfiguratorModel that = (ExperimentalLoggerConfiguratorModel) o; + return (this.defaultConfig == null + ? that.defaultConfig == null + : this.defaultConfig.equals(that.defaultConfig)) + && (this.loggers == null ? that.loggers == null : this.loggers.equals(that.loggers)); } - ExperimentalLoggerConfiguratorModel rhs = ((ExperimentalLoggerConfiguratorModel) other); - return (((this.loggers == rhs.loggers) - || ((this.loggers != null) && this.loggers.equals(rhs.loggers))) - && ((this.defaultConfig == rhs.defaultConfig) - || ((this.defaultConfig != null) && this.defaultConfig.equals(rhs.defaultConfig)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerMatcherAndConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerMatcherAndConfigModel.java index f9b0bc43595..5fc2056d28a 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerMatcherAndConfigModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerMatcherAndConfigModel.java @@ -10,13 +10,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"name", "config"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalLoggerMatcherAndConfigModel { /** @@ -31,12 +29,12 @@ public class ExperimentalLoggerMatcherAndConfigModel { @JsonProperty("name") @JsonPropertyDescription( "Configure logger names to match. Matching is case-sensitive, evaluated as follows:\n\n * If the logger name exactly matches.\n * If the logger name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private String name; /** (Required) */ @JsonProperty("config") - @Nonnull + @Nullable private ExperimentalLoggerConfigModel config; /** @@ -73,46 +71,29 @@ public ExperimentalLoggerMatcherAndConfigModel withConfig(ExperimentalLoggerConf @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalLoggerMatcherAndConfigModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null) ? "" : this.name)); - sb.append(','); - sb.append("config"); - sb.append('='); - sb.append(((this.config == null) ? "" : this.config)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalLoggerMatcherAndConfigModel{" + "name=" + name + ", config=" + config + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); - result = ((result * 31) + ((this.config == null) ? 0 : this.config.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.name == null) ? 0 : this.name.hashCode(); + h *= 1000003; + h ^= (this.config == null) ? 0 : this.config.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalLoggerMatcherAndConfigModel) == false) { - return false; + if (o instanceof ExperimentalLoggerMatcherAndConfigModel) { + ExperimentalLoggerMatcherAndConfigModel that = (ExperimentalLoggerMatcherAndConfigModel) o; + return (this.name == null ? that.name == null : this.name.equals(that.name)) + && (this.config == null ? that.config == null : this.config.equals(that.config)); } - ExperimentalLoggerMatcherAndConfigModel rhs = ((ExperimentalLoggerMatcherAndConfigModel) other); - return (((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) - && ((this.config == rhs.config) - || ((this.config != null) && this.config.equals(rhs.config)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMessagingInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMessagingInstrumentationModel.java index 2947053db44..779d10a5a37 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMessagingInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMessagingInstrumentationModel.java @@ -14,12 +14,10 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"semconv"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalMessagingInstrumentationModel { - /** (Can be null) */ - @Nullable @JsonProperty("semconv") + @Nullable private ExperimentalSemconvConfigModel semconv; @JsonProperty("semconv") @@ -36,41 +34,27 @@ public ExperimentalMessagingInstrumentationModel withSemconv( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalMessagingInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("semconv"); - sb.append('='); - sb.append(((this.semconv == null) ? "" : this.semconv)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalMessagingInstrumentationModel{" + "semconv=" + semconv + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.semconv == null) ? 0 : this.semconv.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalMessagingInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalMessagingInstrumentationModel) { + ExperimentalMessagingInstrumentationModel that = + (ExperimentalMessagingInstrumentationModel) o; + return (this.semconv == null ? that.semconv == null : this.semconv.equals(that.semconv)); } - ExperimentalMessagingInstrumentationModel rhs = - ((ExperimentalMessagingInstrumentationModel) other); - return ((this.semconv == rhs.semconv) - || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfigModel.java index 71ec5118d41..8d3e6522049 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfigModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfigModel.java @@ -15,17 +15,12 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"enabled"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalMeterConfigModel { - /** - * Configure if the meter is enabled or not. If omitted, true is used. - * - *

(Can be null) - */ - @Nullable + /** Configure if the meter is enabled or not. If omitted, true is used. */ @JsonProperty("enabled") @JsonPropertyDescription("Configure if the meter is enabled or not.\nIf omitted, true is used.\n") + @Nullable private Boolean enabled; /** Configure if the meter is enabled or not. If omitted, true is used. */ @@ -42,40 +37,26 @@ public ExperimentalMeterConfigModel withEnabled(Boolean enabled) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalMeterConfigModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("enabled"); - sb.append('='); - sb.append(((this.enabled == null) ? "" : this.enabled)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalMeterConfigModel{" + "enabled=" + enabled + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.enabled == null) ? 0 : this.enabled.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.enabled == null) ? 0 : this.enabled.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalMeterConfigModel) == false) { - return false; + if (o instanceof ExperimentalMeterConfigModel) { + ExperimentalMeterConfigModel that = (ExperimentalMeterConfigModel) o; + return (this.enabled == null ? that.enabled == null : this.enabled.equals(that.enabled)); } - ExperimentalMeterConfigModel rhs = ((ExperimentalMeterConfigModel) other); - return ((this.enabled == rhs.enabled) - || ((this.enabled != null) && this.enabled.equals(rhs.enabled))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfiguratorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfiguratorModel.java index c224da4e51a..9dc8fcf1c5e 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfiguratorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfiguratorModel.java @@ -16,22 +16,16 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"default_config", "meters"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalMeterConfiguratorModel { - /** (Can be null) */ - @Nullable @JsonProperty("default_config") + @Nullable private ExperimentalMeterConfigModel defaultConfig; - /** - * Configure meters. If omitted, all meters used .default_config. - * - *

(Can be null) - */ - @Nullable + /** Configure meters. If omitted, all meters used .default_config. */ @JsonProperty("meters") @JsonPropertyDescription("Configure meters.\nIf omitted, all meters used .default_config.\n") + @Nullable private List meters; @JsonProperty("default_config") @@ -61,47 +55,36 @@ public ExperimentalMeterConfiguratorModel withMeters( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalMeterConfiguratorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("defaultConfig"); - sb.append('='); - sb.append(((this.defaultConfig == null) ? "" : this.defaultConfig)); - sb.append(','); - sb.append("meters"); - sb.append('='); - sb.append(((this.meters == null) ? "" : this.meters)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalMeterConfiguratorModel{" + + "defaultConfig=" + + defaultConfig + + ", meters=" + + meters + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.defaultConfig == null) ? 0 : this.defaultConfig.hashCode())); - result = ((result * 31) + ((this.meters == null) ? 0 : this.meters.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.defaultConfig == null) ? 0 : this.defaultConfig.hashCode(); + h *= 1000003; + h ^= (this.meters == null) ? 0 : this.meters.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalMeterConfiguratorModel) == false) { - return false; + if (o instanceof ExperimentalMeterConfiguratorModel) { + ExperimentalMeterConfiguratorModel that = (ExperimentalMeterConfiguratorModel) o; + return (this.defaultConfig == null + ? that.defaultConfig == null + : this.defaultConfig.equals(that.defaultConfig)) + && (this.meters == null ? that.meters == null : this.meters.equals(that.meters)); } - ExperimentalMeterConfiguratorModel rhs = ((ExperimentalMeterConfiguratorModel) other); - return (((this.defaultConfig == rhs.defaultConfig) - || ((this.defaultConfig != null) && this.defaultConfig.equals(rhs.defaultConfig))) - && ((this.meters == rhs.meters) - || ((this.meters != null) && this.meters.equals(rhs.meters)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterMatcherAndConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterMatcherAndConfigModel.java index 65517f7bc5a..71188e0bbd4 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterMatcherAndConfigModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterMatcherAndConfigModel.java @@ -10,13 +10,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"name", "config"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalMeterMatcherAndConfigModel { /** @@ -31,12 +29,12 @@ public class ExperimentalMeterMatcherAndConfigModel { @JsonProperty("name") @JsonPropertyDescription( "Configure meter names to match. Matching is case-sensitive, evaluated as follows:\n\n * If the meter name exactly matches.\n * If the meter name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private String name; /** (Required) */ @JsonProperty("config") - @Nonnull + @Nullable private ExperimentalMeterConfigModel config; /** @@ -73,46 +71,29 @@ public ExperimentalMeterMatcherAndConfigModel withConfig(ExperimentalMeterConfig @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalMeterMatcherAndConfigModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null) ? "" : this.name)); - sb.append(','); - sb.append("config"); - sb.append('='); - sb.append(((this.config == null) ? "" : this.config)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalMeterMatcherAndConfigModel{" + "name=" + name + ", config=" + config + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); - result = ((result * 31) + ((this.config == null) ? 0 : this.config.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.name == null) ? 0 : this.name.hashCode(); + h *= 1000003; + h ^= (this.config == null) ? 0 : this.config.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalMeterMatcherAndConfigModel) == false) { - return false; + if (o instanceof ExperimentalMeterMatcherAndConfigModel) { + ExperimentalMeterMatcherAndConfigModel that = (ExperimentalMeterMatcherAndConfigModel) o; + return (this.name == null ? that.name == null : this.name.equals(that.name)) + && (this.config == null ? that.config == null : this.config.equals(that.config)); } - ExperimentalMeterMatcherAndConfigModel rhs = ((ExperimentalMeterMatcherAndConfigModel) other); - return (((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) - && ((this.config == rhs.config) - || ((this.config != null) && this.config.equals(rhs.config)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileExporterModel.java index 27f052b37d4..dac535d2329 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileExporterModel.java @@ -15,19 +15,16 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"output_stream"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalOtlpFileExporterModel { /** * Configure output stream. Values include stdout, or scheme+destination. For example: * file:///path/to/file.jsonl. If omitted or null, stdout is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("output_stream") @JsonPropertyDescription( "Configure output stream. \nValues include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.\nIf omitted or null, stdout is used.\n") + @Nullable private String outputStream; /** @@ -47,40 +44,28 @@ public ExperimentalOtlpFileExporterModel withOutputStream(String outputStream) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalOtlpFileExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("outputStream"); - sb.append('='); - sb.append(((this.outputStream == null) ? "" : this.outputStream)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalOtlpFileExporterModel{" + "outputStream=" + outputStream + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.outputStream == null) ? 0 : this.outputStream.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.outputStream == null) ? 0 : this.outputStream.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalOtlpFileExporterModel) == false) { - return false; + if (o instanceof ExperimentalOtlpFileExporterModel) { + ExperimentalOtlpFileExporterModel that = (ExperimentalOtlpFileExporterModel) o; + return (this.outputStream == null + ? that.outputStream == null + : this.outputStream.equals(that.outputStream)); } - ExperimentalOtlpFileExporterModel rhs = ((ExperimentalOtlpFileExporterModel) other); - return ((this.outputStream == rhs.outputStream) - || ((this.outputStream != null) && this.outputStream.equals(rhs.outputStream))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileMetricExporterModel.java index 9cd334a6392..b5e7e9b1759 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileMetricExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileMetricExporterModel.java @@ -15,29 +15,24 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"output_stream", "temporality_preference", "default_histogram_aggregation"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalOtlpFileMetricExporterModel { /** * Configure output stream. Values include stdout, or scheme+destination. For example: * file:///path/to/file.jsonl. If omitted or null, stdout is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("output_stream") @JsonPropertyDescription( "Configure output stream. \nValues include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.\nIf omitted or null, stdout is used.\n") + @Nullable private String outputStream; - /** (Can be null) */ - @Nullable @JsonProperty("temporality_preference") + @Nullable private OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference; - /** (Can be null) */ - @Nullable @JsonProperty("default_histogram_aggregation") + @Nullable private OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation defaultHistogramAggregation; @@ -83,63 +78,48 @@ public ExperimentalOtlpFileMetricExporterModel withDefaultHistogramAggregation( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalOtlpFileMetricExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("outputStream"); - sb.append('='); - sb.append(((this.outputStream == null) ? "" : this.outputStream)); - sb.append(','); - sb.append("temporalityPreference"); - sb.append('='); - sb.append(((this.temporalityPreference == null) ? "" : this.temporalityPreference)); - sb.append(','); - sb.append("defaultHistogramAggregation"); - sb.append('='); - sb.append( - ((this.defaultHistogramAggregation == null) ? "" : this.defaultHistogramAggregation)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalOtlpFileMetricExporterModel{" + + "outputStream=" + + outputStream + + ", temporalityPreference=" + + temporalityPreference + + ", defaultHistogramAggregation=" + + defaultHistogramAggregation + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode())); - result = ((result * 31) + ((this.outputStream == null) ? 0 : this.outputStream.hashCode())); - result = - ((result * 31) - + ((this.defaultHistogramAggregation == null) - ? 0 - : this.defaultHistogramAggregation.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.outputStream == null) ? 0 : this.outputStream.hashCode(); + h *= 1000003; + h ^= (this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode(); + h *= 1000003; + h ^= + (this.defaultHistogramAggregation == null) + ? 0 + : this.defaultHistogramAggregation.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalOtlpFileMetricExporterModel) == false) { - return false; + if (o instanceof ExperimentalOtlpFileMetricExporterModel) { + ExperimentalOtlpFileMetricExporterModel that = (ExperimentalOtlpFileMetricExporterModel) o; + return (this.outputStream == null + ? that.outputStream == null + : this.outputStream.equals(that.outputStream)) + && (this.temporalityPreference == null + ? that.temporalityPreference == null + : this.temporalityPreference.equals(that.temporalityPreference)) + && (this.defaultHistogramAggregation == null + ? that.defaultHistogramAggregation == null + : this.defaultHistogramAggregation.equals(that.defaultHistogramAggregation)); } - ExperimentalOtlpFileMetricExporterModel rhs = ((ExperimentalOtlpFileMetricExporterModel) other); - return ((((this.temporalityPreference == rhs.temporalityPreference) - || ((this.temporalityPreference != null) - && this.temporalityPreference.equals(rhs.temporalityPreference))) - && ((this.outputStream == rhs.outputStream) - || ((this.outputStream != null) && this.outputStream.equals(rhs.outputStream)))) - && ((this.defaultHistogramAggregation == rhs.defaultHistogramAggregation) - || ((this.defaultHistogramAggregation != null) - && this.defaultHistogramAggregation.equals(rhs.defaultHistogramAggregation)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProbabilitySamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProbabilitySamplerModel.java index 58aca807e93..a4de396cb18 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProbabilitySamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProbabilitySamplerModel.java @@ -15,17 +15,12 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"ratio"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalProbabilitySamplerModel { - /** - * Configure ratio. If omitted or null, 1.0 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure ratio. If omitted or null, 1.0 is used. */ @JsonProperty("ratio") @JsonPropertyDescription("Configure ratio.\nIf omitted or null, 1.0 is used.\n") + @Nullable private Double ratio; /** Configure ratio. If omitted or null, 1.0 is used. */ @@ -42,39 +37,26 @@ public ExperimentalProbabilitySamplerModel withRatio(Double ratio) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalProbabilitySamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("ratio"); - sb.append('='); - sb.append(((this.ratio == null) ? "" : this.ratio)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalProbabilitySamplerModel{" + "ratio=" + ratio + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.ratio == null) ? 0 : this.ratio.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.ratio == null) ? 0 : this.ratio.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalProbabilitySamplerModel) == false) { - return false; + if (o instanceof ExperimentalProbabilitySamplerModel) { + ExperimentalProbabilitySamplerModel that = (ExperimentalProbabilitySamplerModel) o; + return (this.ratio == null ? that.ratio == null : this.ratio.equals(that.ratio)); } - ExperimentalProbabilitySamplerModel rhs = ((ExperimentalProbabilitySamplerModel) other); - return ((this.ratio == rhs.ratio) || ((this.ratio != null) && this.ratio.equals(rhs.ratio))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProcessResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProcessResourceDetectorModel.java index 15cd06a56dd..b6957068a75 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProcessResourceDetectorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProcessResourceDetectorModel.java @@ -8,44 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalProcessResourceDetectorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalProcessResourceDetectorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalProcessResourceDetectorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalProcessResourceDetectorModel) == false) { - return false; + if (o instanceof ExperimentalProcessResourceDetectorModel) { + ExperimentalProcessResourceDetectorModel that = (ExperimentalProcessResourceDetectorModel) o; + return true; } - ExperimentalProcessResourceDetectorModel rhs = - ((ExperimentalProcessResourceDetectorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalPrometheusMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalPrometheusMetricExporterModel.java index 73f3b0cea85..a668e0b1511 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalPrometheusMetricExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalPrometheusMetricExporterModel.java @@ -26,61 +26,46 @@ "translation_strategy" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalPrometheusMetricExporterModel { - /** - * Configure host. If omitted or null, localhost is used. - * - *

(Can be null) - */ - @Nullable + /** Configure host. If omitted or null, localhost is used. */ @JsonProperty("host") @JsonPropertyDescription("Configure host.\nIf omitted or null, localhost is used.\n") + @Nullable private String host; - /** - * Configure port. If omitted or null, 9464 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure port. If omitted or null, 9464 is used. */ @JsonProperty("port") @JsonPropertyDescription("Configure port.\nIf omitted or null, 9464 is used.\n") + @Nullable private Integer port; /** * Configure Prometheus Exporter to produce metrics with scope labels. If omitted or null, true is * used. - * - *

(Can be null) */ - @Nullable @JsonProperty("scope_info_enabled") @JsonPropertyDescription( "Configure Prometheus Exporter to produce metrics with scope labels.\nIf omitted or null, true is used.\n") + @Nullable private Boolean scopeInfoEnabled; /** * Configure Prometheus Exporter to produce metrics with a target info metric for the resource. If * omitted or null, true is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("target_info_enabled/development") @JsonPropertyDescription( "Configure Prometheus Exporter to produce metrics with a target info metric for the resource.\nIf omitted or null, true is used.\n") + @Nullable private Boolean targetInfoEnabledDevelopment; - /** (Can be null) */ - @Nullable @JsonProperty("resource_constant_labels") + @Nullable private IncludeExcludeModel resourceConstantLabels; - /** (Can be null) */ - @Nullable @JsonProperty("translation_strategy") + @Nullable private ExperimentalPrometheusMetricExporterModel.ExperimentalPrometheusTranslationStrategy translationStrategy; @@ -167,96 +152,70 @@ public ExperimentalPrometheusMetricExporterModel withTranslationStrategy( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalPrometheusMetricExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("host"); - sb.append('='); - sb.append(((this.host == null) ? "" : this.host)); - sb.append(','); - sb.append("port"); - sb.append('='); - sb.append(((this.port == null) ? "" : this.port)); - sb.append(','); - sb.append("scopeInfoEnabled"); - sb.append('='); - sb.append(((this.scopeInfoEnabled == null) ? "" : this.scopeInfoEnabled)); - sb.append(','); - sb.append("targetInfoEnabledDevelopment"); - sb.append('='); - sb.append( - ((this.targetInfoEnabledDevelopment == null) - ? "" - : this.targetInfoEnabledDevelopment)); - sb.append(','); - sb.append("resourceConstantLabels"); - sb.append('='); - sb.append(((this.resourceConstantLabels == null) ? "" : this.resourceConstantLabels)); - sb.append(','); - sb.append("translationStrategy"); - sb.append('='); - sb.append(((this.translationStrategy == null) ? "" : this.translationStrategy)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalPrometheusMetricExporterModel{" + + "host=" + + host + + ", port=" + + port + + ", scopeInfoEnabled=" + + scopeInfoEnabled + + ", targetInfoEnabledDevelopment=" + + targetInfoEnabledDevelopment + + ", resourceConstantLabels=" + + resourceConstantLabels + + ", translationStrategy=" + + translationStrategy + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.host == null) ? 0 : this.host.hashCode())); - result = - ((result * 31) - + ((this.targetInfoEnabledDevelopment == null) - ? 0 - : this.targetInfoEnabledDevelopment.hashCode())); - result = - ((result * 31) - + ((this.resourceConstantLabels == null) ? 0 : this.resourceConstantLabels.hashCode())); - result = ((result * 31) + ((this.port == null) ? 0 : this.port.hashCode())); - result = - ((result * 31) - + ((this.translationStrategy == null) ? 0 : this.translationStrategy.hashCode())); - result = - ((result * 31) + ((this.scopeInfoEnabled == null) ? 0 : this.scopeInfoEnabled.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.host == null) ? 0 : this.host.hashCode(); + h *= 1000003; + h ^= (this.port == null) ? 0 : this.port.hashCode(); + h *= 1000003; + h ^= (this.scopeInfoEnabled == null) ? 0 : this.scopeInfoEnabled.hashCode(); + h *= 1000003; + h ^= + (this.targetInfoEnabledDevelopment == null) + ? 0 + : this.targetInfoEnabledDevelopment.hashCode(); + h *= 1000003; + h ^= (this.resourceConstantLabels == null) ? 0 : this.resourceConstantLabels.hashCode(); + h *= 1000003; + h ^= (this.translationStrategy == null) ? 0 : this.translationStrategy.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalPrometheusMetricExporterModel) == false) { - return false; + if (o instanceof ExperimentalPrometheusMetricExporterModel) { + ExperimentalPrometheusMetricExporterModel that = + (ExperimentalPrometheusMetricExporterModel) o; + return (this.host == null ? that.host == null : this.host.equals(that.host)) + && (this.port == null ? that.port == null : this.port.equals(that.port)) + && (this.scopeInfoEnabled == null + ? that.scopeInfoEnabled == null + : this.scopeInfoEnabled.equals(that.scopeInfoEnabled)) + && (this.targetInfoEnabledDevelopment == null + ? that.targetInfoEnabledDevelopment == null + : this.targetInfoEnabledDevelopment.equals(that.targetInfoEnabledDevelopment)) + && (this.resourceConstantLabels == null + ? that.resourceConstantLabels == null + : this.resourceConstantLabels.equals(that.resourceConstantLabels)) + && (this.translationStrategy == null + ? that.translationStrategy == null + : this.translationStrategy.equals(that.translationStrategy)); } - ExperimentalPrometheusMetricExporterModel rhs = - ((ExperimentalPrometheusMetricExporterModel) other); - return (((((((this.host == rhs.host) || ((this.host != null) && this.host.equals(rhs.host))) - && ((this.targetInfoEnabledDevelopment == rhs.targetInfoEnabledDevelopment) - || ((this.targetInfoEnabledDevelopment != null) - && this.targetInfoEnabledDevelopment.equals( - rhs.targetInfoEnabledDevelopment)))) - && ((this.resourceConstantLabels == rhs.resourceConstantLabels) - || ((this.resourceConstantLabels != null) - && this.resourceConstantLabels.equals(rhs.resourceConstantLabels)))) - && ((this.port == rhs.port) || ((this.port != null) && this.port.equals(rhs.port)))) - && ((this.translationStrategy == rhs.translationStrategy) - || ((this.translationStrategy != null) - && this.translationStrategy.equals(rhs.translationStrategy)))) - && ((this.scopeInfoEnabled == rhs.scopeInfoEnabled) - || ((this.scopeInfoEnabled != null) - && this.scopeInfoEnabled.equals(rhs.scopeInfoEnabled)))); + return false; } @Generated("jsonschema2pojo") - @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum ExperimentalPrometheusTranslationStrategy { UNDERSCORE_ESCAPING_WITH_SUFFIXES("underscore_escaping_with_suffixes"), UNDERSCORE_ESCAPING_WITHOUT_SUFFIXES_DEVELOPMENT( diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectionModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectionModel.java index 67436340b48..85cb894c4f3 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectionModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectionModel.java @@ -16,25 +16,21 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"attributes", "detectors"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalResourceDetectionModel { - /** (Can be null) */ - @Nullable @JsonProperty("attributes") + @Nullable private IncludeExcludeModel attributes; /** * Configure resource detectors. Resource detector names are dependent on the SDK language * ecosystem. Please consult documentation for each respective language. If omitted, no resource * detectors are enabled. - * - *

(Can be null) */ - @Nullable @JsonProperty("detectors") @JsonPropertyDescription( "Configure resource detectors.\nResource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language. \nIf omitted, no resource detectors are enabled.\n") + @Nullable private List detectors; @JsonProperty("attributes") @@ -67,47 +63,38 @@ public ExperimentalResourceDetectionModel withDetectors( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalResourceDetectionModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("attributes"); - sb.append('='); - sb.append(((this.attributes == null) ? "" : this.attributes)); - sb.append(','); - sb.append("detectors"); - sb.append('='); - sb.append(((this.detectors == null) ? "" : this.detectors)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalResourceDetectionModel{" + + "attributes=" + + attributes + + ", detectors=" + + detectors + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.attributes == null) ? 0 : this.attributes.hashCode())); - result = ((result * 31) + ((this.detectors == null) ? 0 : this.detectors.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.attributes == null) ? 0 : this.attributes.hashCode(); + h *= 1000003; + h ^= (this.detectors == null) ? 0 : this.detectors.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalResourceDetectionModel) == false) { - return false; + if (o instanceof ExperimentalResourceDetectionModel) { + ExperimentalResourceDetectionModel that = (ExperimentalResourceDetectionModel) o; + return (this.attributes == null + ? that.attributes == null + : this.attributes.equals(that.attributes)) + && (this.detectors == null + ? that.detectors == null + : this.detectors.equals(that.detectors)); } - ExperimentalResourceDetectionModel rhs = ((ExperimentalResourceDetectionModel) other); - return (((this.attributes == rhs.attributes) - || ((this.attributes != null) && this.attributes.equals(rhs.attributes))) - && ((this.detectors == rhs.detectors) - || ((this.detectors != null) && this.detectors.equals(rhs.detectors)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorModel.java index e6741245c35..3646842d52e 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorModel.java @@ -19,27 +19,22 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"container", "host", "process", "service"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalResourceDetectorModel { - /** (Can be null) */ - @Nullable @JsonProperty("container") + @Nullable private ExperimentalContainerResourceDetectorModel container; - /** (Can be null) */ - @Nullable @JsonProperty("host") + @Nullable private ExperimentalHostResourceDetectorModel host; - /** (Can be null) */ - @Nullable @JsonProperty("process") + @Nullable private ExperimentalProcessResourceDetectorModel process; - /** (Can be null) */ - @Nullable @JsonProperty("service") + @Nullable private ExperimentalServiceResourceDetectorModel service; @JsonIgnore @@ -111,71 +106,53 @@ public ExperimentalResourceDetectorModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalResourceDetectorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("container"); - sb.append('='); - sb.append(((this.container == null) ? "" : this.container)); - sb.append(','); - sb.append("host"); - sb.append('='); - sb.append(((this.host == null) ? "" : this.host)); - sb.append(','); - sb.append("process"); - sb.append('='); - sb.append(((this.process == null) ? "" : this.process)); - sb.append(','); - sb.append("service"); - sb.append('='); - sb.append(((this.service == null) ? "" : this.service)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalResourceDetectorModel{" + + "container=" + + container + + ", host=" + + host + + ", process=" + + process + + ", service=" + + service + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.container == null) ? 0 : this.container.hashCode())); - result = ((result * 31) + ((this.host == null) ? 0 : this.host.hashCode())); - result = ((result * 31) + ((this.process == null) ? 0 : this.process.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - result = ((result * 31) + ((this.service == null) ? 0 : this.service.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.container == null) ? 0 : this.container.hashCode(); + h *= 1000003; + h ^= (this.host == null) ? 0 : this.host.hashCode(); + h *= 1000003; + h ^= (this.process == null) ? 0 : this.process.hashCode(); + h *= 1000003; + h ^= (this.service == null) ? 0 : this.service.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalResourceDetectorModel) == false) { - return false; + if (o instanceof ExperimentalResourceDetectorModel) { + ExperimentalResourceDetectorModel that = (ExperimentalResourceDetectorModel) o; + return (this.container == null + ? that.container == null + : this.container.equals(that.container)) + && (this.host == null ? that.host == null : this.host.equals(that.host)) + && (this.process == null ? that.process == null : this.process.equals(that.process)) + && (this.service == null ? that.service == null : this.service.equals(that.service)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - ExperimentalResourceDetectorModel rhs = ((ExperimentalResourceDetectorModel) other); - return ((((((this.container == rhs.container) - || ((this.container != null) && this.container.equals(rhs.container))) - && ((this.host == rhs.host) - || ((this.host != null) && this.host.equals(rhs.host)))) - && ((this.process == rhs.process) - || ((this.process != null) && this.process.equals(rhs.process)))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))) - && ((this.service == rhs.service) - || ((this.service != null) && this.service.equals(rhs.service)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorPropertyModel.java index 61e7284a37e..1ec4c31d82a 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalResourceDetectorPropertyModel { @JsonIgnore @@ -41,44 +41,32 @@ public ExperimentalResourceDetectorPropertyModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalResourceDetectorPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalResourceDetectorPropertyModel{" + + "additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalResourceDetectorPropertyModel) == false) { - return false; + if (o instanceof ExperimentalResourceDetectorPropertyModel) { + ExperimentalResourceDetectorPropertyModel that = + (ExperimentalResourceDetectorPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - ExperimentalResourceDetectorPropertyModel rhs = - ((ExperimentalResourceDetectorPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalRpcInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalRpcInstrumentationModel.java index f8c1264789d..cb055c75d30 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalRpcInstrumentationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalRpcInstrumentationModel.java @@ -14,12 +14,10 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"semconv"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalRpcInstrumentationModel { - /** (Can be null) */ - @Nullable @JsonProperty("semconv") + @Nullable private ExperimentalSemconvConfigModel semconv; @JsonProperty("semconv") @@ -35,40 +33,26 @@ public ExperimentalRpcInstrumentationModel withSemconv(ExperimentalSemconvConfig @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalRpcInstrumentationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("semconv"); - sb.append('='); - sb.append(((this.semconv == null) ? "" : this.semconv)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalRpcInstrumentationModel{" + "semconv=" + semconv + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.semconv == null) ? 0 : this.semconv.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalRpcInstrumentationModel) == false) { - return false; + if (o instanceof ExperimentalRpcInstrumentationModel) { + ExperimentalRpcInstrumentationModel that = (ExperimentalRpcInstrumentationModel) o; + return (this.semconv == null ? that.semconv == null : this.semconv.equals(that.semconv)); } - ExperimentalRpcInstrumentationModel rhs = ((ExperimentalRpcInstrumentationModel) other); - return ((this.semconv == rhs.semconv) - || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSanitizationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSanitizationModel.java index b9eca3640bf..5b47bb0aab3 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSanitizationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSanitizationModel.java @@ -14,12 +14,10 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"url"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalSanitizationModel { - /** (Can be null) */ - @Nullable @JsonProperty("url") + @Nullable private ExperimentalUrlSanitizationModel url; @JsonProperty("url") @@ -35,39 +33,26 @@ public ExperimentalSanitizationModel withUrl(ExperimentalUrlSanitizationModel ur @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalSanitizationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("url"); - sb.append('='); - sb.append(((this.url == null) ? "" : this.url)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalSanitizationModel{" + "url=" + url + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.url == null) ? 0 : this.url.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.url == null) ? 0 : this.url.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalSanitizationModel) == false) { - return false; + if (o instanceof ExperimentalSanitizationModel) { + ExperimentalSanitizationModel that = (ExperimentalSanitizationModel) o; + return (this.url == null ? that.url == null : this.url.equals(that.url)); } - ExperimentalSanitizationModel rhs = ((ExperimentalSanitizationModel) other); - return ((this.url == rhs.url) || ((this.url != null) && this.url.equals(rhs.url))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSemconvConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSemconvConfigModel.java index 79653772ac1..417a0cce8a1 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSemconvConfigModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSemconvConfigModel.java @@ -15,32 +15,27 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"version", "experimental", "dual_emit"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalSemconvConfigModel { /** * The target semantic convention version for this domain (e.g., 1). If omitted or null, the * latest stable version is used, or if no stable version is available and .experimental is true * then the latest experimental version is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("version") @JsonPropertyDescription( "The target semantic convention version for this domain (e.g., 1).\nIf omitted or null, the latest stable version is used, or if no stable version is available and .experimental is true then the latest experimental version is used.\n") + @Nullable private Integer version; /** * Use latest experimental semantic conventions (before stable is available or to enable * experimental features on top of stable conventions). If omitted or null, false is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("experimental") @JsonPropertyDescription( "Use latest experimental semantic conventions (before stable is available or to enable experimental features on top of stable conventions).\nIf omitted or null, false is used.\n") + @Nullable private Boolean experimental; /** @@ -50,13 +45,11 @@ public class ExperimentalSemconvConfigModel { * previous version is the prior stable major version (e.g., version=2, dual_emit=true emits both * v2 and v1). Enables dual-emit for phased migration between versions. If omitted or null, false * is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("dual_emit") @JsonPropertyDescription( "When true, also emit the previous major version alongside the target version.\nFor version=1, the previous version refers to the pre-stable conventions that the instrumentation emitted before the first stable semantic convention version was defined.\nFor version=2 and above, the previous version is the prior stable major version (e.g., version=2, dual_emit=true emits both v2 and v1).\nEnables dual-emit for phased migration between versions.\nIf omitted or null, false is used.\n") + @Nullable private Boolean dualEmit; /** @@ -111,54 +104,41 @@ public ExperimentalSemconvConfigModel withDualEmit(Boolean dualEmit) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalSemconvConfigModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("version"); - sb.append('='); - sb.append(((this.version == null) ? "" : this.version)); - sb.append(','); - sb.append("experimental"); - sb.append('='); - sb.append(((this.experimental == null) ? "" : this.experimental)); - sb.append(','); - sb.append("dualEmit"); - sb.append('='); - sb.append(((this.dualEmit == null) ? "" : this.dualEmit)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalSemconvConfigModel{" + + "version=" + + version + + ", experimental=" + + experimental + + ", dualEmit=" + + dualEmit + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.dualEmit == null) ? 0 : this.dualEmit.hashCode())); - result = ((result * 31) + ((this.version == null) ? 0 : this.version.hashCode())); - result = ((result * 31) + ((this.experimental == null) ? 0 : this.experimental.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.version == null) ? 0 : this.version.hashCode(); + h *= 1000003; + h ^= (this.experimental == null) ? 0 : this.experimental.hashCode(); + h *= 1000003; + h ^= (this.dualEmit == null) ? 0 : this.dualEmit.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalSemconvConfigModel) == false) { - return false; + if (o instanceof ExperimentalSemconvConfigModel) { + ExperimentalSemconvConfigModel that = (ExperimentalSemconvConfigModel) o; + return (this.version == null ? that.version == null : this.version.equals(that.version)) + && (this.experimental == null + ? that.experimental == null + : this.experimental.equals(that.experimental)) + && (this.dualEmit == null ? that.dualEmit == null : this.dualEmit.equals(that.dualEmit)); } - ExperimentalSemconvConfigModel rhs = ((ExperimentalSemconvConfigModel) other); - return ((((this.dualEmit == rhs.dualEmit) - || ((this.dualEmit != null) && this.dualEmit.equals(rhs.dualEmit))) - && ((this.version == rhs.version) - || ((this.version != null) && this.version.equals(rhs.version)))) - && ((this.experimental == rhs.experimental) - || ((this.experimental != null) && this.experimental.equals(rhs.experimental)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalServiceResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalServiceResourceDetectorModel.java index ee3d225dc3b..09b10866d65 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalServiceResourceDetectorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalServiceResourceDetectorModel.java @@ -8,44 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalServiceResourceDetectorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalServiceResourceDetectorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalServiceResourceDetectorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalServiceResourceDetectorModel) == false) { - return false; + if (o instanceof ExperimentalServiceResourceDetectorModel) { + ExperimentalServiceResourceDetectorModel that = (ExperimentalServiceResourceDetectorModel) o; + return true; } - ExperimentalServiceResourceDetectorModel rhs = - ((ExperimentalServiceResourceDetectorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSpanParent.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSpanParent.java index 3f8a7fc894f..08154e7af5a 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSpanParent.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSpanParent.java @@ -12,7 +12,6 @@ import javax.annotation.Generated; @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum ExperimentalSpanParent { NONE("none"), REMOTE("remote"), diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfigModel.java index 4b902b72e19..36a0f3c8206 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfigModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfigModel.java @@ -15,18 +15,13 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"enabled"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalTracerConfigModel { - /** - * Configure if the tracer is enabled or not. If omitted, true is used. - * - *

(Can be null) - */ - @Nullable + /** Configure if the tracer is enabled or not. If omitted, true is used. */ @JsonProperty("enabled") @JsonPropertyDescription( "Configure if the tracer is enabled or not.\nIf omitted, true is used.\n") + @Nullable private Boolean enabled; /** Configure if the tracer is enabled or not. If omitted, true is used. */ @@ -43,40 +38,26 @@ public ExperimentalTracerConfigModel withEnabled(Boolean enabled) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalTracerConfigModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("enabled"); - sb.append('='); - sb.append(((this.enabled == null) ? "" : this.enabled)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalTracerConfigModel{" + "enabled=" + enabled + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.enabled == null) ? 0 : this.enabled.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.enabled == null) ? 0 : this.enabled.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalTracerConfigModel) == false) { - return false; + if (o instanceof ExperimentalTracerConfigModel) { + ExperimentalTracerConfigModel that = (ExperimentalTracerConfigModel) o; + return (this.enabled == null ? that.enabled == null : this.enabled.equals(that.enabled)); } - ExperimentalTracerConfigModel rhs = ((ExperimentalTracerConfigModel) other); - return ((this.enabled == rhs.enabled) - || ((this.enabled != null) && this.enabled.equals(rhs.enabled))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfiguratorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfiguratorModel.java index b404ea4fe7a..7e97f65765f 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfiguratorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfiguratorModel.java @@ -16,22 +16,16 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"default_config", "tracers"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalTracerConfiguratorModel { - /** (Can be null) */ - @Nullable @JsonProperty("default_config") + @Nullable private ExperimentalTracerConfigModel defaultConfig; - /** - * Configure tracers. If omitted, all tracers use .default_config. - * - *

(Can be null) - */ - @Nullable + /** Configure tracers. If omitted, all tracers use .default_config. */ @JsonProperty("tracers") @JsonPropertyDescription("Configure tracers.\nIf omitted, all tracers use .default_config.\n") + @Nullable private List tracers; @JsonProperty("default_config") @@ -61,47 +55,36 @@ public ExperimentalTracerConfiguratorModel withTracers( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalTracerConfiguratorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("defaultConfig"); - sb.append('='); - sb.append(((this.defaultConfig == null) ? "" : this.defaultConfig)); - sb.append(','); - sb.append("tracers"); - sb.append('='); - sb.append(((this.tracers == null) ? "" : this.tracers)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalTracerConfiguratorModel{" + + "defaultConfig=" + + defaultConfig + + ", tracers=" + + tracers + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.tracers == null) ? 0 : this.tracers.hashCode())); - result = ((result * 31) + ((this.defaultConfig == null) ? 0 : this.defaultConfig.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.defaultConfig == null) ? 0 : this.defaultConfig.hashCode(); + h *= 1000003; + h ^= (this.tracers == null) ? 0 : this.tracers.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalTracerConfiguratorModel) == false) { - return false; + if (o instanceof ExperimentalTracerConfiguratorModel) { + ExperimentalTracerConfiguratorModel that = (ExperimentalTracerConfiguratorModel) o; + return (this.defaultConfig == null + ? that.defaultConfig == null + : this.defaultConfig.equals(that.defaultConfig)) + && (this.tracers == null ? that.tracers == null : this.tracers.equals(that.tracers)); } - ExperimentalTracerConfiguratorModel rhs = ((ExperimentalTracerConfiguratorModel) other); - return (((this.tracers == rhs.tracers) - || ((this.tracers != null) && this.tracers.equals(rhs.tracers))) - && ((this.defaultConfig == rhs.defaultConfig) - || ((this.defaultConfig != null) && this.defaultConfig.equals(rhs.defaultConfig)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerMatcherAndConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerMatcherAndConfigModel.java index f89f2af9679..160fa6a335e 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerMatcherAndConfigModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerMatcherAndConfigModel.java @@ -10,13 +10,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"name", "config"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalTracerMatcherAndConfigModel { /** @@ -31,12 +29,12 @@ public class ExperimentalTracerMatcherAndConfigModel { @JsonProperty("name") @JsonPropertyDescription( "Configure tracer names to match. Matching is case-sensitive, evaluated as follows:\n\n * If the tracer name exactly matches.\n * If the tracer name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private String name; /** (Required) */ @JsonProperty("config") - @Nonnull + @Nullable private ExperimentalTracerConfigModel config; /** @@ -73,46 +71,29 @@ public ExperimentalTracerMatcherAndConfigModel withConfig(ExperimentalTracerConf @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalTracerMatcherAndConfigModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null) ? "" : this.name)); - sb.append(','); - sb.append("config"); - sb.append('='); - sb.append(((this.config == null) ? "" : this.config)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalTracerMatcherAndConfigModel{" + "name=" + name + ", config=" + config + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); - result = ((result * 31) + ((this.config == null) ? 0 : this.config.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.name == null) ? 0 : this.name.hashCode(); + h *= 1000003; + h ^= (this.config == null) ? 0 : this.config.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalTracerMatcherAndConfigModel) == false) { - return false; + if (o instanceof ExperimentalTracerMatcherAndConfigModel) { + ExperimentalTracerMatcherAndConfigModel that = (ExperimentalTracerMatcherAndConfigModel) o; + return (this.name == null ? that.name == null : this.name.equals(that.name)) + && (this.config == null ? that.config == null : this.config.equals(that.config)); } - ExperimentalTracerMatcherAndConfigModel rhs = ((ExperimentalTracerMatcherAndConfigModel) other); - return (((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) - && ((this.config == rhs.config) - || ((this.config != null) && this.config.equals(rhs.config)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalUrlSanitizationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalUrlSanitizationModel.java index e4d744965a1..87e16f0cd3b 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalUrlSanitizationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalUrlSanitizationModel.java @@ -16,7 +16,6 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"sensitive_query_parameters"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExperimentalUrlSanitizationModel { /** @@ -27,13 +26,11 @@ public class ExperimentalUrlSanitizationModel { * url semantic conventions * (https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/url.md) * is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("sensitive_query_parameters") @JsonPropertyDescription( "List of query parameter names whose values should be redacted from URLs.\nQuery parameter names are case-sensitive.\nThis is a full override of the default sensitive query parameter keys, it is not a list of keys in addition to the defaults.\nSet to an empty array to disable query parameter redaction.\nIf omitted, the default sensitive query parameter list as defined by the url semantic conventions (https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/url.md) is used.\n") + @Nullable private List sensitiveQueryParameters; /** @@ -59,45 +56,31 @@ public ExperimentalUrlSanitizationModel withSensitiveQueryParameters( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExperimentalUrlSanitizationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("sensitiveQueryParameters"); - sb.append('='); - sb.append(((this.sensitiveQueryParameters == null) ? "" : this.sensitiveQueryParameters)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExperimentalUrlSanitizationModel{" + + "sensitiveQueryParameters=" + + sensitiveQueryParameters + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.sensitiveQueryParameters == null) - ? 0 - : this.sensitiveQueryParameters.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.sensitiveQueryParameters == null) ? 0 : this.sensitiveQueryParameters.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExperimentalUrlSanitizationModel) == false) { - return false; + if (o instanceof ExperimentalUrlSanitizationModel) { + ExperimentalUrlSanitizationModel that = (ExperimentalUrlSanitizationModel) o; + return (this.sensitiveQueryParameters == null + ? that.sensitiveQueryParameters == null + : this.sensitiveQueryParameters.equals(that.sensitiveQueryParameters)); } - ExperimentalUrlSanitizationModel rhs = ((ExperimentalUrlSanitizationModel) other); - return ((this.sensitiveQueryParameters == rhs.sensitiveQueryParameters) - || ((this.sensitiveQueryParameters != null) - && this.sensitiveQueryParameters.equals(rhs.sensitiveQueryParameters))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExplicitBucketHistogramAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExplicitBucketHistogramAggregationModel.java index b093fa96c8f..e6a986d3325 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExplicitBucketHistogramAggregationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExplicitBucketHistogramAggregationModel.java @@ -16,29 +16,22 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"boundaries", "record_min_max"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ExplicitBucketHistogramAggregationModel { /** * Configure bucket boundaries. If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, * 5000, 7500, 10000] is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("boundaries") @JsonPropertyDescription( "Configure bucket boundaries.\nIf omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] is used.\n") + @Nullable private List boundaries; - /** - * Configure record min and max. If omitted or null, true is used. - * - *

(Can be null) - */ - @Nullable + /** Configure record min and max. If omitted or null, true is used. */ @JsonProperty("record_min_max") @JsonPropertyDescription("Configure record min and max.\nIf omitted or null, true is used.\n") + @Nullable private Boolean recordMinMax; /** @@ -70,47 +63,38 @@ public ExplicitBucketHistogramAggregationModel withRecordMinMax(Boolean recordMi @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ExplicitBucketHistogramAggregationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("boundaries"); - sb.append('='); - sb.append(((this.boundaries == null) ? "" : this.boundaries)); - sb.append(','); - sb.append("recordMinMax"); - sb.append('='); - sb.append(((this.recordMinMax == null) ? "" : this.recordMinMax)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ExplicitBucketHistogramAggregationModel{" + + "boundaries=" + + boundaries + + ", recordMinMax=" + + recordMinMax + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.boundaries == null) ? 0 : this.boundaries.hashCode())); - result = ((result * 31) + ((this.recordMinMax == null) ? 0 : this.recordMinMax.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.boundaries == null) ? 0 : this.boundaries.hashCode(); + h *= 1000003; + h ^= (this.recordMinMax == null) ? 0 : this.recordMinMax.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ExplicitBucketHistogramAggregationModel) == false) { - return false; + if (o instanceof ExplicitBucketHistogramAggregationModel) { + ExplicitBucketHistogramAggregationModel that = (ExplicitBucketHistogramAggregationModel) o; + return (this.boundaries == null + ? that.boundaries == null + : this.boundaries.equals(that.boundaries)) + && (this.recordMinMax == null + ? that.recordMinMax == null + : this.recordMinMax.equals(that.recordMinMax)); } - ExplicitBucketHistogramAggregationModel rhs = ((ExplicitBucketHistogramAggregationModel) other); - return (((this.boundaries == rhs.boundaries) - || ((this.boundaries != null) && this.boundaries.equals(rhs.boundaries))) - && ((this.recordMinMax == rhs.recordMinMax) - || ((this.recordMinMax != null) && this.recordMinMax.equals(rhs.recordMinMax)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/GrpcTlsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/GrpcTlsModel.java index 2aa60745701..20ccc58c50a 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/GrpcTlsModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/GrpcTlsModel.java @@ -15,57 +15,48 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"ca_file", "key_file", "cert_file", "insecure"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class GrpcTlsModel { /** * Configure certificate used to verify a server's TLS credentials. Absolute path to certificate * file in PEM format. If omitted or null, system default certificate verification is used for * secure connections. - * - *

(Can be null) */ - @Nullable @JsonProperty("ca_file") @JsonPropertyDescription( "Configure certificate used to verify a server's TLS credentials. \nAbsolute path to certificate file in PEM format.\nIf omitted or null, system default certificate verification is used for secure connections.\n") + @Nullable private String caFile; /** * Configure mTLS private client key. Absolute path to client key file in PEM format. If set, * .client_certificate must also be set. If omitted or null, mTLS is not used. - * - *

(Can be null) */ - @Nullable @JsonProperty("key_file") @JsonPropertyDescription( "Configure mTLS private client key. \nAbsolute path to client key file in PEM format. If set, .client_certificate must also be set.\nIf omitted or null, mTLS is not used.\n") + @Nullable private String keyFile; /** * Configure mTLS client certificate. Absolute path to client certificate file in PEM format. If * set, .client_key must also be set. If omitted or null, mTLS is not used. - * - *

(Can be null) */ - @Nullable @JsonProperty("cert_file") @JsonPropertyDescription( "Configure mTLS client certificate. \nAbsolute path to client certificate file in PEM format. If set, .client_key must also be set.\nIf omitted or null, mTLS is not used.\n") + @Nullable private String certFile; /** * Configure client transport security for the exporter's connection. Only applicable when * .endpoint is provided without http or https scheme. Implementations may choose to ignore * .insecure. If omitted or null, false is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("insecure") @JsonPropertyDescription( "Configure client transport security for the exporter's connection. \nOnly applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.\nIf omitted or null, false is used.\n") + @Nullable private Boolean insecure; /** @@ -132,61 +123,44 @@ public GrpcTlsModel withInsecure(Boolean insecure) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(GrpcTlsModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("caFile"); - sb.append('='); - sb.append(((this.caFile == null) ? "" : this.caFile)); - sb.append(','); - sb.append("keyFile"); - sb.append('='); - sb.append(((this.keyFile == null) ? "" : this.keyFile)); - sb.append(','); - sb.append("certFile"); - sb.append('='); - sb.append(((this.certFile == null) ? "" : this.certFile)); - sb.append(','); - sb.append("insecure"); - sb.append('='); - sb.append(((this.insecure == null) ? "" : this.insecure)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "GrpcTlsModel{" + + "caFile=" + + caFile + + ", keyFile=" + + keyFile + + ", certFile=" + + certFile + + ", insecure=" + + insecure + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.insecure == null) ? 0 : this.insecure.hashCode())); - result = ((result * 31) + ((this.caFile == null) ? 0 : this.caFile.hashCode())); - result = ((result * 31) + ((this.keyFile == null) ? 0 : this.keyFile.hashCode())); - result = ((result * 31) + ((this.certFile == null) ? 0 : this.certFile.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.caFile == null) ? 0 : this.caFile.hashCode(); + h *= 1000003; + h ^= (this.keyFile == null) ? 0 : this.keyFile.hashCode(); + h *= 1000003; + h ^= (this.certFile == null) ? 0 : this.certFile.hashCode(); + h *= 1000003; + h ^= (this.insecure == null) ? 0 : this.insecure.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof GrpcTlsModel) == false) { - return false; + if (o instanceof GrpcTlsModel) { + GrpcTlsModel that = (GrpcTlsModel) o; + return (this.caFile == null ? that.caFile == null : this.caFile.equals(that.caFile)) + && (this.keyFile == null ? that.keyFile == null : this.keyFile.equals(that.keyFile)) + && (this.certFile == null ? that.certFile == null : this.certFile.equals(that.certFile)) + && (this.insecure == null ? that.insecure == null : this.insecure.equals(that.insecure)); } - GrpcTlsModel rhs = ((GrpcTlsModel) other); - return (((((this.insecure == rhs.insecure) - || ((this.insecure != null) && this.insecure.equals(rhs.insecure))) - && ((this.caFile == rhs.caFile) - || ((this.caFile != null) && this.caFile.equals(rhs.caFile)))) - && ((this.keyFile == rhs.keyFile) - || ((this.keyFile != null) && this.keyFile.equals(rhs.keyFile)))) - && ((this.certFile == rhs.certFile) - || ((this.certFile != null) && this.certFile.equals(rhs.certFile)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/HttpTlsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/HttpTlsModel.java index 6844ca77558..ffdd25de9dc 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/HttpTlsModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/HttpTlsModel.java @@ -15,44 +15,37 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"ca_file", "key_file", "cert_file"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class HttpTlsModel { /** * Configure certificate used to verify a server's TLS credentials. Absolute path to certificate * file in PEM format. If omitted or null, system default certificate verification is used for * secure connections. - * - *

(Can be null) */ - @Nullable @JsonProperty("ca_file") @JsonPropertyDescription( "Configure certificate used to verify a server's TLS credentials. \nAbsolute path to certificate file in PEM format.\nIf omitted or null, system default certificate verification is used for secure connections.\n") + @Nullable private String caFile; /** * Configure mTLS private client key. Absolute path to client key file in PEM format. If set, * .client_certificate must also be set. If omitted or null, mTLS is not used. - * - *

(Can be null) */ - @Nullable @JsonProperty("key_file") @JsonPropertyDescription( "Configure mTLS private client key. \nAbsolute path to client key file in PEM format. If set, .client_certificate must also be set.\nIf omitted or null, mTLS is not used.\n") + @Nullable private String keyFile; /** * Configure mTLS client certificate. Absolute path to client certificate file in PEM format. If * set, .client_key must also be set. If omitted or null, mTLS is not used. - * - *

(Can be null) */ - @Nullable @JsonProperty("cert_file") @JsonPropertyDescription( "Configure mTLS client certificate. \nAbsolute path to client certificate file in PEM format. If set, .client_key must also be set.\nIf omitted or null, mTLS is not used.\n") + @Nullable private String certFile; /** @@ -103,54 +96,39 @@ public HttpTlsModel withCertFile(String certFile) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(HttpTlsModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("caFile"); - sb.append('='); - sb.append(((this.caFile == null) ? "" : this.caFile)); - sb.append(','); - sb.append("keyFile"); - sb.append('='); - sb.append(((this.keyFile == null) ? "" : this.keyFile)); - sb.append(','); - sb.append("certFile"); - sb.append('='); - sb.append(((this.certFile == null) ? "" : this.certFile)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "HttpTlsModel{" + + "caFile=" + + caFile + + ", keyFile=" + + keyFile + + ", certFile=" + + certFile + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.keyFile == null) ? 0 : this.keyFile.hashCode())); - result = ((result * 31) + ((this.caFile == null) ? 0 : this.caFile.hashCode())); - result = ((result * 31) + ((this.certFile == null) ? 0 : this.certFile.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.caFile == null) ? 0 : this.caFile.hashCode(); + h *= 1000003; + h ^= (this.keyFile == null) ? 0 : this.keyFile.hashCode(); + h *= 1000003; + h ^= (this.certFile == null) ? 0 : this.certFile.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof HttpTlsModel) == false) { - return false; + if (o instanceof HttpTlsModel) { + HttpTlsModel that = (HttpTlsModel) o; + return (this.caFile == null ? that.caFile == null : this.caFile.equals(that.caFile)) + && (this.keyFile == null ? that.keyFile == null : this.keyFile.equals(that.keyFile)) + && (this.certFile == null ? that.certFile == null : this.certFile.equals(that.certFile)); } - HttpTlsModel rhs = ((HttpTlsModel) other); - return ((((this.keyFile == rhs.keyFile) - || ((this.keyFile != null) && this.keyFile.equals(rhs.keyFile))) - && ((this.caFile == rhs.caFile) - || ((this.caFile != null) && this.caFile.equals(rhs.caFile)))) - && ((this.certFile == rhs.certFile) - || ((this.certFile != null) && this.certFile.equals(rhs.certFile)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IdGeneratorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IdGeneratorModel.java index d9464dc849f..e5355c129bd 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IdGeneratorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IdGeneratorModel.java @@ -19,12 +19,10 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"random"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class IdGeneratorModel { - /** (Can be null) */ - @Nullable @JsonProperty("random") + @Nullable private RandomIdGeneratorModel random; @JsonIgnore @@ -59,50 +57,36 @@ public IdGeneratorModel withAdditionalProperty(String name, IdGeneratorPropertyM @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(IdGeneratorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("random"); - sb.append('='); - sb.append(((this.random == null) ? "" : this.random)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "IdGeneratorModel{" + + "random=" + + random + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.random == null) ? 0 : this.random.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.random == null) ? 0 : this.random.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof IdGeneratorModel) == false) { - return false; + if (o instanceof IdGeneratorModel) { + IdGeneratorModel that = (IdGeneratorModel) o; + return (this.random == null ? that.random == null : this.random.equals(that.random)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - IdGeneratorModel rhs = ((IdGeneratorModel) other); - return (((this.random == rhs.random) - || ((this.random != null) && this.random.equals(rhs.random))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IdGeneratorPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IdGeneratorPropertyModel.java index e888e97ad18..f8f229d062d 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IdGeneratorPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IdGeneratorPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class IdGeneratorPropertyModel { @JsonIgnore @@ -40,43 +40,28 @@ public IdGeneratorPropertyModel withAdditionalProperty(String name, Object value @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(IdGeneratorPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "IdGeneratorPropertyModel{" + "additionalProperties=" + additionalProperties + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof IdGeneratorPropertyModel) == false) { - return false; + if (o instanceof IdGeneratorPropertyModel) { + IdGeneratorPropertyModel that = (IdGeneratorPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - IdGeneratorPropertyModel rhs = ((IdGeneratorPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IncludeExcludeModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IncludeExcludeModel.java index dbd6c594f7f..cc0fae1a0e7 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IncludeExcludeModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IncludeExcludeModel.java @@ -16,7 +16,6 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"included", "excluded"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class IncludeExcludeModel { /** @@ -24,13 +23,11 @@ public class IncludeExcludeModel { * to match as follows: * If the value exactly matches. * If the value matches the wildcard * pattern, where '?' matches any single character and '*' matches any number of characters * including none. If omitted, all values are included. - * - *

(Can be null) */ - @Nullable @JsonProperty("included") @JsonPropertyDescription( "Configure list of value patterns to include.\nMatching is case-sensitive. Values are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, all values are included.\n") + @Nullable private List included; /** @@ -39,13 +36,11 @@ public class IncludeExcludeModel { * * If the value exactly matches. * If the value matches the wildcard pattern, where '?' matches * any single character and '*' matches any number of characters including none. If omitted, * .included attributes are included. - * - *

(Can be null) */ - @Nullable @JsonProperty("excluded") @JsonPropertyDescription( "Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).\nMatching is case-sensitive. Values are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, .included attributes are included.\n") + @Nullable private List excluded; /** @@ -85,47 +80,29 @@ public IncludeExcludeModel withExcluded(List excluded) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(IncludeExcludeModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("included"); - sb.append('='); - sb.append(((this.included == null) ? "" : this.included)); - sb.append(','); - sb.append("excluded"); - sb.append('='); - sb.append(((this.excluded == null) ? "" : this.excluded)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "IncludeExcludeModel{" + "included=" + included + ", excluded=" + excluded + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.excluded == null) ? 0 : this.excluded.hashCode())); - result = ((result * 31) + ((this.included == null) ? 0 : this.included.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.included == null) ? 0 : this.included.hashCode(); + h *= 1000003; + h ^= (this.excluded == null) ? 0 : this.excluded.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof IncludeExcludeModel) == false) { - return false; + if (o instanceof IncludeExcludeModel) { + IncludeExcludeModel that = (IncludeExcludeModel) o; + return (this.included == null ? that.included == null : this.included.equals(that.included)) + && (this.excluded == null ? that.excluded == null : this.excluded.equals(that.excluded)); } - IncludeExcludeModel rhs = ((IncludeExcludeModel) other); - return (((this.excluded == rhs.excluded) - || ((this.excluded != null) && this.excluded.equals(rhs.excluded))) - && ((this.included == rhs.included) - || ((this.included != null) && this.included.equals(rhs.included)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LastValueAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LastValueAggregationModel.java index 87aedbefada..1cd8bb4a675 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LastValueAggregationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LastValueAggregationModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class LastValueAggregationModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(LastValueAggregationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "LastValueAggregationModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof LastValueAggregationModel) == false) { - return false; + if (o instanceof LastValueAggregationModel) { + LastValueAggregationModel that = (LastValueAggregationModel) o; + return true; } - LastValueAggregationModel rhs = ((LastValueAggregationModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterModel.java index 16fce7edb92..c3a575bd1cf 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterModel.java @@ -19,27 +19,22 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"otlp_http", "otlp_grpc", "otlp_file/development", "console"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class LogRecordExporterModel { - /** (Can be null) */ - @Nullable @JsonProperty("otlp_http") + @Nullable private OtlpHttpExporterModel otlpHttp; - /** (Can be null) */ - @Nullable @JsonProperty("otlp_grpc") + @Nullable private OtlpGrpcExporterModel otlpGrpc; - /** (Can be null) */ - @Nullable @JsonProperty("otlp_file/development") + @Nullable private ExperimentalOtlpFileExporterModel otlpFileDevelopment; - /** (Can be null) */ - @Nullable @JsonProperty("console") + @Nullable private ConsoleExporterModel console; @JsonIgnore @@ -109,74 +104,53 @@ public LogRecordExporterModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(LogRecordExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("otlpHttp"); - sb.append('='); - sb.append(((this.otlpHttp == null) ? "" : this.otlpHttp)); - sb.append(','); - sb.append("otlpGrpc"); - sb.append('='); - sb.append(((this.otlpGrpc == null) ? "" : this.otlpGrpc)); - sb.append(','); - sb.append("otlpFileDevelopment"); - sb.append('='); - sb.append(((this.otlpFileDevelopment == null) ? "" : this.otlpFileDevelopment)); - sb.append(','); - sb.append("console"); - sb.append('='); - sb.append(((this.console == null) ? "" : this.console)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "LogRecordExporterModel{" + + "otlpHttp=" + + otlpHttp + + ", otlpGrpc=" + + otlpGrpc + + ", otlpFileDevelopment=" + + otlpFileDevelopment + + ", console=" + + console + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.console == null) ? 0 : this.console.hashCode())); - result = - ((result * 31) - + ((this.otlpFileDevelopment == null) ? 0 : this.otlpFileDevelopment.hashCode())); - result = ((result * 31) + ((this.otlpGrpc == null) ? 0 : this.otlpGrpc.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - result = ((result * 31) + ((this.otlpHttp == null) ? 0 : this.otlpHttp.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.otlpHttp == null) ? 0 : this.otlpHttp.hashCode(); + h *= 1000003; + h ^= (this.otlpGrpc == null) ? 0 : this.otlpGrpc.hashCode(); + h *= 1000003; + h ^= (this.otlpFileDevelopment == null) ? 0 : this.otlpFileDevelopment.hashCode(); + h *= 1000003; + h ^= (this.console == null) ? 0 : this.console.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof LogRecordExporterModel) == false) { - return false; + if (o instanceof LogRecordExporterModel) { + LogRecordExporterModel that = (LogRecordExporterModel) o; + return (this.otlpHttp == null ? that.otlpHttp == null : this.otlpHttp.equals(that.otlpHttp)) + && (this.otlpGrpc == null ? that.otlpGrpc == null : this.otlpGrpc.equals(that.otlpGrpc)) + && (this.otlpFileDevelopment == null + ? that.otlpFileDevelopment == null + : this.otlpFileDevelopment.equals(that.otlpFileDevelopment)) + && (this.console == null ? that.console == null : this.console.equals(that.console)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - LogRecordExporterModel rhs = ((LogRecordExporterModel) other); - return ((((((this.console == rhs.console) - || ((this.console != null) && this.console.equals(rhs.console))) - && ((this.otlpFileDevelopment == rhs.otlpFileDevelopment) - || ((this.otlpFileDevelopment != null) - && this.otlpFileDevelopment.equals(rhs.otlpFileDevelopment)))) - && ((this.otlpGrpc == rhs.otlpGrpc) - || ((this.otlpGrpc != null) && this.otlpGrpc.equals(rhs.otlpGrpc)))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))) - && ((this.otlpHttp == rhs.otlpHttp) - || ((this.otlpHttp != null) && this.otlpHttp.equals(rhs.otlpHttp)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterPropertyModel.java index a56bace246f..46d946c2c9f 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class LogRecordExporterPropertyModel { @JsonIgnore @@ -40,43 +40,28 @@ public LogRecordExporterPropertyModel withAdditionalProperty(String name, Object @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(LogRecordExporterPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "LogRecordExporterPropertyModel{" + "additionalProperties=" + additionalProperties + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof LogRecordExporterPropertyModel) == false) { - return false; + if (o instanceof LogRecordExporterPropertyModel) { + LogRecordExporterPropertyModel that = (LogRecordExporterPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - LogRecordExporterPropertyModel rhs = ((LogRecordExporterPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordLimitsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordLimitsModel.java index cef2a86e467..ceefd7800b8 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordLimitsModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordLimitsModel.java @@ -15,31 +15,26 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"attribute_value_length_limit", "attribute_count_limit"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class LogRecordLimitsModel { /** * Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. * Value must be non-negative. If omitted or null, there is no limit. - * - *

(Can be null) */ - @Nullable @JsonProperty("attribute_value_length_limit") @JsonPropertyDescription( "Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. \nValue must be non-negative.\nIf omitted or null, there is no limit.\n") + @Nullable private Integer attributeValueLengthLimit; /** * Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. Value must be * non-negative. If omitted or null, 128 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("attribute_count_limit") @JsonPropertyDescription( "Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + @Nullable private Integer attributeCountLimit; /** @@ -74,56 +69,38 @@ public LogRecordLimitsModel withAttributeCountLimit(Integer attributeCountLimit) @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(LogRecordLimitsModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("attributeValueLengthLimit"); - sb.append('='); - sb.append( - ((this.attributeValueLengthLimit == null) ? "" : this.attributeValueLengthLimit)); - sb.append(','); - sb.append("attributeCountLimit"); - sb.append('='); - sb.append(((this.attributeCountLimit == null) ? "" : this.attributeCountLimit)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "LogRecordLimitsModel{" + + "attributeValueLengthLimit=" + + attributeValueLengthLimit + + ", attributeCountLimit=" + + attributeCountLimit + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.attributeValueLengthLimit == null) - ? 0 - : this.attributeValueLengthLimit.hashCode())); - result = - ((result * 31) - + ((this.attributeCountLimit == null) ? 0 : this.attributeCountLimit.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.attributeValueLengthLimit == null) ? 0 : this.attributeValueLengthLimit.hashCode(); + h *= 1000003; + h ^= (this.attributeCountLimit == null) ? 0 : this.attributeCountLimit.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof LogRecordLimitsModel) == false) { - return false; + if (o instanceof LogRecordLimitsModel) { + LogRecordLimitsModel that = (LogRecordLimitsModel) o; + return (this.attributeValueLengthLimit == null + ? that.attributeValueLengthLimit == null + : this.attributeValueLengthLimit.equals(that.attributeValueLengthLimit)) + && (this.attributeCountLimit == null + ? that.attributeCountLimit == null + : this.attributeCountLimit.equals(that.attributeCountLimit)); } - LogRecordLimitsModel rhs = ((LogRecordLimitsModel) other); - return (((this.attributeValueLengthLimit == rhs.attributeValueLengthLimit) - || ((this.attributeValueLengthLimit != null) - && this.attributeValueLengthLimit.equals(rhs.attributeValueLengthLimit))) - && ((this.attributeCountLimit == rhs.attributeCountLimit) - || ((this.attributeCountLimit != null) - && this.attributeCountLimit.equals(rhs.attributeCountLimit)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorModel.java index c2c326d0ac6..3630067081c 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorModel.java @@ -19,20 +19,18 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"batch", "simple", "event_to_span_event_bridge/development"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class LogRecordProcessorModel { - @Nullable @JsonProperty("batch") + @Nullable private BatchLogRecordProcessorModel batch; - @Nullable @JsonProperty("simple") + @Nullable private SimpleLogRecordProcessorModel simple; - /** (Can be null) */ - @Nullable @JsonProperty("event_to_span_event_bridge/development") + @Nullable private ExperimentalEventToSpanEventBridgeLogRecordProcessorModel eventToSpanEventBridgeDevelopment; @@ -93,72 +91,52 @@ public LogRecordProcessorModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(LogRecordProcessorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("batch"); - sb.append('='); - sb.append(((this.batch == null) ? "" : this.batch)); - sb.append(','); - sb.append("simple"); - sb.append('='); - sb.append(((this.simple == null) ? "" : this.simple)); - sb.append(','); - sb.append("eventToSpanEventBridgeDevelopment"); - sb.append('='); - sb.append( - ((this.eventToSpanEventBridgeDevelopment == null) - ? "" - : this.eventToSpanEventBridgeDevelopment)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "LogRecordProcessorModel{" + + "batch=" + + batch + + ", simple=" + + simple + + ", eventToSpanEventBridgeDevelopment=" + + eventToSpanEventBridgeDevelopment + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.batch == null) ? 0 : this.batch.hashCode())); - result = ((result * 31) + ((this.simple == null) ? 0 : this.simple.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - result = - ((result * 31) - + ((this.eventToSpanEventBridgeDevelopment == null) - ? 0 - : this.eventToSpanEventBridgeDevelopment.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.batch == null) ? 0 : this.batch.hashCode(); + h *= 1000003; + h ^= (this.simple == null) ? 0 : this.simple.hashCode(); + h *= 1000003; + h ^= + (this.eventToSpanEventBridgeDevelopment == null) + ? 0 + : this.eventToSpanEventBridgeDevelopment.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof LogRecordProcessorModel) == false) { - return false; + if (o instanceof LogRecordProcessorModel) { + LogRecordProcessorModel that = (LogRecordProcessorModel) o; + return (this.batch == null ? that.batch == null : this.batch.equals(that.batch)) + && (this.simple == null ? that.simple == null : this.simple.equals(that.simple)) + && (this.eventToSpanEventBridgeDevelopment == null + ? that.eventToSpanEventBridgeDevelopment == null + : this.eventToSpanEventBridgeDevelopment.equals( + that.eventToSpanEventBridgeDevelopment)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - LogRecordProcessorModel rhs = ((LogRecordProcessorModel) other); - return (((((this.batch == rhs.batch) || ((this.batch != null) && this.batch.equals(rhs.batch))) - && ((this.simple == rhs.simple) - || ((this.simple != null) && this.simple.equals(rhs.simple)))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))) - && ((this.eventToSpanEventBridgeDevelopment == rhs.eventToSpanEventBridgeDevelopment) - || ((this.eventToSpanEventBridgeDevelopment != null) - && this.eventToSpanEventBridgeDevelopment.equals( - rhs.eventToSpanEventBridgeDevelopment)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorPropertyModel.java index b97b5634edf..718dc6ba456 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class LogRecordProcessorPropertyModel { @JsonIgnore @@ -40,43 +40,31 @@ public LogRecordProcessorPropertyModel withAdditionalProperty(String name, Objec @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(LogRecordProcessorPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "LogRecordProcessorPropertyModel{" + + "additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof LogRecordProcessorPropertyModel) == false) { - return false; + if (o instanceof LogRecordProcessorPropertyModel) { + LogRecordProcessorPropertyModel that = (LogRecordProcessorPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - LogRecordProcessorPropertyModel rhs = ((LogRecordProcessorPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LoggerProviderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LoggerProviderModel.java index 8874f7975da..553728e45dd 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LoggerProviderModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LoggerProviderModel.java @@ -11,13 +11,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.List; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"processors", "limits", "logger_configurator/development"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class LoggerProviderModel { /** @@ -28,17 +26,15 @@ public class LoggerProviderModel { @JsonProperty("processors") @JsonPropertyDescription( "Configure log record processors.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private List processors; - /** (Can be null) */ - @Nullable @JsonProperty("limits") + @Nullable private LogRecordLimitsModel limits; - /** (Can be null) */ - @Nullable @JsonProperty("logger_configurator/development") + @Nullable private ExperimentalLoggerConfiguratorModel loggerConfiguratorDevelopment; /** @@ -82,62 +78,46 @@ public LoggerProviderModel withLoggerConfiguratorDevelopment( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(LoggerProviderModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("processors"); - sb.append('='); - sb.append(((this.processors == null) ? "" : this.processors)); - sb.append(','); - sb.append("limits"); - sb.append('='); - sb.append(((this.limits == null) ? "" : this.limits)); - sb.append(','); - sb.append("loggerConfiguratorDevelopment"); - sb.append('='); - sb.append( - ((this.loggerConfiguratorDevelopment == null) - ? "" - : this.loggerConfiguratorDevelopment)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "LoggerProviderModel{" + + "processors=" + + processors + + ", limits=" + + limits + + ", loggerConfiguratorDevelopment=" + + loggerConfiguratorDevelopment + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.limits == null) ? 0 : this.limits.hashCode())); - result = ((result * 31) + ((this.processors == null) ? 0 : this.processors.hashCode())); - result = - ((result * 31) - + ((this.loggerConfiguratorDevelopment == null) - ? 0 - : this.loggerConfiguratorDevelopment.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.processors == null) ? 0 : this.processors.hashCode(); + h *= 1000003; + h ^= (this.limits == null) ? 0 : this.limits.hashCode(); + h *= 1000003; + h ^= + (this.loggerConfiguratorDevelopment == null) + ? 0 + : this.loggerConfiguratorDevelopment.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof LoggerProviderModel) == false) { - return false; + if (o instanceof LoggerProviderModel) { + LoggerProviderModel that = (LoggerProviderModel) o; + return (this.processors == null + ? that.processors == null + : this.processors.equals(that.processors)) + && (this.limits == null ? that.limits == null : this.limits.equals(that.limits)) + && (this.loggerConfiguratorDevelopment == null + ? that.loggerConfiguratorDevelopment == null + : this.loggerConfiguratorDevelopment.equals(that.loggerConfiguratorDevelopment)); } - LoggerProviderModel rhs = ((LoggerProviderModel) other); - return ((((this.limits == rhs.limits) - || ((this.limits != null) && this.limits.equals(rhs.limits))) - && ((this.processors == rhs.processors) - || ((this.processors != null) && this.processors.equals(rhs.processors)))) - && ((this.loggerConfiguratorDevelopment == rhs.loggerConfiguratorDevelopment) - || ((this.loggerConfiguratorDevelopment != null) - && this.loggerConfiguratorDevelopment.equals(rhs.loggerConfiguratorDevelopment)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MeterProviderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MeterProviderModel.java index 73b33268eb2..f66dc7487d6 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MeterProviderModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MeterProviderModel.java @@ -15,13 +15,11 @@ import java.util.List; import java.util.Map; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"readers", "views", "exemplar_filter", "meter_configurator/development"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class MeterProviderModel { /** @@ -32,29 +30,25 @@ public class MeterProviderModel { @JsonProperty("readers") @JsonPropertyDescription( "Configure metric readers.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private List readers; /** * Configure views. Each view has a selector which determines the instrument(s) it applies to, and * a configuration for the resulting stream(s). If omitted, no views are registered. - * - *

(Can be null) */ - @Nullable @JsonProperty("views") @JsonPropertyDescription( "Configure views. \nEach view has a selector which determines the instrument(s) it applies to, and a configuration for the resulting stream(s).\nIf omitted, no views are registered.\n") + @Nullable private List views; - /** (Can be null) */ - @Nullable @JsonProperty("exemplar_filter") + @Nullable private MeterProviderModel.ExemplarFilter exemplarFilter; - /** (Can be null) */ - @Nullable @JsonProperty("meter_configurator/development") + @Nullable private ExperimentalMeterConfiguratorModel meterConfiguratorDevelopment; /** @@ -113,75 +107,55 @@ public MeterProviderModel withMeterConfiguratorDevelopment( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(MeterProviderModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("readers"); - sb.append('='); - sb.append(((this.readers == null) ? "" : this.readers)); - sb.append(','); - sb.append("views"); - sb.append('='); - sb.append(((this.views == null) ? "" : this.views)); - sb.append(','); - sb.append("exemplarFilter"); - sb.append('='); - sb.append(((this.exemplarFilter == null) ? "" : this.exemplarFilter)); - sb.append(','); - sb.append("meterConfiguratorDevelopment"); - sb.append('='); - sb.append( - ((this.meterConfiguratorDevelopment == null) - ? "" - : this.meterConfiguratorDevelopment)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "MeterProviderModel{" + + "readers=" + + readers + + ", views=" + + views + + ", exemplarFilter=" + + exemplarFilter + + ", meterConfiguratorDevelopment=" + + meterConfiguratorDevelopment + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.exemplarFilter == null) ? 0 : this.exemplarFilter.hashCode())); - result = - ((result * 31) - + ((this.meterConfiguratorDevelopment == null) - ? 0 - : this.meterConfiguratorDevelopment.hashCode())); - result = ((result * 31) + ((this.readers == null) ? 0 : this.readers.hashCode())); - result = ((result * 31) + ((this.views == null) ? 0 : this.views.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.readers == null) ? 0 : this.readers.hashCode(); + h *= 1000003; + h ^= (this.views == null) ? 0 : this.views.hashCode(); + h *= 1000003; + h ^= (this.exemplarFilter == null) ? 0 : this.exemplarFilter.hashCode(); + h *= 1000003; + h ^= + (this.meterConfiguratorDevelopment == null) + ? 0 + : this.meterConfiguratorDevelopment.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof MeterProviderModel) == false) { - return false; + if (o instanceof MeterProviderModel) { + MeterProviderModel that = (MeterProviderModel) o; + return (this.readers == null ? that.readers == null : this.readers.equals(that.readers)) + && (this.views == null ? that.views == null : this.views.equals(that.views)) + && (this.exemplarFilter == null + ? that.exemplarFilter == null + : this.exemplarFilter.equals(that.exemplarFilter)) + && (this.meterConfiguratorDevelopment == null + ? that.meterConfiguratorDevelopment == null + : this.meterConfiguratorDevelopment.equals(that.meterConfiguratorDevelopment)); } - MeterProviderModel rhs = ((MeterProviderModel) other); - return (((((this.exemplarFilter == rhs.exemplarFilter) - || ((this.exemplarFilter != null) - && this.exemplarFilter.equals(rhs.exemplarFilter))) - && ((this.meterConfiguratorDevelopment == rhs.meterConfiguratorDevelopment) - || ((this.meterConfiguratorDevelopment != null) - && this.meterConfiguratorDevelopment.equals( - rhs.meterConfiguratorDevelopment)))) - && ((this.readers == rhs.readers) - || ((this.readers != null) && this.readers.equals(rhs.readers)))) - && ((this.views == rhs.views) || ((this.views != null) && this.views.equals(rhs.views)))); + return false; } @Generated("jsonschema2pojo") - @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum ExemplarFilter { ALWAYS_ON("always_on"), ALWAYS_OFF("always_off"), diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerModel.java index db2628bd3be..8eab190eb25 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerModel.java @@ -19,12 +19,10 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"opencensus"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class MetricProducerModel { - /** (Can be null) */ - @Nullable @JsonProperty("opencensus") + @Nullable private OpenCensusMetricProducerModel opencensus; @JsonIgnore @@ -60,50 +58,38 @@ public MetricProducerModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(MetricProducerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("opencensus"); - sb.append('='); - sb.append(((this.opencensus == null) ? "" : this.opencensus)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "MetricProducerModel{" + + "opencensus=" + + opencensus + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.opencensus == null) ? 0 : this.opencensus.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.opencensus == null) ? 0 : this.opencensus.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof MetricProducerModel) == false) { - return false; + if (o instanceof MetricProducerModel) { + MetricProducerModel that = (MetricProducerModel) o; + return (this.opencensus == null + ? that.opencensus == null + : this.opencensus.equals(that.opencensus)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - MetricProducerModel rhs = ((MetricProducerModel) other); - return (((this.opencensus == rhs.opencensus) - || ((this.opencensus != null) && this.opencensus.equals(rhs.opencensus))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerPropertyModel.java index 135ca0a99bc..206d5e17601 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class MetricProducerPropertyModel { @JsonIgnore @@ -40,43 +40,28 @@ public MetricProducerPropertyModel withAdditionalProperty(String name, Object va @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(MetricProducerPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "MetricProducerPropertyModel{" + "additionalProperties=" + additionalProperties + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof MetricProducerPropertyModel) == false) { - return false; + if (o instanceof MetricProducerPropertyModel) { + MetricProducerPropertyModel that = (MetricProducerPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - MetricProducerPropertyModel rhs = ((MetricProducerPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricReaderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricReaderModel.java index 795b1fb4428..31169e116a2 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricReaderModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricReaderModel.java @@ -14,15 +14,14 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"periodic", "pull"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class MetricReaderModel { - @Nullable @JsonProperty("periodic") + @Nullable private PeriodicMetricReaderModel periodic; - @Nullable @JsonProperty("pull") + @Nullable private PullMetricReaderModel pull; @JsonProperty("periodic") @@ -49,46 +48,29 @@ public MetricReaderModel withPull(PullMetricReaderModel pull) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(MetricReaderModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("periodic"); - sb.append('='); - sb.append(((this.periodic == null) ? "" : this.periodic)); - sb.append(','); - sb.append("pull"); - sb.append('='); - sb.append(((this.pull == null) ? "" : this.pull)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "MetricReaderModel{" + "periodic=" + periodic + ", pull=" + pull + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.pull == null) ? 0 : this.pull.hashCode())); - result = ((result * 31) + ((this.periodic == null) ? 0 : this.periodic.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.periodic == null) ? 0 : this.periodic.hashCode(); + h *= 1000003; + h ^= (this.pull == null) ? 0 : this.pull.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof MetricReaderModel) == false) { - return false; + if (o instanceof MetricReaderModel) { + MetricReaderModel that = (MetricReaderModel) o; + return (this.periodic == null ? that.periodic == null : this.periodic.equals(that.periodic)) + && (this.pull == null ? that.pull == null : this.pull.equals(that.pull)); } - MetricReaderModel rhs = ((MetricReaderModel) other); - return (((this.pull == rhs.pull) || ((this.pull != null) && this.pull.equals(rhs.pull))) - && ((this.periodic == rhs.periodic) - || ((this.periodic != null) && this.periodic.equals(rhs.periodic)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/NameStringValuePairModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/NameStringValuePairModel.java index e9a820a25b1..b84a731a5fe 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/NameStringValuePairModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/NameStringValuePairModel.java @@ -10,13 +10,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"name", "value"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class NameStringValuePairModel { /** @@ -26,7 +24,7 @@ public class NameStringValuePairModel { */ @JsonProperty("name") @JsonPropertyDescription("The name of the pair.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private String name; /** @@ -38,7 +36,7 @@ public class NameStringValuePairModel { @JsonProperty("value") @JsonPropertyDescription( "The value of the pair.\nProperty must be present, but if null the behavior is dependent on usage context.\n") - @Nonnull + @Nullable private String value; /** @@ -76,45 +74,29 @@ public NameStringValuePairModel withValue(String value) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(NameStringValuePairModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null) ? "" : this.name)); - sb.append(','); - sb.append("value"); - sb.append('='); - sb.append(((this.value == null) ? "" : this.value)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "NameStringValuePairModel{" + "name=" + name + ", value=" + value + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); - result = ((result * 31) + ((this.value == null) ? 0 : this.value.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.name == null) ? 0 : this.name.hashCode(); + h *= 1000003; + h ^= (this.value == null) ? 0 : this.value.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof NameStringValuePairModel) == false) { - return false; + if (o instanceof NameStringValuePairModel) { + NameStringValuePairModel that = (NameStringValuePairModel) o; + return (this.name == null ? that.name == null : this.name.equals(that.name)) + && (this.value == null ? that.value == null : this.value.equals(that.value)); } - NameStringValuePairModel rhs = ((NameStringValuePairModel) other); - return (((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) - && ((this.value == rhs.value) || ((this.value != null) && this.value.equals(rhs.value)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenCensusMetricProducerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenCensusMetricProducerModel.java index 35da7f2c958..d949facf6a3 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenCensusMetricProducerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenCensusMetricProducerModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class OpenCensusMetricProducerModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(OpenCensusMetricProducerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "OpenCensusMetricProducerModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof OpenCensusMetricProducerModel) == false) { - return false; + if (o instanceof OpenCensusMetricProducerModel) { + OpenCensusMetricProducerModel that = (OpenCensusMetricProducerModel) o; + return true; } - OpenCensusMetricProducerModel rhs = ((OpenCensusMetricProducerModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenTelemetryConfigurationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenTelemetryConfigurationModel.java index dc350e6e37a..78c1beae828 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenTelemetryConfigurationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenTelemetryConfigurationModel.java @@ -18,7 +18,6 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; /** @@ -41,7 +40,6 @@ "distribution" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class OpenTelemetryConfigurationModel { /** @@ -58,60 +56,50 @@ public class OpenTelemetryConfigurationModel { @JsonProperty("file_format") @JsonPropertyDescription( "The file format version.\nRepresented as a string including the semver major, minor version numbers (and optionally the meta tag). For example: \"0.4\", \"1.0-rc.2\", \"1.0\" (after stable release).\nSee https://github.com/open-telemetry/opentelemetry-configuration/blob/main/VERSIONING.md for more details.\nThe yaml format is documented at https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private String fileFormat; - /** - * Configure if the SDK is disabled or not. If omitted or null, false is used. - * - *

(Can be null) - */ - @Nullable + /** Configure if the SDK is disabled or not. If omitted or null, false is used. */ @JsonProperty("disabled") @JsonPropertyDescription( "Configure if the SDK is disabled or not.\nIf omitted or null, false is used.\n") + @Nullable private Boolean disabled; - /** (Can be null) */ - @Nullable @JsonProperty("log_level") + @Nullable private OpenTelemetryConfigurationModel.SeverityNumber logLevel; - /** (Can be null) */ - @Nullable @JsonProperty("attribute_limits") + @Nullable private AttributeLimitsModel attributeLimits; - @Nullable @JsonProperty("logger_provider") + @Nullable private LoggerProviderModel loggerProvider; - @Nullable @JsonProperty("meter_provider") + @Nullable private MeterProviderModel meterProvider; - /** (Can be null) */ - @Nullable @JsonProperty("propagator") + @Nullable private PropagatorModel propagator; - @Nullable @JsonProperty("tracer_provider") + @Nullable private TracerProviderModel tracerProvider; - /** (Can be null) */ - @Nullable @JsonProperty("resource") + @Nullable private ResourceModel resource; - /** (Can be null) */ - @Nullable @JsonProperty("instrumentation/development") + @Nullable private ExperimentalInstrumentationModel instrumentationDevelopment; - /** (Can be null) */ - @Nullable @JsonProperty("distribution") + @Nullable private DistributionModel distribution; @JsonIgnore @@ -269,140 +257,106 @@ public OpenTelemetryConfigurationModel withAdditionalProperty(String name, Objec @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(OpenTelemetryConfigurationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("fileFormat"); - sb.append('='); - sb.append(((this.fileFormat == null) ? "" : this.fileFormat)); - sb.append(','); - sb.append("disabled"); - sb.append('='); - sb.append(((this.disabled == null) ? "" : this.disabled)); - sb.append(','); - sb.append("logLevel"); - sb.append('='); - sb.append(((this.logLevel == null) ? "" : this.logLevel)); - sb.append(','); - sb.append("attributeLimits"); - sb.append('='); - sb.append(((this.attributeLimits == null) ? "" : this.attributeLimits)); - sb.append(','); - sb.append("loggerProvider"); - sb.append('='); - sb.append(((this.loggerProvider == null) ? "" : this.loggerProvider)); - sb.append(','); - sb.append("meterProvider"); - sb.append('='); - sb.append(((this.meterProvider == null) ? "" : this.meterProvider)); - sb.append(','); - sb.append("propagator"); - sb.append('='); - sb.append(((this.propagator == null) ? "" : this.propagator)); - sb.append(','); - sb.append("tracerProvider"); - sb.append('='); - sb.append(((this.tracerProvider == null) ? "" : this.tracerProvider)); - sb.append(','); - sb.append("resource"); - sb.append('='); - sb.append(((this.resource == null) ? "" : this.resource)); - sb.append(','); - sb.append("instrumentationDevelopment"); - sb.append('='); - sb.append( - ((this.instrumentationDevelopment == null) ? "" : this.instrumentationDevelopment)); - sb.append(','); - sb.append("distribution"); - sb.append('='); - sb.append(((this.distribution == null) ? "" : this.distribution)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "OpenTelemetryConfigurationModel{" + + "fileFormat=" + + fileFormat + + ", disabled=" + + disabled + + ", logLevel=" + + logLevel + + ", attributeLimits=" + + attributeLimits + + ", loggerProvider=" + + loggerProvider + + ", meterProvider=" + + meterProvider + + ", propagator=" + + propagator + + ", tracerProvider=" + + tracerProvider + + ", resource=" + + resource + + ", instrumentationDevelopment=" + + instrumentationDevelopment + + ", distribution=" + + distribution + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.instrumentationDevelopment == null) - ? 0 - : this.instrumentationDevelopment.hashCode())); - result = - ((result * 31) + ((this.attributeLimits == null) ? 0 : this.attributeLimits.hashCode())); - result = ((result * 31) + ((this.logLevel == null) ? 0 : this.logLevel.hashCode())); - result = ((result * 31) + ((this.tracerProvider == null) ? 0 : this.tracerProvider.hashCode())); - result = ((result * 31) + ((this.resource == null) ? 0 : this.resource.hashCode())); - result = ((result * 31) + ((this.meterProvider == null) ? 0 : this.meterProvider.hashCode())); - result = ((result * 31) + ((this.propagator == null) ? 0 : this.propagator.hashCode())); - result = ((result * 31) + ((this.disabled == null) ? 0 : this.disabled.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - result = ((result * 31) + ((this.distribution == null) ? 0 : this.distribution.hashCode())); - result = ((result * 31) + ((this.fileFormat == null) ? 0 : this.fileFormat.hashCode())); - result = ((result * 31) + ((this.loggerProvider == null) ? 0 : this.loggerProvider.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.fileFormat == null) ? 0 : this.fileFormat.hashCode(); + h *= 1000003; + h ^= (this.disabled == null) ? 0 : this.disabled.hashCode(); + h *= 1000003; + h ^= (this.logLevel == null) ? 0 : this.logLevel.hashCode(); + h *= 1000003; + h ^= (this.attributeLimits == null) ? 0 : this.attributeLimits.hashCode(); + h *= 1000003; + h ^= (this.loggerProvider == null) ? 0 : this.loggerProvider.hashCode(); + h *= 1000003; + h ^= (this.meterProvider == null) ? 0 : this.meterProvider.hashCode(); + h *= 1000003; + h ^= (this.propagator == null) ? 0 : this.propagator.hashCode(); + h *= 1000003; + h ^= (this.tracerProvider == null) ? 0 : this.tracerProvider.hashCode(); + h *= 1000003; + h ^= (this.resource == null) ? 0 : this.resource.hashCode(); + h *= 1000003; + h ^= (this.instrumentationDevelopment == null) ? 0 : this.instrumentationDevelopment.hashCode(); + h *= 1000003; + h ^= (this.distribution == null) ? 0 : this.distribution.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof OpenTelemetryConfigurationModel) == false) { - return false; + if (o instanceof OpenTelemetryConfigurationModel) { + OpenTelemetryConfigurationModel that = (OpenTelemetryConfigurationModel) o; + return (this.fileFormat == null + ? that.fileFormat == null + : this.fileFormat.equals(that.fileFormat)) + && (this.disabled == null ? that.disabled == null : this.disabled.equals(that.disabled)) + && (this.logLevel == null ? that.logLevel == null : this.logLevel.equals(that.logLevel)) + && (this.attributeLimits == null + ? that.attributeLimits == null + : this.attributeLimits.equals(that.attributeLimits)) + && (this.loggerProvider == null + ? that.loggerProvider == null + : this.loggerProvider.equals(that.loggerProvider)) + && (this.meterProvider == null + ? that.meterProvider == null + : this.meterProvider.equals(that.meterProvider)) + && (this.propagator == null + ? that.propagator == null + : this.propagator.equals(that.propagator)) + && (this.tracerProvider == null + ? that.tracerProvider == null + : this.tracerProvider.equals(that.tracerProvider)) + && (this.resource == null ? that.resource == null : this.resource.equals(that.resource)) + && (this.instrumentationDevelopment == null + ? that.instrumentationDevelopment == null + : this.instrumentationDevelopment.equals(that.instrumentationDevelopment)) + && (this.distribution == null + ? that.distribution == null + : this.distribution.equals(that.distribution)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - OpenTelemetryConfigurationModel rhs = ((OpenTelemetryConfigurationModel) other); - return (((((((((((((this.instrumentationDevelopment == rhs.instrumentationDevelopment) - || ((this.instrumentationDevelopment != null) - && this.instrumentationDevelopment.equals( - rhs.instrumentationDevelopment))) - && ((this.attributeLimits == rhs.attributeLimits) - || ((this.attributeLimits != null) - && this.attributeLimits.equals( - rhs.attributeLimits)))) - && ((this.logLevel == rhs.logLevel) - || ((this.logLevel != null) - && this.logLevel.equals(rhs.logLevel)))) - && ((this.tracerProvider == rhs.tracerProvider) - || ((this.tracerProvider != null) - && this.tracerProvider.equals(rhs.tracerProvider)))) - && ((this.resource == rhs.resource) - || ((this.resource != null) - && this.resource.equals(rhs.resource)))) - && ((this.meterProvider == rhs.meterProvider) - || ((this.meterProvider != null) - && this.meterProvider.equals(rhs.meterProvider)))) - && ((this.propagator == rhs.propagator) - || ((this.propagator != null) - && this.propagator.equals(rhs.propagator)))) - && ((this.disabled == rhs.disabled) - || ((this.disabled != null) && this.disabled.equals(rhs.disabled)))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))) - && ((this.distribution == rhs.distribution) - || ((this.distribution != null) && this.distribution.equals(rhs.distribution)))) - && ((this.fileFormat == rhs.fileFormat) - || ((this.fileFormat != null) && this.fileFormat.equals(rhs.fileFormat)))) - && ((this.loggerProvider == rhs.loggerProvider) - || ((this.loggerProvider != null) && this.loggerProvider.equals(rhs.loggerProvider)))); + return false; } @Generated("jsonschema2pojo") - @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum SeverityNumber { TRACE("trace"), TRACE_2("trace2"), diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcExporterModel.java index dc8462102c5..ec719c24715 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcExporterModel.java @@ -16,35 +16,27 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"endpoint", "tls", "headers", "headers_list", "compression", "timeout"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class OtlpGrpcExporterModel { - /** - * Configure endpoint. If omitted or null, http://localhost:4317 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure endpoint. If omitted or null, http://localhost:4317 is used. */ @JsonProperty("endpoint") @JsonPropertyDescription( "Configure endpoint.\nIf omitted or null, http://localhost:4317 is used.\n") + @Nullable private String endpoint; - /** (Can be null) */ - @Nullable @JsonProperty("tls") + @Nullable private GrpcTlsModel tls; /** * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's * .value is null, the entry is ignored. If omitted, no headers are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("headers") @JsonPropertyDescription( "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\nIf omitted, no headers are added.\n") + @Nullable private List headers; /** @@ -52,37 +44,31 @@ public class OtlpGrpcExporterModel { * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options * for details. If omitted or null, no headers are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("headers_list") @JsonPropertyDescription( "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n") + @Nullable private String headersList; /** * Configure compression. Known values include: gzip, none. Implementations may support other * compression algorithms. If omitted or null, none is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("compression") @JsonPropertyDescription( "Configure compression.\nKnown values include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n") + @Nullable private String compression; /** * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("timeout") @JsonPropertyDescription( "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n") + @Nullable private Integer timeout; /** Configure endpoint. If omitted or null, http://localhost:4317 is used. */ @@ -172,75 +158,58 @@ public OtlpGrpcExporterModel withTimeout(Integer timeout) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(OtlpGrpcExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("endpoint"); - sb.append('='); - sb.append(((this.endpoint == null) ? "" : this.endpoint)); - sb.append(','); - sb.append("tls"); - sb.append('='); - sb.append(((this.tls == null) ? "" : this.tls)); - sb.append(','); - sb.append("headers"); - sb.append('='); - sb.append(((this.headers == null) ? "" : this.headers)); - sb.append(','); - sb.append("headersList"); - sb.append('='); - sb.append(((this.headersList == null) ? "" : this.headersList)); - sb.append(','); - sb.append("compression"); - sb.append('='); - sb.append(((this.compression == null) ? "" : this.compression)); - sb.append(','); - sb.append("timeout"); - sb.append('='); - sb.append(((this.timeout == null) ? "" : this.timeout)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "OtlpGrpcExporterModel{" + + "endpoint=" + + endpoint + + ", tls=" + + tls + + ", headers=" + + headers + + ", headersList=" + + headersList + + ", compression=" + + compression + + ", timeout=" + + timeout + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.headersList == null) ? 0 : this.headersList.hashCode())); - result = ((result * 31) + ((this.headers == null) ? 0 : this.headers.hashCode())); - result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); - result = ((result * 31) + ((this.tls == null) ? 0 : this.tls.hashCode())); - result = ((result * 31) + ((this.compression == null) ? 0 : this.compression.hashCode())); - result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.endpoint == null) ? 0 : this.endpoint.hashCode(); + h *= 1000003; + h ^= (this.tls == null) ? 0 : this.tls.hashCode(); + h *= 1000003; + h ^= (this.headers == null) ? 0 : this.headers.hashCode(); + h *= 1000003; + h ^= (this.headersList == null) ? 0 : this.headersList.hashCode(); + h *= 1000003; + h ^= (this.compression == null) ? 0 : this.compression.hashCode(); + h *= 1000003; + h ^= (this.timeout == null) ? 0 : this.timeout.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof OtlpGrpcExporterModel) == false) { - return false; + if (o instanceof OtlpGrpcExporterModel) { + OtlpGrpcExporterModel that = (OtlpGrpcExporterModel) o; + return (this.endpoint == null ? that.endpoint == null : this.endpoint.equals(that.endpoint)) + && (this.tls == null ? that.tls == null : this.tls.equals(that.tls)) + && (this.headers == null ? that.headers == null : this.headers.equals(that.headers)) + && (this.headersList == null + ? that.headersList == null + : this.headersList.equals(that.headersList)) + && (this.compression == null + ? that.compression == null + : this.compression.equals(that.compression)) + && (this.timeout == null ? that.timeout == null : this.timeout.equals(that.timeout)); } - OtlpGrpcExporterModel rhs = ((OtlpGrpcExporterModel) other); - return (((((((this.headersList == rhs.headersList) - || ((this.headersList != null) - && this.headersList.equals(rhs.headersList))) - && ((this.headers == rhs.headers) - || ((this.headers != null) && this.headers.equals(rhs.headers)))) - && ((this.endpoint == rhs.endpoint) - || ((this.endpoint != null) && this.endpoint.equals(rhs.endpoint)))) - && ((this.tls == rhs.tls) || ((this.tls != null) && this.tls.equals(rhs.tls)))) - && ((this.compression == rhs.compression) - || ((this.compression != null) && this.compression.equals(rhs.compression)))) - && ((this.timeout == rhs.timeout) - || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcMetricExporterModel.java index c3d67167930..cfd353e2c04 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcMetricExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcMetricExporterModel.java @@ -25,35 +25,27 @@ "default_histogram_aggregation" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class OtlpGrpcMetricExporterModel { - /** - * Configure endpoint. If omitted or null, http://localhost:4317 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure endpoint. If omitted or null, http://localhost:4317 is used. */ @JsonProperty("endpoint") @JsonPropertyDescription( "Configure endpoint.\nIf omitted or null, http://localhost:4317 is used.\n") + @Nullable private String endpoint; - /** (Can be null) */ - @Nullable @JsonProperty("tls") + @Nullable private GrpcTlsModel tls; /** * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's * .value is null, the entry is ignored. If omitted, no headers are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("headers") @JsonPropertyDescription( "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\nIf omitted, no headers are added.\n") + @Nullable private List headers; /** @@ -61,47 +53,39 @@ public class OtlpGrpcMetricExporterModel { * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options * for details. If omitted or null, no headers are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("headers_list") @JsonPropertyDescription( "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n") + @Nullable private String headersList; /** * Configure compression. Known values include: gzip, none. Implementations may support other * compression algorithms. If omitted or null, none is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("compression") @JsonPropertyDescription( "Configure compression.\nKnown values include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n") + @Nullable private String compression; /** * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("timeout") @JsonPropertyDescription( "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n") + @Nullable private Integer timeout; - /** (Can be null) */ - @Nullable @JsonProperty("temporality_preference") + @Nullable private OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference; - /** (Can be null) */ - @Nullable @JsonProperty("default_histogram_aggregation") + @Nullable private OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation defaultHistogramAggregation; @@ -217,101 +201,75 @@ public OtlpGrpcMetricExporterModel withDefaultHistogramAggregation( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(OtlpGrpcMetricExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("endpoint"); - sb.append('='); - sb.append(((this.endpoint == null) ? "" : this.endpoint)); - sb.append(','); - sb.append("tls"); - sb.append('='); - sb.append(((this.tls == null) ? "" : this.tls)); - sb.append(','); - sb.append("headers"); - sb.append('='); - sb.append(((this.headers == null) ? "" : this.headers)); - sb.append(','); - sb.append("headersList"); - sb.append('='); - sb.append(((this.headersList == null) ? "" : this.headersList)); - sb.append(','); - sb.append("compression"); - sb.append('='); - sb.append(((this.compression == null) ? "" : this.compression)); - sb.append(','); - sb.append("timeout"); - sb.append('='); - sb.append(((this.timeout == null) ? "" : this.timeout)); - sb.append(','); - sb.append("temporalityPreference"); - sb.append('='); - sb.append(((this.temporalityPreference == null) ? "" : this.temporalityPreference)); - sb.append(','); - sb.append("defaultHistogramAggregation"); - sb.append('='); - sb.append( - ((this.defaultHistogramAggregation == null) ? "" : this.defaultHistogramAggregation)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "OtlpGrpcMetricExporterModel{" + + "endpoint=" + + endpoint + + ", tls=" + + tls + + ", headers=" + + headers + + ", headersList=" + + headersList + + ", compression=" + + compression + + ", timeout=" + + timeout + + ", temporalityPreference=" + + temporalityPreference + + ", defaultHistogramAggregation=" + + defaultHistogramAggregation + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.headers == null) ? 0 : this.headers.hashCode())); - result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); - result = ((result * 31) + ((this.headersList == null) ? 0 : this.headersList.hashCode())); - result = ((result * 31) + ((this.tls == null) ? 0 : this.tls.hashCode())); - result = ((result * 31) + ((this.compression == null) ? 0 : this.compression.hashCode())); - result = - ((result * 31) - + ((this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode())); - result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); - result = - ((result * 31) - + ((this.defaultHistogramAggregation == null) - ? 0 - : this.defaultHistogramAggregation.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.endpoint == null) ? 0 : this.endpoint.hashCode(); + h *= 1000003; + h ^= (this.tls == null) ? 0 : this.tls.hashCode(); + h *= 1000003; + h ^= (this.headers == null) ? 0 : this.headers.hashCode(); + h *= 1000003; + h ^= (this.headersList == null) ? 0 : this.headersList.hashCode(); + h *= 1000003; + h ^= (this.compression == null) ? 0 : this.compression.hashCode(); + h *= 1000003; + h ^= (this.timeout == null) ? 0 : this.timeout.hashCode(); + h *= 1000003; + h ^= (this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode(); + h *= 1000003; + h ^= + (this.defaultHistogramAggregation == null) + ? 0 + : this.defaultHistogramAggregation.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof OtlpGrpcMetricExporterModel) == false) { - return false; + if (o instanceof OtlpGrpcMetricExporterModel) { + OtlpGrpcMetricExporterModel that = (OtlpGrpcMetricExporterModel) o; + return (this.endpoint == null ? that.endpoint == null : this.endpoint.equals(that.endpoint)) + && (this.tls == null ? that.tls == null : this.tls.equals(that.tls)) + && (this.headers == null ? that.headers == null : this.headers.equals(that.headers)) + && (this.headersList == null + ? that.headersList == null + : this.headersList.equals(that.headersList)) + && (this.compression == null + ? that.compression == null + : this.compression.equals(that.compression)) + && (this.timeout == null ? that.timeout == null : this.timeout.equals(that.timeout)) + && (this.temporalityPreference == null + ? that.temporalityPreference == null + : this.temporalityPreference.equals(that.temporalityPreference)) + && (this.defaultHistogramAggregation == null + ? that.defaultHistogramAggregation == null + : this.defaultHistogramAggregation.equals(that.defaultHistogramAggregation)); } - OtlpGrpcMetricExporterModel rhs = ((OtlpGrpcMetricExporterModel) other); - return (((((((((this.headers == rhs.headers) - || ((this.headers != null) && this.headers.equals(rhs.headers))) - && ((this.endpoint == rhs.endpoint) - || ((this.endpoint != null) - && this.endpoint.equals(rhs.endpoint)))) - && ((this.headersList == rhs.headersList) - || ((this.headersList != null) - && this.headersList.equals(rhs.headersList)))) - && ((this.tls == rhs.tls) - || ((this.tls != null) && this.tls.equals(rhs.tls)))) - && ((this.compression == rhs.compression) - || ((this.compression != null) - && this.compression.equals(rhs.compression)))) - && ((this.temporalityPreference == rhs.temporalityPreference) - || ((this.temporalityPreference != null) - && this.temporalityPreference.equals(rhs.temporalityPreference)))) - && ((this.timeout == rhs.timeout) - || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))) - && ((this.defaultHistogramAggregation == rhs.defaultHistogramAggregation) - || ((this.defaultHistogramAggregation != null) - && this.defaultHistogramAggregation.equals(rhs.defaultHistogramAggregation)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpExporterModel.java index d3390db5b6e..622a413df12 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpExporterModel.java @@ -28,36 +28,30 @@ "encoding" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class OtlpHttpExporterModel { /** * Configure endpoint, including the signal specific path. If omitted or null, the * http://localhost:4318/v1/{signal} (where signal is 'traces', 'logs', or 'metrics') is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("endpoint") @JsonPropertyDescription( "Configure endpoint, including the signal specific path.\nIf omitted or null, the http://localhost:4318/v1/{signal} (where signal is 'traces', 'logs', or 'metrics') is used.\n") + @Nullable private String endpoint; - /** (Can be null) */ - @Nullable @JsonProperty("tls") + @Nullable private HttpTlsModel tls; /** * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's * .value is null, the entry is ignored. If omitted, no headers are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("headers") @JsonPropertyDescription( "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\nIf omitted, no headers are added.\n") + @Nullable private List headers; /** @@ -65,42 +59,35 @@ public class OtlpHttpExporterModel { * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options * for details. If omitted or null, no headers are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("headers_list") @JsonPropertyDescription( "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n") + @Nullable private String headersList; /** * Configure compression. Known values include: gzip, none. Implementations may support other * compression algorithms. If omitted or null, none is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("compression") @JsonPropertyDescription( "Configure compression.\nKnown values include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n") + @Nullable private String compression; /** * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("timeout") @JsonPropertyDescription( "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n") + @Nullable private Integer timeout; - /** (Can be null) */ - @Nullable @JsonProperty("encoding") + @Nullable private OtlpHttpExporterModel.OtlpHttpEncoding encoding; /** @@ -204,87 +191,67 @@ public OtlpHttpExporterModel withEncoding(OtlpHttpExporterModel.OtlpHttpEncoding @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(OtlpHttpExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("endpoint"); - sb.append('='); - sb.append(((this.endpoint == null) ? "" : this.endpoint)); - sb.append(','); - sb.append("tls"); - sb.append('='); - sb.append(((this.tls == null) ? "" : this.tls)); - sb.append(','); - sb.append("headers"); - sb.append('='); - sb.append(((this.headers == null) ? "" : this.headers)); - sb.append(','); - sb.append("headersList"); - sb.append('='); - sb.append(((this.headersList == null) ? "" : this.headersList)); - sb.append(','); - sb.append("compression"); - sb.append('='); - sb.append(((this.compression == null) ? "" : this.compression)); - sb.append(','); - sb.append("timeout"); - sb.append('='); - sb.append(((this.timeout == null) ? "" : this.timeout)); - sb.append(','); - sb.append("encoding"); - sb.append('='); - sb.append(((this.encoding == null) ? "" : this.encoding)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "OtlpHttpExporterModel{" + + "endpoint=" + + endpoint + + ", tls=" + + tls + + ", headers=" + + headers + + ", headersList=" + + headersList + + ", compression=" + + compression + + ", timeout=" + + timeout + + ", encoding=" + + encoding + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.headers == null) ? 0 : this.headers.hashCode())); - result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); - result = ((result * 31) + ((this.headersList == null) ? 0 : this.headersList.hashCode())); - result = ((result * 31) + ((this.tls == null) ? 0 : this.tls.hashCode())); - result = ((result * 31) + ((this.compression == null) ? 0 : this.compression.hashCode())); - result = ((result * 31) + ((this.encoding == null) ? 0 : this.encoding.hashCode())); - result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.endpoint == null) ? 0 : this.endpoint.hashCode(); + h *= 1000003; + h ^= (this.tls == null) ? 0 : this.tls.hashCode(); + h *= 1000003; + h ^= (this.headers == null) ? 0 : this.headers.hashCode(); + h *= 1000003; + h ^= (this.headersList == null) ? 0 : this.headersList.hashCode(); + h *= 1000003; + h ^= (this.compression == null) ? 0 : this.compression.hashCode(); + h *= 1000003; + h ^= (this.timeout == null) ? 0 : this.timeout.hashCode(); + h *= 1000003; + h ^= (this.encoding == null) ? 0 : this.encoding.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof OtlpHttpExporterModel) == false) { - return false; + if (o instanceof OtlpHttpExporterModel) { + OtlpHttpExporterModel that = (OtlpHttpExporterModel) o; + return (this.endpoint == null ? that.endpoint == null : this.endpoint.equals(that.endpoint)) + && (this.tls == null ? that.tls == null : this.tls.equals(that.tls)) + && (this.headers == null ? that.headers == null : this.headers.equals(that.headers)) + && (this.headersList == null + ? that.headersList == null + : this.headersList.equals(that.headersList)) + && (this.compression == null + ? that.compression == null + : this.compression.equals(that.compression)) + && (this.timeout == null ? that.timeout == null : this.timeout.equals(that.timeout)) + && (this.encoding == null ? that.encoding == null : this.encoding.equals(that.encoding)); } - OtlpHttpExporterModel rhs = ((OtlpHttpExporterModel) other); - return ((((((((this.headers == rhs.headers) - || ((this.headers != null) && this.headers.equals(rhs.headers))) - && ((this.endpoint == rhs.endpoint) - || ((this.endpoint != null) && this.endpoint.equals(rhs.endpoint)))) - && ((this.headersList == rhs.headersList) - || ((this.headersList != null) - && this.headersList.equals(rhs.headersList)))) - && ((this.tls == rhs.tls) || ((this.tls != null) && this.tls.equals(rhs.tls)))) - && ((this.compression == rhs.compression) - || ((this.compression != null) && this.compression.equals(rhs.compression)))) - && ((this.encoding == rhs.encoding) - || ((this.encoding != null) && this.encoding.equals(rhs.encoding)))) - && ((this.timeout == rhs.timeout) - || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))); + return false; } @Generated("jsonschema2pojo") - @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum OtlpHttpEncoding { PROTOBUF("protobuf"), JSON("json"); diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpMetricExporterModel.java index 85b18f04082..740d6ca88c2 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpMetricExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpMetricExporterModel.java @@ -30,35 +30,27 @@ "default_histogram_aggregation" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class OtlpHttpMetricExporterModel { - /** - * Configure endpoint. If omitted or null, http://localhost:4318/v1/metrics is used. - * - *

(Can be null) - */ - @Nullable + /** Configure endpoint. If omitted or null, http://localhost:4318/v1/metrics is used. */ @JsonProperty("endpoint") @JsonPropertyDescription( "Configure endpoint.\nIf omitted or null, http://localhost:4318/v1/metrics is used.\n") + @Nullable private String endpoint; - /** (Can be null) */ - @Nullable @JsonProperty("tls") + @Nullable private HttpTlsModel tls; /** * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's * .value is null, the entry is ignored. If omitted, no headers are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("headers") @JsonPropertyDescription( "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\nIf omitted, no headers are added.\n") + @Nullable private List headers; /** @@ -66,52 +58,43 @@ public class OtlpHttpMetricExporterModel { * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options * for details. If omitted or null, no headers are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("headers_list") @JsonPropertyDescription( "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n") + @Nullable private String headersList; /** * Configure compression. Known values include: gzip, none. Implementations may support other * compression algorithms. If omitted or null, none is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("compression") @JsonPropertyDescription( "Configure compression.\nKnown values include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n") + @Nullable private String compression; /** * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("timeout") @JsonPropertyDescription( "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n") + @Nullable private Integer timeout; - /** (Can be null) */ - @Nullable @JsonProperty("encoding") + @Nullable private OtlpHttpExporterModel.OtlpHttpEncoding encoding; - /** (Can be null) */ - @Nullable @JsonProperty("temporality_preference") + @Nullable private OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference; - /** (Can be null) */ - @Nullable @JsonProperty("default_histogram_aggregation") + @Nullable private OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation defaultHistogramAggregation; @@ -238,114 +221,84 @@ public OtlpHttpMetricExporterModel withDefaultHistogramAggregation( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(OtlpHttpMetricExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("endpoint"); - sb.append('='); - sb.append(((this.endpoint == null) ? "" : this.endpoint)); - sb.append(','); - sb.append("tls"); - sb.append('='); - sb.append(((this.tls == null) ? "" : this.tls)); - sb.append(','); - sb.append("headers"); - sb.append('='); - sb.append(((this.headers == null) ? "" : this.headers)); - sb.append(','); - sb.append("headersList"); - sb.append('='); - sb.append(((this.headersList == null) ? "" : this.headersList)); - sb.append(','); - sb.append("compression"); - sb.append('='); - sb.append(((this.compression == null) ? "" : this.compression)); - sb.append(','); - sb.append("timeout"); - sb.append('='); - sb.append(((this.timeout == null) ? "" : this.timeout)); - sb.append(','); - sb.append("encoding"); - sb.append('='); - sb.append(((this.encoding == null) ? "" : this.encoding)); - sb.append(','); - sb.append("temporalityPreference"); - sb.append('='); - sb.append(((this.temporalityPreference == null) ? "" : this.temporalityPreference)); - sb.append(','); - sb.append("defaultHistogramAggregation"); - sb.append('='); - sb.append( - ((this.defaultHistogramAggregation == null) ? "" : this.defaultHistogramAggregation)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "OtlpHttpMetricExporterModel{" + + "endpoint=" + + endpoint + + ", tls=" + + tls + + ", headers=" + + headers + + ", headersList=" + + headersList + + ", compression=" + + compression + + ", timeout=" + + timeout + + ", encoding=" + + encoding + + ", temporalityPreference=" + + temporalityPreference + + ", defaultHistogramAggregation=" + + defaultHistogramAggregation + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.headers == null) ? 0 : this.headers.hashCode())); - result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); - result = ((result * 31) + ((this.headersList == null) ? 0 : this.headersList.hashCode())); - result = ((result * 31) + ((this.tls == null) ? 0 : this.tls.hashCode())); - result = ((result * 31) + ((this.compression == null) ? 0 : this.compression.hashCode())); - result = ((result * 31) + ((this.encoding == null) ? 0 : this.encoding.hashCode())); - result = - ((result * 31) - + ((this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode())); - result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); - result = - ((result * 31) - + ((this.defaultHistogramAggregation == null) - ? 0 - : this.defaultHistogramAggregation.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.endpoint == null) ? 0 : this.endpoint.hashCode(); + h *= 1000003; + h ^= (this.tls == null) ? 0 : this.tls.hashCode(); + h *= 1000003; + h ^= (this.headers == null) ? 0 : this.headers.hashCode(); + h *= 1000003; + h ^= (this.headersList == null) ? 0 : this.headersList.hashCode(); + h *= 1000003; + h ^= (this.compression == null) ? 0 : this.compression.hashCode(); + h *= 1000003; + h ^= (this.timeout == null) ? 0 : this.timeout.hashCode(); + h *= 1000003; + h ^= (this.encoding == null) ? 0 : this.encoding.hashCode(); + h *= 1000003; + h ^= (this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode(); + h *= 1000003; + h ^= + (this.defaultHistogramAggregation == null) + ? 0 + : this.defaultHistogramAggregation.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof OtlpHttpMetricExporterModel) == false) { - return false; + if (o instanceof OtlpHttpMetricExporterModel) { + OtlpHttpMetricExporterModel that = (OtlpHttpMetricExporterModel) o; + return (this.endpoint == null ? that.endpoint == null : this.endpoint.equals(that.endpoint)) + && (this.tls == null ? that.tls == null : this.tls.equals(that.tls)) + && (this.headers == null ? that.headers == null : this.headers.equals(that.headers)) + && (this.headersList == null + ? that.headersList == null + : this.headersList.equals(that.headersList)) + && (this.compression == null + ? that.compression == null + : this.compression.equals(that.compression)) + && (this.timeout == null ? that.timeout == null : this.timeout.equals(that.timeout)) + && (this.encoding == null ? that.encoding == null : this.encoding.equals(that.encoding)) + && (this.temporalityPreference == null + ? that.temporalityPreference == null + : this.temporalityPreference.equals(that.temporalityPreference)) + && (this.defaultHistogramAggregation == null + ? that.defaultHistogramAggregation == null + : this.defaultHistogramAggregation.equals(that.defaultHistogramAggregation)); } - OtlpHttpMetricExporterModel rhs = ((OtlpHttpMetricExporterModel) other); - return ((((((((((this.headers == rhs.headers) - || ((this.headers != null) - && this.headers.equals(rhs.headers))) - && ((this.endpoint == rhs.endpoint) - || ((this.endpoint != null) - && this.endpoint.equals(rhs.endpoint)))) - && ((this.headersList == rhs.headersList) - || ((this.headersList != null) - && this.headersList.equals(rhs.headersList)))) - && ((this.tls == rhs.tls) - || ((this.tls != null) && this.tls.equals(rhs.tls)))) - && ((this.compression == rhs.compression) - || ((this.compression != null) - && this.compression.equals(rhs.compression)))) - && ((this.encoding == rhs.encoding) - || ((this.encoding != null) && this.encoding.equals(rhs.encoding)))) - && ((this.temporalityPreference == rhs.temporalityPreference) - || ((this.temporalityPreference != null) - && this.temporalityPreference.equals(rhs.temporalityPreference)))) - && ((this.timeout == rhs.timeout) - || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))) - && ((this.defaultHistogramAggregation == rhs.defaultHistogramAggregation) - || ((this.defaultHistogramAggregation != null) - && this.defaultHistogramAggregation.equals(rhs.defaultHistogramAggregation)))); + return false; } @Generated("jsonschema2pojo") - @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum ExporterDefaultHistogramAggregation { EXPLICIT_BUCKET_HISTOGRAM("explicit_bucket_histogram"), BASE_2_EXPONENTIAL_BUCKET_HISTOGRAM("base2_exponential_bucket_histogram"); @@ -389,7 +342,6 @@ public static OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation fr } @Generated("jsonschema2pojo") - @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum ExporterTemporalityPreference { CUMULATIVE("cumulative"), DELTA("delta"), diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ParentBasedSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ParentBasedSamplerModel.java index a999a831210..68c236e91f8 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ParentBasedSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ParentBasedSamplerModel.java @@ -20,32 +20,26 @@ "local_parent_not_sampled" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ParentBasedSamplerModel { - /** (Can be null) */ - @Nullable @JsonProperty("root") + @Nullable private SamplerModel root; - /** (Can be null) */ - @Nullable @JsonProperty("remote_parent_sampled") + @Nullable private SamplerModel remoteParentSampled; - /** (Can be null) */ - @Nullable @JsonProperty("remote_parent_not_sampled") + @Nullable private SamplerModel remoteParentNotSampled; - /** (Can be null) */ - @Nullable @JsonProperty("local_parent_sampled") + @Nullable private SamplerModel localParentSampled; - /** (Can be null) */ - @Nullable @JsonProperty("local_parent_not_sampled") + @Nullable private SamplerModel localParentNotSampled; @JsonProperty("root") @@ -105,79 +99,57 @@ public ParentBasedSamplerModel withLocalParentNotSampled(SamplerModel localParen @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ParentBasedSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("root"); - sb.append('='); - sb.append(((this.root == null) ? "" : this.root)); - sb.append(','); - sb.append("remoteParentSampled"); - sb.append('='); - sb.append(((this.remoteParentSampled == null) ? "" : this.remoteParentSampled)); - sb.append(','); - sb.append("remoteParentNotSampled"); - sb.append('='); - sb.append(((this.remoteParentNotSampled == null) ? "" : this.remoteParentNotSampled)); - sb.append(','); - sb.append("localParentSampled"); - sb.append('='); - sb.append(((this.localParentSampled == null) ? "" : this.localParentSampled)); - sb.append(','); - sb.append("localParentNotSampled"); - sb.append('='); - sb.append(((this.localParentNotSampled == null) ? "" : this.localParentNotSampled)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ParentBasedSamplerModel{" + + "root=" + + root + + ", remoteParentSampled=" + + remoteParentSampled + + ", remoteParentNotSampled=" + + remoteParentNotSampled + + ", localParentSampled=" + + localParentSampled + + ", localParentNotSampled=" + + localParentNotSampled + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.remoteParentNotSampled == null) ? 0 : this.remoteParentNotSampled.hashCode())); - result = - ((result * 31) - + ((this.localParentNotSampled == null) ? 0 : this.localParentNotSampled.hashCode())); - result = - ((result * 31) - + ((this.remoteParentSampled == null) ? 0 : this.remoteParentSampled.hashCode())); - result = ((result * 31) + ((this.root == null) ? 0 : this.root.hashCode())); - result = - ((result * 31) - + ((this.localParentSampled == null) ? 0 : this.localParentSampled.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.root == null) ? 0 : this.root.hashCode(); + h *= 1000003; + h ^= (this.remoteParentSampled == null) ? 0 : this.remoteParentSampled.hashCode(); + h *= 1000003; + h ^= (this.remoteParentNotSampled == null) ? 0 : this.remoteParentNotSampled.hashCode(); + h *= 1000003; + h ^= (this.localParentSampled == null) ? 0 : this.localParentSampled.hashCode(); + h *= 1000003; + h ^= (this.localParentNotSampled == null) ? 0 : this.localParentNotSampled.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ParentBasedSamplerModel) == false) { - return false; + if (o instanceof ParentBasedSamplerModel) { + ParentBasedSamplerModel that = (ParentBasedSamplerModel) o; + return (this.root == null ? that.root == null : this.root.equals(that.root)) + && (this.remoteParentSampled == null + ? that.remoteParentSampled == null + : this.remoteParentSampled.equals(that.remoteParentSampled)) + && (this.remoteParentNotSampled == null + ? that.remoteParentNotSampled == null + : this.remoteParentNotSampled.equals(that.remoteParentNotSampled)) + && (this.localParentSampled == null + ? that.localParentSampled == null + : this.localParentSampled.equals(that.localParentSampled)) + && (this.localParentNotSampled == null + ? that.localParentNotSampled == null + : this.localParentNotSampled.equals(that.localParentNotSampled)); } - ParentBasedSamplerModel rhs = ((ParentBasedSamplerModel) other); - return ((((((this.remoteParentNotSampled == rhs.remoteParentNotSampled) - || ((this.remoteParentNotSampled != null) - && this.remoteParentNotSampled.equals(rhs.remoteParentNotSampled))) - && ((this.localParentNotSampled == rhs.localParentNotSampled) - || ((this.localParentNotSampled != null) - && this.localParentNotSampled.equals(rhs.localParentNotSampled)))) - && ((this.remoteParentSampled == rhs.remoteParentSampled) - || ((this.remoteParentSampled != null) - && this.remoteParentSampled.equals(rhs.remoteParentSampled)))) - && ((this.root == rhs.root) || ((this.root != null) && this.root.equals(rhs.root)))) - && ((this.localParentSampled == rhs.localParentSampled) - || ((this.localParentSampled != null) - && this.localParentSampled.equals(rhs.localParentSampled)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PeriodicMetricReaderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PeriodicMetricReaderModel.java index 31e2004d74c..79780bd61cb 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PeriodicMetricReaderModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PeriodicMetricReaderModel.java @@ -11,7 +11,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.List; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @@ -24,63 +23,49 @@ "cardinality_limits" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class PeriodicMetricReaderModel { /** * Configure delay interval (in milliseconds) between start of two consecutive exports. Value must * be non-negative. If omitted or null, 60000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("interval") @JsonPropertyDescription( "Configure delay interval (in milliseconds) between start of two consecutive exports. \nValue must be non-negative.\nIf omitted or null, 60000 is used.\n") + @Nullable private Integer interval; /** * Configure maximum allowed time (in milliseconds) to export data. Value must be non-negative. A * value of 0 indicates no limit (infinity). If omitted or null, 30000 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("timeout") @JsonPropertyDescription( "Configure maximum allowed time (in milliseconds) to export data. \nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 30000 is used.\n") + @Nullable private Integer timeout; - /** - * Configure maximum export batch size. If omitted or null, no limit is used. - * - *

(Can be null) - */ - @Nullable + /** Configure maximum export batch size. If omitted or null, no limit is used. */ @JsonProperty("max_export_batch_size/development") @JsonPropertyDescription( "Configure maximum export batch size.\nIf omitted or null, no limit is used.\n") + @Nullable private Integer maxExportBatchSizeDevelopment; /** (Required) */ @JsonProperty("exporter") - @Nonnull + @Nullable private PushMetricExporterModel exporter; - /** - * Configure metric producers. If omitted, no metric producers are added. - * - *

(Can be null) - */ - @Nullable + /** Configure metric producers. If omitted, no metric producers are added. */ @JsonProperty("producers") @JsonPropertyDescription( "Configure metric producers.\nIf omitted, no metric producers are added.\n") + @Nullable private List producers; - /** (Can be null) */ - @Nullable @JsonProperty("cardinality_limits") + @Nullable private CardinalityLimitsModel cardinalityLimits; /** @@ -163,87 +148,63 @@ public PeriodicMetricReaderModel withCardinalityLimits(CardinalityLimitsModel ca @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(PeriodicMetricReaderModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("interval"); - sb.append('='); - sb.append(((this.interval == null) ? "" : this.interval)); - sb.append(','); - sb.append("timeout"); - sb.append('='); - sb.append(((this.timeout == null) ? "" : this.timeout)); - sb.append(','); - sb.append("maxExportBatchSizeDevelopment"); - sb.append('='); - sb.append( - ((this.maxExportBatchSizeDevelopment == null) - ? "" - : this.maxExportBatchSizeDevelopment)); - sb.append(','); - sb.append("exporter"); - sb.append('='); - sb.append(((this.exporter == null) ? "" : this.exporter)); - sb.append(','); - sb.append("producers"); - sb.append('='); - sb.append(((this.producers == null) ? "" : this.producers)); - sb.append(','); - sb.append("cardinalityLimits"); - sb.append('='); - sb.append(((this.cardinalityLimits == null) ? "" : this.cardinalityLimits)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "PeriodicMetricReaderModel{" + + "interval=" + + interval + + ", timeout=" + + timeout + + ", maxExportBatchSizeDevelopment=" + + maxExportBatchSizeDevelopment + + ", exporter=" + + exporter + + ", producers=" + + producers + + ", cardinalityLimits=" + + cardinalityLimits + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.interval == null) ? 0 : this.interval.hashCode())); - result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); - result = - ((result * 31) - + ((this.cardinalityLimits == null) ? 0 : this.cardinalityLimits.hashCode())); - result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); - result = - ((result * 31) - + ((this.maxExportBatchSizeDevelopment == null) - ? 0 - : this.maxExportBatchSizeDevelopment.hashCode())); - result = ((result * 31) + ((this.producers == null) ? 0 : this.producers.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.interval == null) ? 0 : this.interval.hashCode(); + h *= 1000003; + h ^= (this.timeout == null) ? 0 : this.timeout.hashCode(); + h *= 1000003; + h ^= + (this.maxExportBatchSizeDevelopment == null) + ? 0 + : this.maxExportBatchSizeDevelopment.hashCode(); + h *= 1000003; + h ^= (this.exporter == null) ? 0 : this.exporter.hashCode(); + h *= 1000003; + h ^= (this.producers == null) ? 0 : this.producers.hashCode(); + h *= 1000003; + h ^= (this.cardinalityLimits == null) ? 0 : this.cardinalityLimits.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof PeriodicMetricReaderModel) == false) { - return false; + if (o instanceof PeriodicMetricReaderModel) { + PeriodicMetricReaderModel that = (PeriodicMetricReaderModel) o; + return (this.interval == null ? that.interval == null : this.interval.equals(that.interval)) + && (this.timeout == null ? that.timeout == null : this.timeout.equals(that.timeout)) + && (this.maxExportBatchSizeDevelopment == null + ? that.maxExportBatchSizeDevelopment == null + : this.maxExportBatchSizeDevelopment.equals(that.maxExportBatchSizeDevelopment)) + && (this.exporter == null ? that.exporter == null : this.exporter.equals(that.exporter)) + && (this.producers == null + ? that.producers == null + : this.producers.equals(that.producers)) + && (this.cardinalityLimits == null + ? that.cardinalityLimits == null + : this.cardinalityLimits.equals(that.cardinalityLimits)); } - PeriodicMetricReaderModel rhs = ((PeriodicMetricReaderModel) other); - return (((((((this.interval == rhs.interval) - || ((this.interval != null) && this.interval.equals(rhs.interval))) - && ((this.exporter == rhs.exporter) - || ((this.exporter != null) && this.exporter.equals(rhs.exporter)))) - && ((this.cardinalityLimits == rhs.cardinalityLimits) - || ((this.cardinalityLimits != null) - && this.cardinalityLimits.equals(rhs.cardinalityLimits)))) - && ((this.timeout == rhs.timeout) - || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))) - && ((this.maxExportBatchSizeDevelopment == rhs.maxExportBatchSizeDevelopment) - || ((this.maxExportBatchSizeDevelopment != null) - && this.maxExportBatchSizeDevelopment.equals( - rhs.maxExportBatchSizeDevelopment)))) - && ((this.producers == rhs.producers) - || ((this.producers != null) && this.producers.equals(rhs.producers)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PropagatorModel.java index a492177cb95..9ad2cec1ee6 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PropagatorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PropagatorModel.java @@ -16,7 +16,6 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"composite", "composite_list"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class PropagatorModel { /** @@ -24,13 +23,11 @@ public class PropagatorModel { * are appended to the list here with duplicates filtered out. Built-in propagator keys include: * tracecontext, baggage, b3, b3multi. Known third party keys include: xray. If omitted, and * .composite_list is omitted or null, a noop propagator is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("composite") @JsonPropertyDescription( "Configure the propagators in the composite text map propagator. Entries from .composite_list are appended to the list here with duplicates filtered out.\nBuilt-in propagator keys include: tracecontext, baggage, b3, b3multi. Known third party keys include: xray.\nIf omitted, and .composite_list is omitted or null, a noop propagator is used.\n") + @Nullable private List composite; /** @@ -41,13 +38,11 @@ public class PropagatorModel { * for details. Built-in propagator identifiers include: tracecontext, baggage, b3, b3multi. Known * third party identifiers include: xray. If omitted or null, and .composite is omitted or null, a * noop propagator is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("composite_list") @JsonPropertyDescription( "Configure the propagators in the composite text map propagator. Entries are appended to .composite with duplicates filtered out.\nThe value is a comma separated list of propagator identifiers matching the format of OTEL_PROPAGATORS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.\nBuilt-in propagator identifiers include: tracecontext, baggage, b3, b3multi. Known third party identifiers include: xray.\nIf omitted or null, and .composite is omitted or null, a noop propagator is used.\n") + @Nullable private String compositeList; /** @@ -89,47 +84,33 @@ public PropagatorModel withCompositeList(String compositeList) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(PropagatorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("composite"); - sb.append('='); - sb.append(((this.composite == null) ? "" : this.composite)); - sb.append(','); - sb.append("compositeList"); - sb.append('='); - sb.append(((this.compositeList == null) ? "" : this.compositeList)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "PropagatorModel{" + "composite=" + composite + ", compositeList=" + compositeList + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.composite == null) ? 0 : this.composite.hashCode())); - result = ((result * 31) + ((this.compositeList == null) ? 0 : this.compositeList.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.composite == null) ? 0 : this.composite.hashCode(); + h *= 1000003; + h ^= (this.compositeList == null) ? 0 : this.compositeList.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof PropagatorModel) == false) { - return false; + if (o instanceof PropagatorModel) { + PropagatorModel that = (PropagatorModel) o; + return (this.composite == null + ? that.composite == null + : this.composite.equals(that.composite)) + && (this.compositeList == null + ? that.compositeList == null + : this.compositeList.equals(that.compositeList)); } - PropagatorModel rhs = ((PropagatorModel) other); - return (((this.composite == rhs.composite) - || ((this.composite != null) && this.composite.equals(rhs.composite))) - && ((this.compositeList == rhs.compositeList) - || ((this.compositeList != null) && this.compositeList.equals(rhs.compositeList)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterModel.java index 310e186b21a..d0f44c938ea 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterModel.java @@ -19,12 +19,10 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"prometheus/development"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class PullMetricExporterModel { - /** (Can be null) */ - @Nullable @JsonProperty("prometheus/development") + @Nullable private ExperimentalPrometheusMetricExporterModel prometheusDevelopment; @JsonIgnore @@ -61,53 +59,38 @@ public PullMetricExporterModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(PullMetricExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("prometheusDevelopment"); - sb.append('='); - sb.append(((this.prometheusDevelopment == null) ? "" : this.prometheusDevelopment)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "PullMetricExporterModel{" + + "prometheusDevelopment=" + + prometheusDevelopment + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.prometheusDevelopment == null) ? 0 : this.prometheusDevelopment.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.prometheusDevelopment == null) ? 0 : this.prometheusDevelopment.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof PullMetricExporterModel) == false) { - return false; + if (o instanceof PullMetricExporterModel) { + PullMetricExporterModel that = (PullMetricExporterModel) o; + return (this.prometheusDevelopment == null + ? that.prometheusDevelopment == null + : this.prometheusDevelopment.equals(that.prometheusDevelopment)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - PullMetricExporterModel rhs = ((PullMetricExporterModel) other); - return (((this.prometheusDevelopment == rhs.prometheusDevelopment) - || ((this.prometheusDevelopment != null) - && this.prometheusDevelopment.equals(rhs.prometheusDevelopment))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterPropertyModel.java index 67f01874bbd..275cad1c304 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class PullMetricExporterPropertyModel { @JsonIgnore @@ -40,43 +40,31 @@ public PullMetricExporterPropertyModel withAdditionalProperty(String name, Objec @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(PullMetricExporterPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "PullMetricExporterPropertyModel{" + + "additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof PullMetricExporterPropertyModel) == false) { - return false; + if (o instanceof PullMetricExporterPropertyModel) { + PullMetricExporterPropertyModel that = (PullMetricExporterPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - PullMetricExporterPropertyModel rhs = ((PullMetricExporterPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricReaderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricReaderModel.java index ac001c326df..449e6e5394a 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricReaderModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricReaderModel.java @@ -11,34 +11,27 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.List; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"exporter", "producers", "cardinality_limits"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class PullMetricReaderModel { /** (Required) */ @JsonProperty("exporter") - @Nonnull + @Nullable private PullMetricExporterModel exporter; - /** - * Configure metric producers. If omitted, no metric producers are added. - * - *

(Can be null) - */ - @Nullable + /** Configure metric producers. If omitted, no metric producers are added. */ @JsonProperty("producers") @JsonPropertyDescription( "Configure metric producers.\nIf omitted, no metric producers are added.\n") + @Nullable private List producers; - /** (Can be null) */ - @Nullable @JsonProperty("cardinality_limits") + @Nullable private CardinalityLimitsModel cardinalityLimits; /** (Required) */ @@ -78,57 +71,43 @@ public PullMetricReaderModel withCardinalityLimits(CardinalityLimitsModel cardin @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(PullMetricReaderModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("exporter"); - sb.append('='); - sb.append(((this.exporter == null) ? "" : this.exporter)); - sb.append(','); - sb.append("producers"); - sb.append('='); - sb.append(((this.producers == null) ? "" : this.producers)); - sb.append(','); - sb.append("cardinalityLimits"); - sb.append('='); - sb.append(((this.cardinalityLimits == null) ? "" : this.cardinalityLimits)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "PullMetricReaderModel{" + + "exporter=" + + exporter + + ", producers=" + + producers + + ", cardinalityLimits=" + + cardinalityLimits + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.cardinalityLimits == null) ? 0 : this.cardinalityLimits.hashCode())); - result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); - result = ((result * 31) + ((this.producers == null) ? 0 : this.producers.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.exporter == null) ? 0 : this.exporter.hashCode(); + h *= 1000003; + h ^= (this.producers == null) ? 0 : this.producers.hashCode(); + h *= 1000003; + h ^= (this.cardinalityLimits == null) ? 0 : this.cardinalityLimits.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof PullMetricReaderModel) == false) { - return false; + if (o instanceof PullMetricReaderModel) { + PullMetricReaderModel that = (PullMetricReaderModel) o; + return (this.exporter == null ? that.exporter == null : this.exporter.equals(that.exporter)) + && (this.producers == null + ? that.producers == null + : this.producers.equals(that.producers)) + && (this.cardinalityLimits == null + ? that.cardinalityLimits == null + : this.cardinalityLimits.equals(that.cardinalityLimits)); } - PullMetricReaderModel rhs = ((PullMetricReaderModel) other); - return ((((this.cardinalityLimits == rhs.cardinalityLimits) - || ((this.cardinalityLimits != null) - && this.cardinalityLimits.equals(rhs.cardinalityLimits))) - && ((this.exporter == rhs.exporter) - || ((this.exporter != null) && this.exporter.equals(rhs.exporter)))) - && ((this.producers == rhs.producers) - || ((this.producers != null) && this.producers.equals(rhs.producers)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterModel.java index dfc566921ee..1531ae81f1a 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterModel.java @@ -19,27 +19,22 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"otlp_http", "otlp_grpc", "otlp_file/development", "console"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class PushMetricExporterModel { - /** (Can be null) */ - @Nullable @JsonProperty("otlp_http") + @Nullable private OtlpHttpMetricExporterModel otlpHttp; - /** (Can be null) */ - @Nullable @JsonProperty("otlp_grpc") + @Nullable private OtlpGrpcMetricExporterModel otlpGrpc; - /** (Can be null) */ - @Nullable @JsonProperty("otlp_file/development") + @Nullable private ExperimentalOtlpFileMetricExporterModel otlpFileDevelopment; - /** (Can be null) */ - @Nullable @JsonProperty("console") + @Nullable private ConsoleMetricExporterModel console; @JsonIgnore @@ -109,74 +104,53 @@ public PushMetricExporterModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(PushMetricExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("otlpHttp"); - sb.append('='); - sb.append(((this.otlpHttp == null) ? "" : this.otlpHttp)); - sb.append(','); - sb.append("otlpGrpc"); - sb.append('='); - sb.append(((this.otlpGrpc == null) ? "" : this.otlpGrpc)); - sb.append(','); - sb.append("otlpFileDevelopment"); - sb.append('='); - sb.append(((this.otlpFileDevelopment == null) ? "" : this.otlpFileDevelopment)); - sb.append(','); - sb.append("console"); - sb.append('='); - sb.append(((this.console == null) ? "" : this.console)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "PushMetricExporterModel{" + + "otlpHttp=" + + otlpHttp + + ", otlpGrpc=" + + otlpGrpc + + ", otlpFileDevelopment=" + + otlpFileDevelopment + + ", console=" + + console + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.console == null) ? 0 : this.console.hashCode())); - result = - ((result * 31) - + ((this.otlpFileDevelopment == null) ? 0 : this.otlpFileDevelopment.hashCode())); - result = ((result * 31) + ((this.otlpGrpc == null) ? 0 : this.otlpGrpc.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - result = ((result * 31) + ((this.otlpHttp == null) ? 0 : this.otlpHttp.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.otlpHttp == null) ? 0 : this.otlpHttp.hashCode(); + h *= 1000003; + h ^= (this.otlpGrpc == null) ? 0 : this.otlpGrpc.hashCode(); + h *= 1000003; + h ^= (this.otlpFileDevelopment == null) ? 0 : this.otlpFileDevelopment.hashCode(); + h *= 1000003; + h ^= (this.console == null) ? 0 : this.console.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof PushMetricExporterModel) == false) { - return false; + if (o instanceof PushMetricExporterModel) { + PushMetricExporterModel that = (PushMetricExporterModel) o; + return (this.otlpHttp == null ? that.otlpHttp == null : this.otlpHttp.equals(that.otlpHttp)) + && (this.otlpGrpc == null ? that.otlpGrpc == null : this.otlpGrpc.equals(that.otlpGrpc)) + && (this.otlpFileDevelopment == null + ? that.otlpFileDevelopment == null + : this.otlpFileDevelopment.equals(that.otlpFileDevelopment)) + && (this.console == null ? that.console == null : this.console.equals(that.console)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - PushMetricExporterModel rhs = ((PushMetricExporterModel) other); - return ((((((this.console == rhs.console) - || ((this.console != null) && this.console.equals(rhs.console))) - && ((this.otlpFileDevelopment == rhs.otlpFileDevelopment) - || ((this.otlpFileDevelopment != null) - && this.otlpFileDevelopment.equals(rhs.otlpFileDevelopment)))) - && ((this.otlpGrpc == rhs.otlpGrpc) - || ((this.otlpGrpc != null) && this.otlpGrpc.equals(rhs.otlpGrpc)))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))) - && ((this.otlpHttp == rhs.otlpHttp) - || ((this.otlpHttp != null) && this.otlpHttp.equals(rhs.otlpHttp)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterPropertyModel.java index a970972d725..4b6201dc5e6 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class PushMetricExporterPropertyModel { @JsonIgnore @@ -40,43 +40,31 @@ public PushMetricExporterPropertyModel withAdditionalProperty(String name, Objec @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(PushMetricExporterPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "PushMetricExporterPropertyModel{" + + "additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof PushMetricExporterPropertyModel) == false) { - return false; + if (o instanceof PushMetricExporterPropertyModel) { + PushMetricExporterPropertyModel that = (PushMetricExporterPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - PushMetricExporterPropertyModel rhs = ((PushMetricExporterPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/RandomIdGeneratorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/RandomIdGeneratorModel.java index 14883deba3d..822fc040ca6 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/RandomIdGeneratorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/RandomIdGeneratorModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class RandomIdGeneratorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(RandomIdGeneratorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "RandomIdGeneratorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof RandomIdGeneratorModel) == false) { - return false; + if (o instanceof RandomIdGeneratorModel) { + RandomIdGeneratorModel that = (RandomIdGeneratorModel) o; + return true; } - RandomIdGeneratorModel rhs = ((RandomIdGeneratorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ResourceModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ResourceModel.java index 89bda1df0c9..0295d3f99ba 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ResourceModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ResourceModel.java @@ -16,35 +16,27 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"attributes", "detection/development", "schema_url", "attributes_list"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ResourceModel { /** * Configure resource attributes. Entries have higher priority than entries from * .resource.attributes_list. If omitted, no resource attributes are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("attributes") @JsonPropertyDescription( "Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.\nIf omitted, no resource attributes are added.\n") + @Nullable private List attributes; - /** (Can be null) */ - @Nullable @JsonProperty("detection/development") + @Nullable private ExperimentalResourceDetectionModel detectionDevelopment; - /** - * Configure resource schema URL. If omitted or null, no schema URL is used. - * - *

(Can be null) - */ - @Nullable + /** Configure resource schema URL. If omitted or null, no schema URL is used. */ @JsonProperty("schema_url") @JsonPropertyDescription( "Configure resource schema URL.\nIf omitted or null, no schema URL is used.\n") + @Nullable private String schemaUrl; /** @@ -53,13 +45,11 @@ public class ResourceModel { * format of OTEL_RESOURCE_ATTRIBUTES. See * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration * for details. If omitted or null, no resource attributes are added. - * - *

(Can be null) */ - @Nullable @JsonProperty("attributes_list") @JsonPropertyDescription( "Configure resource attributes. Entries have lower priority than entries from .resource.attributes.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_RESOURCE_ATTRIBUTES. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.\nIf omitted or null, no resource attributes are added.\n") + @Nullable private String attributesList; /** @@ -121,65 +111,52 @@ public ResourceModel withAttributesList(String attributesList) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ResourceModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("attributes"); - sb.append('='); - sb.append(((this.attributes == null) ? "" : this.attributes)); - sb.append(','); - sb.append("detectionDevelopment"); - sb.append('='); - sb.append(((this.detectionDevelopment == null) ? "" : this.detectionDevelopment)); - sb.append(','); - sb.append("schemaUrl"); - sb.append('='); - sb.append(((this.schemaUrl == null) ? "" : this.schemaUrl)); - sb.append(','); - sb.append("attributesList"); - sb.append('='); - sb.append(((this.attributesList == null) ? "" : this.attributesList)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ResourceModel{" + + "attributes=" + + attributes + + ", detectionDevelopment=" + + detectionDevelopment + + ", schemaUrl=" + + schemaUrl + + ", attributesList=" + + attributesList + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.attributes == null) ? 0 : this.attributes.hashCode())); - result = - ((result * 31) - + ((this.detectionDevelopment == null) ? 0 : this.detectionDevelopment.hashCode())); - result = ((result * 31) + ((this.attributesList == null) ? 0 : this.attributesList.hashCode())); - result = ((result * 31) + ((this.schemaUrl == null) ? 0 : this.schemaUrl.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.attributes == null) ? 0 : this.attributes.hashCode(); + h *= 1000003; + h ^= (this.detectionDevelopment == null) ? 0 : this.detectionDevelopment.hashCode(); + h *= 1000003; + h ^= (this.schemaUrl == null) ? 0 : this.schemaUrl.hashCode(); + h *= 1000003; + h ^= (this.attributesList == null) ? 0 : this.attributesList.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ResourceModel) == false) { - return false; + if (o instanceof ResourceModel) { + ResourceModel that = (ResourceModel) o; + return (this.attributes == null + ? that.attributes == null + : this.attributes.equals(that.attributes)) + && (this.detectionDevelopment == null + ? that.detectionDevelopment == null + : this.detectionDevelopment.equals(that.detectionDevelopment)) + && (this.schemaUrl == null + ? that.schemaUrl == null + : this.schemaUrl.equals(that.schemaUrl)) + && (this.attributesList == null + ? that.attributesList == null + : this.attributesList.equals(that.attributesList)); } - ResourceModel rhs = ((ResourceModel) other); - return (((((this.attributes == rhs.attributes) - || ((this.attributes != null) && this.attributes.equals(rhs.attributes))) - && ((this.detectionDevelopment == rhs.detectionDevelopment) - || ((this.detectionDevelopment != null) - && this.detectionDevelopment.equals(rhs.detectionDevelopment)))) - && ((this.attributesList == rhs.attributesList) - || ((this.attributesList != null) - && this.attributesList.equals(rhs.attributesList)))) - && ((this.schemaUrl == rhs.schemaUrl) - || ((this.schemaUrl != null) && this.schemaUrl.equals(rhs.schemaUrl)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerModel.java index 30ec7e9a202..cf96644df5c 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerModel.java @@ -27,41 +27,34 @@ "trace_id_ratio_based" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SamplerModel { - /** (Can be null) */ - @Nullable @JsonProperty("always_off") + @Nullable private AlwaysOffSamplerModel alwaysOff; - /** (Can be null) */ - @Nullable @JsonProperty("always_on") + @Nullable private AlwaysOnSamplerModel alwaysOn; - /** (Can be null) */ - @Nullable @JsonProperty("composite/development") + @Nullable private ExperimentalComposableSamplerModel compositeDevelopment; - @Nullable @JsonProperty("jaeger_remote/development") + @Nullable private ExperimentalJaegerRemoteSamplerModel jaegerRemoteDevelopment; - /** (Can be null) */ - @Nullable @JsonProperty("parent_based") + @Nullable private ParentBasedSamplerModel parentBased; - /** (Can be null) */ - @Nullable @JsonProperty("probability/development") + @Nullable private ExperimentalProbabilitySamplerModel probabilityDevelopment; - /** (Can be null) */ - @Nullable @JsonProperty("trace_id_ratio_based") + @Nullable private TraceIdRatioBasedSamplerModel traceIdRatioBased; @JsonIgnore @@ -165,109 +158,78 @@ public SamplerModel withAdditionalProperty(String name, SamplerPropertyModel val @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("alwaysOff"); - sb.append('='); - sb.append(((this.alwaysOff == null) ? "" : this.alwaysOff)); - sb.append(','); - sb.append("alwaysOn"); - sb.append('='); - sb.append(((this.alwaysOn == null) ? "" : this.alwaysOn)); - sb.append(','); - sb.append("compositeDevelopment"); - sb.append('='); - sb.append(((this.compositeDevelopment == null) ? "" : this.compositeDevelopment)); - sb.append(','); - sb.append("jaegerRemoteDevelopment"); - sb.append('='); - sb.append(((this.jaegerRemoteDevelopment == null) ? "" : this.jaegerRemoteDevelopment)); - sb.append(','); - sb.append("parentBased"); - sb.append('='); - sb.append(((this.parentBased == null) ? "" : this.parentBased)); - sb.append(','); - sb.append("probabilityDevelopment"); - sb.append('='); - sb.append(((this.probabilityDevelopment == null) ? "" : this.probabilityDevelopment)); - sb.append(','); - sb.append("traceIdRatioBased"); - sb.append('='); - sb.append(((this.traceIdRatioBased == null) ? "" : this.traceIdRatioBased)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SamplerModel{" + + "alwaysOff=" + + alwaysOff + + ", alwaysOn=" + + alwaysOn + + ", compositeDevelopment=" + + compositeDevelopment + + ", jaegerRemoteDevelopment=" + + jaegerRemoteDevelopment + + ", parentBased=" + + parentBased + + ", probabilityDevelopment=" + + probabilityDevelopment + + ", traceIdRatioBased=" + + traceIdRatioBased + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.compositeDevelopment == null) ? 0 : this.compositeDevelopment.hashCode())); - result = - ((result * 31) - + ((this.jaegerRemoteDevelopment == null) - ? 0 - : this.jaegerRemoteDevelopment.hashCode())); - result = - ((result * 31) - + ((this.probabilityDevelopment == null) ? 0 : this.probabilityDevelopment.hashCode())); - result = - ((result * 31) - + ((this.traceIdRatioBased == null) ? 0 : this.traceIdRatioBased.hashCode())); - result = ((result * 31) + ((this.alwaysOff == null) ? 0 : this.alwaysOff.hashCode())); - result = ((result * 31) + ((this.parentBased == null) ? 0 : this.parentBased.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - result = ((result * 31) + ((this.alwaysOn == null) ? 0 : this.alwaysOn.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.alwaysOff == null) ? 0 : this.alwaysOff.hashCode(); + h *= 1000003; + h ^= (this.alwaysOn == null) ? 0 : this.alwaysOn.hashCode(); + h *= 1000003; + h ^= (this.compositeDevelopment == null) ? 0 : this.compositeDevelopment.hashCode(); + h *= 1000003; + h ^= (this.jaegerRemoteDevelopment == null) ? 0 : this.jaegerRemoteDevelopment.hashCode(); + h *= 1000003; + h ^= (this.parentBased == null) ? 0 : this.parentBased.hashCode(); + h *= 1000003; + h ^= (this.probabilityDevelopment == null) ? 0 : this.probabilityDevelopment.hashCode(); + h *= 1000003; + h ^= (this.traceIdRatioBased == null) ? 0 : this.traceIdRatioBased.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SamplerModel) == false) { - return false; + if (o instanceof SamplerModel) { + SamplerModel that = (SamplerModel) o; + return (this.alwaysOff == null + ? that.alwaysOff == null + : this.alwaysOff.equals(that.alwaysOff)) + && (this.alwaysOn == null ? that.alwaysOn == null : this.alwaysOn.equals(that.alwaysOn)) + && (this.compositeDevelopment == null + ? that.compositeDevelopment == null + : this.compositeDevelopment.equals(that.compositeDevelopment)) + && (this.jaegerRemoteDevelopment == null + ? that.jaegerRemoteDevelopment == null + : this.jaegerRemoteDevelopment.equals(that.jaegerRemoteDevelopment)) + && (this.parentBased == null + ? that.parentBased == null + : this.parentBased.equals(that.parentBased)) + && (this.probabilityDevelopment == null + ? that.probabilityDevelopment == null + : this.probabilityDevelopment.equals(that.probabilityDevelopment)) + && (this.traceIdRatioBased == null + ? that.traceIdRatioBased == null + : this.traceIdRatioBased.equals(that.traceIdRatioBased)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - SamplerModel rhs = ((SamplerModel) other); - return (((((((((this.compositeDevelopment == rhs.compositeDevelopment) - || ((this.compositeDevelopment != null) - && this.compositeDevelopment.equals( - rhs.compositeDevelopment))) - && ((this.jaegerRemoteDevelopment == rhs.jaegerRemoteDevelopment) - || ((this.jaegerRemoteDevelopment != null) - && this.jaegerRemoteDevelopment.equals( - rhs.jaegerRemoteDevelopment)))) - && ((this.probabilityDevelopment == rhs.probabilityDevelopment) - || ((this.probabilityDevelopment != null) - && this.probabilityDevelopment.equals( - rhs.probabilityDevelopment)))) - && ((this.traceIdRatioBased == rhs.traceIdRatioBased) - || ((this.traceIdRatioBased != null) - && this.traceIdRatioBased.equals(rhs.traceIdRatioBased)))) - && ((this.alwaysOff == rhs.alwaysOff) - || ((this.alwaysOff != null) && this.alwaysOff.equals(rhs.alwaysOff)))) - && ((this.parentBased == rhs.parentBased) - || ((this.parentBased != null) && this.parentBased.equals(rhs.parentBased)))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))) - && ((this.alwaysOn == rhs.alwaysOn) - || ((this.alwaysOn != null) && this.alwaysOn.equals(rhs.alwaysOn)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerPropertyModel.java index fa3fa34db11..db804352936 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SamplerPropertyModel { @JsonIgnore @@ -40,43 +40,28 @@ public SamplerPropertyModel withAdditionalProperty(String name, Object value) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SamplerPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SamplerPropertyModel{" + "additionalProperties=" + additionalProperties + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SamplerPropertyModel) == false) { - return false; + if (o instanceof SamplerPropertyModel) { + SamplerPropertyModel that = (SamplerPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - SamplerPropertyModel rhs = ((SamplerPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleLogRecordProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleLogRecordProcessorModel.java index 75ff8079367..ec424f96279 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleLogRecordProcessorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleLogRecordProcessorModel.java @@ -9,18 +9,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"exporter"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SimpleLogRecordProcessorModel { /** (Required) */ @JsonProperty("exporter") - @Nonnull + @Nullable private LogRecordExporterModel exporter; /** (Required) */ @@ -37,40 +35,26 @@ public SimpleLogRecordProcessorModel withExporter(LogRecordExporterModel exporte @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SimpleLogRecordProcessorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("exporter"); - sb.append('='); - sb.append(((this.exporter == null) ? "" : this.exporter)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SimpleLogRecordProcessorModel{" + "exporter=" + exporter + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.exporter == null) ? 0 : this.exporter.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SimpleLogRecordProcessorModel) == false) { - return false; + if (o instanceof SimpleLogRecordProcessorModel) { + SimpleLogRecordProcessorModel that = (SimpleLogRecordProcessorModel) o; + return (this.exporter == null ? that.exporter == null : this.exporter.equals(that.exporter)); } - SimpleLogRecordProcessorModel rhs = ((SimpleLogRecordProcessorModel) other); - return ((this.exporter == rhs.exporter) - || ((this.exporter != null) && this.exporter.equals(rhs.exporter))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleSpanProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleSpanProcessorModel.java index 797b3cac9cf..e70022c2620 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleSpanProcessorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleSpanProcessorModel.java @@ -9,18 +9,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"exporter"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SimpleSpanProcessorModel { /** (Required) */ @JsonProperty("exporter") - @Nonnull + @Nullable private SpanExporterModel exporter; /** (Required) */ @@ -37,40 +35,26 @@ public SimpleSpanProcessorModel withExporter(SpanExporterModel exporter) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SimpleSpanProcessorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("exporter"); - sb.append('='); - sb.append(((this.exporter == null) ? "" : this.exporter)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SimpleSpanProcessorModel{" + "exporter=" + exporter + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.exporter == null) ? 0 : this.exporter.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SimpleSpanProcessorModel) == false) { - return false; + if (o instanceof SimpleSpanProcessorModel) { + SimpleSpanProcessorModel that = (SimpleSpanProcessorModel) o; + return (this.exporter == null ? that.exporter == null : this.exporter.equals(that.exporter)); } - SimpleSpanProcessorModel rhs = ((SimpleSpanProcessorModel) other); - return ((this.exporter == rhs.exporter) - || ((this.exporter != null) && this.exporter.equals(rhs.exporter))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterModel.java index 079694ccccd..ca23d4ce6f3 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterModel.java @@ -19,27 +19,22 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"otlp_http", "otlp_grpc", "otlp_file/development", "console"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SpanExporterModel { - /** (Can be null) */ - @Nullable @JsonProperty("otlp_http") + @Nullable private OtlpHttpExporterModel otlpHttp; - /** (Can be null) */ - @Nullable @JsonProperty("otlp_grpc") + @Nullable private OtlpGrpcExporterModel otlpGrpc; - /** (Can be null) */ - @Nullable @JsonProperty("otlp_file/development") + @Nullable private ExperimentalOtlpFileExporterModel otlpFileDevelopment; - /** (Can be null) */ - @Nullable @JsonProperty("console") + @Nullable private ConsoleExporterModel console; @JsonIgnore @@ -108,74 +103,53 @@ public SpanExporterModel withAdditionalProperty(String name, SpanExporterPropert @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SpanExporterModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("otlpHttp"); - sb.append('='); - sb.append(((this.otlpHttp == null) ? "" : this.otlpHttp)); - sb.append(','); - sb.append("otlpGrpc"); - sb.append('='); - sb.append(((this.otlpGrpc == null) ? "" : this.otlpGrpc)); - sb.append(','); - sb.append("otlpFileDevelopment"); - sb.append('='); - sb.append(((this.otlpFileDevelopment == null) ? "" : this.otlpFileDevelopment)); - sb.append(','); - sb.append("console"); - sb.append('='); - sb.append(((this.console == null) ? "" : this.console)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SpanExporterModel{" + + "otlpHttp=" + + otlpHttp + + ", otlpGrpc=" + + otlpGrpc + + ", otlpFileDevelopment=" + + otlpFileDevelopment + + ", console=" + + console + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.console == null) ? 0 : this.console.hashCode())); - result = - ((result * 31) - + ((this.otlpFileDevelopment == null) ? 0 : this.otlpFileDevelopment.hashCode())); - result = ((result * 31) + ((this.otlpGrpc == null) ? 0 : this.otlpGrpc.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - result = ((result * 31) + ((this.otlpHttp == null) ? 0 : this.otlpHttp.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.otlpHttp == null) ? 0 : this.otlpHttp.hashCode(); + h *= 1000003; + h ^= (this.otlpGrpc == null) ? 0 : this.otlpGrpc.hashCode(); + h *= 1000003; + h ^= (this.otlpFileDevelopment == null) ? 0 : this.otlpFileDevelopment.hashCode(); + h *= 1000003; + h ^= (this.console == null) ? 0 : this.console.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SpanExporterModel) == false) { - return false; + if (o instanceof SpanExporterModel) { + SpanExporterModel that = (SpanExporterModel) o; + return (this.otlpHttp == null ? that.otlpHttp == null : this.otlpHttp.equals(that.otlpHttp)) + && (this.otlpGrpc == null ? that.otlpGrpc == null : this.otlpGrpc.equals(that.otlpGrpc)) + && (this.otlpFileDevelopment == null + ? that.otlpFileDevelopment == null + : this.otlpFileDevelopment.equals(that.otlpFileDevelopment)) + && (this.console == null ? that.console == null : this.console.equals(that.console)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - SpanExporterModel rhs = ((SpanExporterModel) other); - return ((((((this.console == rhs.console) - || ((this.console != null) && this.console.equals(rhs.console))) - && ((this.otlpFileDevelopment == rhs.otlpFileDevelopment) - || ((this.otlpFileDevelopment != null) - && this.otlpFileDevelopment.equals(rhs.otlpFileDevelopment)))) - && ((this.otlpGrpc == rhs.otlpGrpc) - || ((this.otlpGrpc != null) && this.otlpGrpc.equals(rhs.otlpGrpc)))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))) - && ((this.otlpHttp == rhs.otlpHttp) - || ((this.otlpHttp != null) && this.otlpHttp.equals(rhs.otlpHttp)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterPropertyModel.java index 7041a635657..7cf133c71ea 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SpanExporterPropertyModel { @JsonIgnore @@ -40,43 +40,28 @@ public SpanExporterPropertyModel withAdditionalProperty(String name, Object valu @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SpanExporterPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SpanExporterPropertyModel{" + "additionalProperties=" + additionalProperties + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SpanExporterPropertyModel) == false) { - return false; + if (o instanceof SpanExporterPropertyModel) { + SpanExporterPropertyModel that = (SpanExporterPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - SpanExporterPropertyModel rhs = ((SpanExporterPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanKind.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanKind.java index 153cbf0f1f9..c05dc9066d0 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanKind.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanKind.java @@ -12,7 +12,6 @@ import javax.annotation.Generated; @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum SpanKind { INTERNAL("internal"), SERVER("server"), diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanLimitsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanLimitsModel.java index 848d6efba40..1d30a7477f9 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanLimitsModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanLimitsModel.java @@ -22,77 +22,62 @@ "link_attribute_count_limit" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SpanLimitsModel { /** * Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. * Value must be non-negative. If omitted or null, there is no limit. - * - *

(Can be null) */ - @Nullable @JsonProperty("attribute_value_length_limit") @JsonPropertyDescription( "Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. \nValue must be non-negative.\nIf omitted or null, there is no limit.\n") + @Nullable private Integer attributeValueLengthLimit; /** * Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. Value must be * non-negative. If omitted or null, 128 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("attribute_count_limit") @JsonPropertyDescription( "Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + @Nullable private Integer attributeCountLimit; /** * Configure max span event count. Value must be non-negative. If omitted or null, 128 is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("event_count_limit") @JsonPropertyDescription( "Configure max span event count. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + @Nullable private Integer eventCountLimit; - /** - * Configure max span link count. Value must be non-negative. If omitted or null, 128 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure max span link count. Value must be non-negative. If omitted or null, 128 is used. */ @JsonProperty("link_count_limit") @JsonPropertyDescription( "Configure max span link count. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + @Nullable private Integer linkCountLimit; /** * Configure max attributes per span event. Value must be non-negative. If omitted or null, 128 is * used. - * - *

(Can be null) */ - @Nullable @JsonProperty("event_attribute_count_limit") @JsonPropertyDescription( "Configure max attributes per span event. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + @Nullable private Integer eventAttributeCountLimit; /** * Configure max attributes per span link. Value must be non-negative. If omitted or null, 128 is * used. - * - *

(Can be null) */ - @Nullable @JsonProperty("link_attribute_count_limit") @JsonPropertyDescription( "Configure max attributes per span link. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + @Nullable private Integer linkAttributeCountLimit; /** @@ -183,100 +168,66 @@ public SpanLimitsModel withLinkAttributeCountLimit(Integer linkAttributeCountLim @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SpanLimitsModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("attributeValueLengthLimit"); - sb.append('='); - sb.append( - ((this.attributeValueLengthLimit == null) ? "" : this.attributeValueLengthLimit)); - sb.append(','); - sb.append("attributeCountLimit"); - sb.append('='); - sb.append(((this.attributeCountLimit == null) ? "" : this.attributeCountLimit)); - sb.append(','); - sb.append("eventCountLimit"); - sb.append('='); - sb.append(((this.eventCountLimit == null) ? "" : this.eventCountLimit)); - sb.append(','); - sb.append("linkCountLimit"); - sb.append('='); - sb.append(((this.linkCountLimit == null) ? "" : this.linkCountLimit)); - sb.append(','); - sb.append("eventAttributeCountLimit"); - sb.append('='); - sb.append(((this.eventAttributeCountLimit == null) ? "" : this.eventAttributeCountLimit)); - sb.append(','); - sb.append("linkAttributeCountLimit"); - sb.append('='); - sb.append(((this.linkAttributeCountLimit == null) ? "" : this.linkAttributeCountLimit)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SpanLimitsModel{" + + "attributeValueLengthLimit=" + + attributeValueLengthLimit + + ", attributeCountLimit=" + + attributeCountLimit + + ", eventCountLimit=" + + eventCountLimit + + ", linkCountLimit=" + + linkCountLimit + + ", eventAttributeCountLimit=" + + eventAttributeCountLimit + + ", linkAttributeCountLimit=" + + linkAttributeCountLimit + + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.linkAttributeCountLimit == null) - ? 0 - : this.linkAttributeCountLimit.hashCode())); - result = - ((result * 31) - + ((this.eventAttributeCountLimit == null) - ? 0 - : this.eventAttributeCountLimit.hashCode())); - result = - ((result * 31) - + ((this.attributeValueLengthLimit == null) - ? 0 - : this.attributeValueLengthLimit.hashCode())); - result = - ((result * 31) - + ((this.attributeCountLimit == null) ? 0 : this.attributeCountLimit.hashCode())); - result = ((result * 31) + ((this.linkCountLimit == null) ? 0 : this.linkCountLimit.hashCode())); - result = - ((result * 31) + ((this.eventCountLimit == null) ? 0 : this.eventCountLimit.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.attributeValueLengthLimit == null) ? 0 : this.attributeValueLengthLimit.hashCode(); + h *= 1000003; + h ^= (this.attributeCountLimit == null) ? 0 : this.attributeCountLimit.hashCode(); + h *= 1000003; + h ^= (this.eventCountLimit == null) ? 0 : this.eventCountLimit.hashCode(); + h *= 1000003; + h ^= (this.linkCountLimit == null) ? 0 : this.linkCountLimit.hashCode(); + h *= 1000003; + h ^= (this.eventAttributeCountLimit == null) ? 0 : this.eventAttributeCountLimit.hashCode(); + h *= 1000003; + h ^= (this.linkAttributeCountLimit == null) ? 0 : this.linkAttributeCountLimit.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SpanLimitsModel) == false) { - return false; + if (o instanceof SpanLimitsModel) { + SpanLimitsModel that = (SpanLimitsModel) o; + return (this.attributeValueLengthLimit == null + ? that.attributeValueLengthLimit == null + : this.attributeValueLengthLimit.equals(that.attributeValueLengthLimit)) + && (this.attributeCountLimit == null + ? that.attributeCountLimit == null + : this.attributeCountLimit.equals(that.attributeCountLimit)) + && (this.eventCountLimit == null + ? that.eventCountLimit == null + : this.eventCountLimit.equals(that.eventCountLimit)) + && (this.linkCountLimit == null + ? that.linkCountLimit == null + : this.linkCountLimit.equals(that.linkCountLimit)) + && (this.eventAttributeCountLimit == null + ? that.eventAttributeCountLimit == null + : this.eventAttributeCountLimit.equals(that.eventAttributeCountLimit)) + && (this.linkAttributeCountLimit == null + ? that.linkAttributeCountLimit == null + : this.linkAttributeCountLimit.equals(that.linkAttributeCountLimit)); } - SpanLimitsModel rhs = ((SpanLimitsModel) other); - return (((((((this.linkAttributeCountLimit == rhs.linkAttributeCountLimit) - || ((this.linkAttributeCountLimit != null) - && this.linkAttributeCountLimit.equals( - rhs.linkAttributeCountLimit))) - && ((this.eventAttributeCountLimit == rhs.eventAttributeCountLimit) - || ((this.eventAttributeCountLimit != null) - && this.eventAttributeCountLimit.equals( - rhs.eventAttributeCountLimit)))) - && ((this.attributeValueLengthLimit == rhs.attributeValueLengthLimit) - || ((this.attributeValueLengthLimit != null) - && this.attributeValueLengthLimit.equals( - rhs.attributeValueLengthLimit)))) - && ((this.attributeCountLimit == rhs.attributeCountLimit) - || ((this.attributeCountLimit != null) - && this.attributeCountLimit.equals(rhs.attributeCountLimit)))) - && ((this.linkCountLimit == rhs.linkCountLimit) - || ((this.linkCountLimit != null) - && this.linkCountLimit.equals(rhs.linkCountLimit)))) - && ((this.eventCountLimit == rhs.eventCountLimit) - || ((this.eventCountLimit != null) - && this.eventCountLimit.equals(rhs.eventCountLimit)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorModel.java index 2b41a5bf052..a2e36a729a9 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorModel.java @@ -19,15 +19,14 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"batch", "simple"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SpanProcessorModel { - @Nullable @JsonProperty("batch") + @Nullable private BatchSpanProcessorModel batch; - @Nullable @JsonProperty("simple") + @Nullable private SimpleSpanProcessorModel simple; @JsonIgnore @@ -73,56 +72,41 @@ public SpanProcessorModel withAdditionalProperty(String name, SpanProcessorPrope @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SpanProcessorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("batch"); - sb.append('='); - sb.append(((this.batch == null) ? "" : this.batch)); - sb.append(','); - sb.append("simple"); - sb.append('='); - sb.append(((this.simple == null) ? "" : this.simple)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SpanProcessorModel{" + + "batch=" + + batch + + ", simple=" + + simple + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.batch == null) ? 0 : this.batch.hashCode())); - result = ((result * 31) + ((this.simple == null) ? 0 : this.simple.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.batch == null) ? 0 : this.batch.hashCode(); + h *= 1000003; + h ^= (this.simple == null) ? 0 : this.simple.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SpanProcessorModel) == false) { - return false; + if (o instanceof SpanProcessorModel) { + SpanProcessorModel that = (SpanProcessorModel) o; + return (this.batch == null ? that.batch == null : this.batch.equals(that.batch)) + && (this.simple == null ? that.simple == null : this.simple.equals(that.simple)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - SpanProcessorModel rhs = ((SpanProcessorModel) other); - return ((((this.batch == rhs.batch) || ((this.batch != null) && this.batch.equals(rhs.batch))) - && ((this.simple == rhs.simple) - || ((this.simple != null) && this.simple.equals(rhs.simple)))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorPropertyModel.java index 3d30832f452..027c4e965f7 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SpanProcessorPropertyModel { @JsonIgnore @@ -40,43 +40,28 @@ public SpanProcessorPropertyModel withAdditionalProperty(String name, Object val @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SpanProcessorPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SpanProcessorPropertyModel{" + "additionalProperties=" + additionalProperties + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SpanProcessorPropertyModel) == false) { - return false; + if (o instanceof SpanProcessorPropertyModel) { + SpanProcessorPropertyModel that = (SpanProcessorPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - SpanProcessorPropertyModel rhs = ((SpanProcessorPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SumAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SumAggregationModel.java index 5725de39f09..2f4d918ccb0 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SumAggregationModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SumAggregationModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class SumAggregationModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SumAggregationModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "SumAggregationModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof SumAggregationModel) == false) { - return false; + if (o instanceof SumAggregationModel) { + SumAggregationModel that = (SumAggregationModel) o; + return true; } - SumAggregationModel rhs = ((SumAggregationModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorModel.java index ae0d540e0f3..1423db0f940 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorModel.java @@ -19,27 +19,22 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"tracecontext", "baggage", "b3", "b3multi"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class TextMapPropagatorModel { - /** (Can be null) */ - @Nullable @JsonProperty("tracecontext") + @Nullable private TraceContextPropagatorModel tracecontext; - /** (Can be null) */ - @Nullable @JsonProperty("baggage") + @Nullable private BaggagePropagatorModel baggage; - /** (Can be null) */ - @Nullable @JsonProperty("b3") + @Nullable private B3PropagatorModel b3; - /** (Can be null) */ - @Nullable @JsonProperty("b3multi") + @Nullable private B3MultiPropagatorModel b3multi; @JsonIgnore @@ -108,70 +103,53 @@ public TextMapPropagatorModel withAdditionalProperty( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(TextMapPropagatorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("tracecontext"); - sb.append('='); - sb.append(((this.tracecontext == null) ? "" : this.tracecontext)); - sb.append(','); - sb.append("baggage"); - sb.append('='); - sb.append(((this.baggage == null) ? "" : this.baggage)); - sb.append(','); - sb.append("b3"); - sb.append('='); - sb.append(((this.b3 == null) ? "" : this.b3)); - sb.append(','); - sb.append("b3multi"); - sb.append('='); - sb.append(((this.b3multi == null) ? "" : this.b3multi)); - sb.append(','); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "TextMapPropagatorModel{" + + "tracecontext=" + + tracecontext + + ", baggage=" + + baggage + + ", b3=" + + b3 + + ", b3multi=" + + b3multi + + ", additionalProperties=" + + additionalProperties + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.b3multi == null) ? 0 : this.b3multi.hashCode())); - result = ((result * 31) + ((this.b3 == null) ? 0 : this.b3.hashCode())); - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - result = ((result * 31) + ((this.baggage == null) ? 0 : this.baggage.hashCode())); - result = ((result * 31) + ((this.tracecontext == null) ? 0 : this.tracecontext.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.tracecontext == null) ? 0 : this.tracecontext.hashCode(); + h *= 1000003; + h ^= (this.baggage == null) ? 0 : this.baggage.hashCode(); + h *= 1000003; + h ^= (this.b3 == null) ? 0 : this.b3.hashCode(); + h *= 1000003; + h ^= (this.b3multi == null) ? 0 : this.b3multi.hashCode(); + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof TextMapPropagatorModel) == false) { - return false; + if (o instanceof TextMapPropagatorModel) { + TextMapPropagatorModel that = (TextMapPropagatorModel) o; + return (this.tracecontext == null + ? that.tracecontext == null + : this.tracecontext.equals(that.tracecontext)) + && (this.baggage == null ? that.baggage == null : this.baggage.equals(that.baggage)) + && (this.b3 == null ? that.b3 == null : this.b3.equals(that.b3)) + && (this.b3multi == null ? that.b3multi == null : this.b3multi.equals(that.b3multi)) + && (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - TextMapPropagatorModel rhs = ((TextMapPropagatorModel) other); - return ((((((this.b3multi == rhs.b3multi) - || ((this.b3multi != null) && this.b3multi.equals(rhs.b3multi))) - && ((this.b3 == rhs.b3) || ((this.b3 != null) && this.b3.equals(rhs.b3)))) - && ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties)))) - && ((this.baggage == rhs.baggage) - || ((this.baggage != null) && this.baggage.equals(rhs.baggage)))) - && ((this.tracecontext == rhs.tracecontext) - || ((this.tracecontext != null) && this.tracecontext.equals(rhs.tracecontext)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorPropertyModel.java index 857b9637db2..19b5c236838 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorPropertyModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorPropertyModel.java @@ -13,11 +13,11 @@ import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class TextMapPropagatorPropertyModel { @JsonIgnore @@ -40,43 +40,28 @@ public TextMapPropagatorPropertyModel withAdditionalProperty(String name, Object @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(TextMapPropagatorPropertyModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("additionalProperties"); - sb.append('='); - sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "TextMapPropagatorPropertyModel{" + "additionalProperties=" + additionalProperties + "}"; } @Override public int hashCode() { - int result = 1; - result = - ((result * 31) - + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof TextMapPropagatorPropertyModel) == false) { - return false; + if (o instanceof TextMapPropagatorPropertyModel) { + TextMapPropagatorPropertyModel that = (TextMapPropagatorPropertyModel) o; + return (this.additionalProperties == null + ? that.additionalProperties == null + : this.additionalProperties.equals(that.additionalProperties)); } - TextMapPropagatorPropertyModel rhs = ((TextMapPropagatorPropertyModel) other); - return ((this.additionalProperties == rhs.additionalProperties) - || ((this.additionalProperties != null) - && this.additionalProperties.equals(rhs.additionalProperties))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceContextPropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceContextPropagatorModel.java index 3826aec67bd..0d1790e7027 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceContextPropagatorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceContextPropagatorModel.java @@ -8,43 +8,33 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; +import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class TraceContextPropagatorModel { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(TraceContextPropagatorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "TraceContextPropagatorModel{" + "}"; } @Override public int hashCode() { - int result = 1; - return result; + int h = 1; + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof TraceContextPropagatorModel) == false) { - return false; + if (o instanceof TraceContextPropagatorModel) { + TraceContextPropagatorModel that = (TraceContextPropagatorModel) o; + return true; } - TraceContextPropagatorModel rhs = ((TraceContextPropagatorModel) other); - return true; + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceIdRatioBasedSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceIdRatioBasedSamplerModel.java index 886bbb2e45d..bf7f376204b 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceIdRatioBasedSamplerModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceIdRatioBasedSamplerModel.java @@ -15,17 +15,12 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"ratio"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class TraceIdRatioBasedSamplerModel { - /** - * Configure trace_id_ratio. If omitted or null, 1.0 is used. - * - *

(Can be null) - */ - @Nullable + /** Configure trace_id_ratio. If omitted or null, 1.0 is used. */ @JsonProperty("ratio") @JsonPropertyDescription("Configure trace_id_ratio.\nIf omitted or null, 1.0 is used.\n") + @Nullable private Double ratio; /** Configure trace_id_ratio. If omitted or null, 1.0 is used. */ @@ -42,39 +37,26 @@ public TraceIdRatioBasedSamplerModel withRatio(Double ratio) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(TraceIdRatioBasedSamplerModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("ratio"); - sb.append('='); - sb.append(((this.ratio == null) ? "" : this.ratio)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "TraceIdRatioBasedSamplerModel{" + "ratio=" + ratio + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.ratio == null) ? 0 : this.ratio.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.ratio == null) ? 0 : this.ratio.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof TraceIdRatioBasedSamplerModel) == false) { - return false; + if (o instanceof TraceIdRatioBasedSamplerModel) { + TraceIdRatioBasedSamplerModel that = (TraceIdRatioBasedSamplerModel) o; + return (this.ratio == null ? that.ratio == null : this.ratio.equals(that.ratio)); } - TraceIdRatioBasedSamplerModel rhs = ((TraceIdRatioBasedSamplerModel) other); - return ((this.ratio == rhs.ratio) || ((this.ratio != null) && this.ratio.equals(rhs.ratio))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TracerProviderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TracerProviderModel.java index 05cbdc5c90f..9f0cd030bcc 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TracerProviderModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TracerProviderModel.java @@ -11,7 +11,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.List; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @@ -23,7 +22,6 @@ "tracer_configurator/development" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class TracerProviderModel { /** @@ -34,27 +32,23 @@ public class TracerProviderModel { @JsonProperty("processors") @JsonPropertyDescription( "Configure span processors.\nProperty is required and must be non-null.\n") - @Nonnull + @Nullable private List processors; - /** (Can be null) */ - @Nullable @JsonProperty("limits") + @Nullable private SpanLimitsModel limits; - /** (Can be null) */ - @Nullable @JsonProperty("sampler") + @Nullable private SamplerModel sampler; - /** (Can be null) */ - @Nullable @JsonProperty("id_generator") + @Nullable private IdGeneratorModel idGenerator; - /** (Can be null) */ - @Nullable @JsonProperty("tracer_configurator/development") + @Nullable private ExperimentalTracerConfiguratorModel tracerConfiguratorDevelopment; /** @@ -120,77 +114,58 @@ public TracerProviderModel withTracerConfiguratorDevelopment( @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(TracerProviderModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("processors"); - sb.append('='); - sb.append(((this.processors == null) ? "" : this.processors)); - sb.append(','); - sb.append("limits"); - sb.append('='); - sb.append(((this.limits == null) ? "" : this.limits)); - sb.append(','); - sb.append("sampler"); - sb.append('='); - sb.append(((this.sampler == null) ? "" : this.sampler)); - sb.append(','); - sb.append("idGenerator"); - sb.append('='); - sb.append(((this.idGenerator == null) ? "" : this.idGenerator)); - sb.append(','); - sb.append("tracerConfiguratorDevelopment"); - sb.append('='); - sb.append( - ((this.tracerConfiguratorDevelopment == null) - ? "" - : this.tracerConfiguratorDevelopment)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "TracerProviderModel{" + + "processors=" + + processors + + ", limits=" + + limits + + ", sampler=" + + sampler + + ", idGenerator=" + + idGenerator + + ", tracerConfiguratorDevelopment=" + + tracerConfiguratorDevelopment + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.idGenerator == null) ? 0 : this.idGenerator.hashCode())); - result = - ((result * 31) - + ((this.tracerConfiguratorDevelopment == null) - ? 0 - : this.tracerConfiguratorDevelopment.hashCode())); - result = ((result * 31) + ((this.processors == null) ? 0 : this.processors.hashCode())); - result = ((result * 31) + ((this.limits == null) ? 0 : this.limits.hashCode())); - result = ((result * 31) + ((this.sampler == null) ? 0 : this.sampler.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.processors == null) ? 0 : this.processors.hashCode(); + h *= 1000003; + h ^= (this.limits == null) ? 0 : this.limits.hashCode(); + h *= 1000003; + h ^= (this.sampler == null) ? 0 : this.sampler.hashCode(); + h *= 1000003; + h ^= (this.idGenerator == null) ? 0 : this.idGenerator.hashCode(); + h *= 1000003; + h ^= + (this.tracerConfiguratorDevelopment == null) + ? 0 + : this.tracerConfiguratorDevelopment.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof TracerProviderModel) == false) { - return false; + if (o instanceof TracerProviderModel) { + TracerProviderModel that = (TracerProviderModel) o; + return (this.processors == null + ? that.processors == null + : this.processors.equals(that.processors)) + && (this.limits == null ? that.limits == null : this.limits.equals(that.limits)) + && (this.sampler == null ? that.sampler == null : this.sampler.equals(that.sampler)) + && (this.idGenerator == null + ? that.idGenerator == null + : this.idGenerator.equals(that.idGenerator)) + && (this.tracerConfiguratorDevelopment == null + ? that.tracerConfiguratorDevelopment == null + : this.tracerConfiguratorDevelopment.equals(that.tracerConfiguratorDevelopment)); } - TracerProviderModel rhs = ((TracerProviderModel) other); - return ((((((this.idGenerator == rhs.idGenerator) - || ((this.idGenerator != null) && this.idGenerator.equals(rhs.idGenerator))) - && ((this.tracerConfiguratorDevelopment == rhs.tracerConfiguratorDevelopment) - || ((this.tracerConfiguratorDevelopment != null) - && this.tracerConfiguratorDevelopment.equals( - rhs.tracerConfiguratorDevelopment)))) - && ((this.processors == rhs.processors) - || ((this.processors != null) && this.processors.equals(rhs.processors)))) - && ((this.limits == rhs.limits) - || ((this.limits != null) && this.limits.equals(rhs.limits)))) - && ((this.sampler == rhs.sampler) - || ((this.sampler != null) && this.sampler.equals(rhs.sampler)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewModel.java index 6f8c0f29c0b..7f4721a789e 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewModel.java @@ -9,23 +9,21 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"selector", "stream"}) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ViewModel { /** (Required) */ @JsonProperty("selector") - @Nonnull + @Nullable private ViewSelectorModel selector; /** (Required) */ @JsonProperty("stream") - @Nonnull + @Nullable private ViewStreamModel stream; /** (Required) */ @@ -54,47 +52,29 @@ public ViewModel withStream(ViewStreamModel stream) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ViewModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("selector"); - sb.append('='); - sb.append(((this.selector == null) ? "" : this.selector)); - sb.append(','); - sb.append("stream"); - sb.append('='); - sb.append(((this.stream == null) ? "" : this.stream)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ViewModel{" + "selector=" + selector + ", stream=" + stream + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.stream == null) ? 0 : this.stream.hashCode())); - result = ((result * 31) + ((this.selector == null) ? 0 : this.selector.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.selector == null) ? 0 : this.selector.hashCode(); + h *= 1000003; + h ^= (this.stream == null) ? 0 : this.stream.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ViewModel) == false) { - return false; + if (o instanceof ViewModel) { + ViewModel that = (ViewModel) o; + return (this.selector == null ? that.selector == null : this.selector.equals(that.selector)) + && (this.stream == null ? that.stream == null : this.stream.equals(that.stream)); } - ViewModel rhs = ((ViewModel) other); - return (((this.stream == rhs.stream) - || ((this.stream != null) && this.stream.equals(rhs.stream))) - && ((this.selector == rhs.selector) - || ((this.selector != null) && this.selector.equals(rhs.selector)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewSelectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewSelectorModel.java index df859d3aa1b..080bb0cdc83 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewSelectorModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewSelectorModel.java @@ -26,68 +26,52 @@ "meter_schema_url" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ViewSelectorModel { /** * Configure instrument name selection criteria. If omitted or null, all instrument names match. - * - *

(Can be null) */ - @Nullable @JsonProperty("instrument_name") @JsonPropertyDescription( "Configure instrument name selection criteria.\nIf omitted or null, all instrument names match.\n") + @Nullable private String instrumentName; - /** (Can be null) */ - @Nullable @JsonProperty("instrument_type") + @Nullable private ViewSelectorModel.InstrumentType instrumentType; /** * Configure the instrument unit selection criteria. If omitted or null, all instrument units * match. - * - *

(Can be null) */ - @Nullable @JsonProperty("unit") @JsonPropertyDescription( "Configure the instrument unit selection criteria.\nIf omitted or null, all instrument units match.\n") + @Nullable private String unit; - /** - * Configure meter name selection criteria. If omitted or null, all meter names match. - * - *

(Can be null) - */ - @Nullable + /** Configure meter name selection criteria. If omitted or null, all meter names match. */ @JsonProperty("meter_name") @JsonPropertyDescription( "Configure meter name selection criteria.\nIf omitted or null, all meter names match.\n") + @Nullable private String meterName; - /** - * Configure meter version selection criteria. If omitted or null, all meter versions match. - * - *

(Can be null) - */ - @Nullable + /** Configure meter version selection criteria. If omitted or null, all meter versions match. */ @JsonProperty("meter_version") @JsonPropertyDescription( "Configure meter version selection criteria.\nIf omitted or null, all meter versions match.\n") + @Nullable private String meterVersion; /** * Configure meter schema url selection criteria. If omitted or null, all meter schema URLs match. - * - *

(Can be null) */ - @Nullable @JsonProperty("meter_schema_url") @JsonPropertyDescription( "Configure meter schema url selection criteria.\nIf omitted or null, all meter schema URLs match.\n") + @Nullable private String meterSchemaUrl; /** @@ -170,83 +154,68 @@ public ViewSelectorModel withMeterSchemaUrl(String meterSchemaUrl) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ViewSelectorModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("instrumentName"); - sb.append('='); - sb.append(((this.instrumentName == null) ? "" : this.instrumentName)); - sb.append(','); - sb.append("instrumentType"); - sb.append('='); - sb.append(((this.instrumentType == null) ? "" : this.instrumentType)); - sb.append(','); - sb.append("unit"); - sb.append('='); - sb.append(((this.unit == null) ? "" : this.unit)); - sb.append(','); - sb.append("meterName"); - sb.append('='); - sb.append(((this.meterName == null) ? "" : this.meterName)); - sb.append(','); - sb.append("meterVersion"); - sb.append('='); - sb.append(((this.meterVersion == null) ? "" : this.meterVersion)); - sb.append(','); - sb.append("meterSchemaUrl"); - sb.append('='); - sb.append(((this.meterSchemaUrl == null) ? "" : this.meterSchemaUrl)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ViewSelectorModel{" + + "instrumentName=" + + instrumentName + + ", instrumentType=" + + instrumentType + + ", unit=" + + unit + + ", meterName=" + + meterName + + ", meterVersion=" + + meterVersion + + ", meterSchemaUrl=" + + meterSchemaUrl + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.instrumentName == null) ? 0 : this.instrumentName.hashCode())); - result = ((result * 31) + ((this.instrumentType == null) ? 0 : this.instrumentType.hashCode())); - result = ((result * 31) + ((this.unit == null) ? 0 : this.unit.hashCode())); - result = ((result * 31) + ((this.meterSchemaUrl == null) ? 0 : this.meterSchemaUrl.hashCode())); - result = ((result * 31) + ((this.meterName == null) ? 0 : this.meterName.hashCode())); - result = ((result * 31) + ((this.meterVersion == null) ? 0 : this.meterVersion.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.instrumentName == null) ? 0 : this.instrumentName.hashCode(); + h *= 1000003; + h ^= (this.instrumentType == null) ? 0 : this.instrumentType.hashCode(); + h *= 1000003; + h ^= (this.unit == null) ? 0 : this.unit.hashCode(); + h *= 1000003; + h ^= (this.meterName == null) ? 0 : this.meterName.hashCode(); + h *= 1000003; + h ^= (this.meterVersion == null) ? 0 : this.meterVersion.hashCode(); + h *= 1000003; + h ^= (this.meterSchemaUrl == null) ? 0 : this.meterSchemaUrl.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ViewSelectorModel) == false) { - return false; + if (o instanceof ViewSelectorModel) { + ViewSelectorModel that = (ViewSelectorModel) o; + return (this.instrumentName == null + ? that.instrumentName == null + : this.instrumentName.equals(that.instrumentName)) + && (this.instrumentType == null + ? that.instrumentType == null + : this.instrumentType.equals(that.instrumentType)) + && (this.unit == null ? that.unit == null : this.unit.equals(that.unit)) + && (this.meterName == null + ? that.meterName == null + : this.meterName.equals(that.meterName)) + && (this.meterVersion == null + ? that.meterVersion == null + : this.meterVersion.equals(that.meterVersion)) + && (this.meterSchemaUrl == null + ? that.meterSchemaUrl == null + : this.meterSchemaUrl.equals(that.meterSchemaUrl)); } - ViewSelectorModel rhs = ((ViewSelectorModel) other); - return (((((((this.instrumentName == rhs.instrumentName) - || ((this.instrumentName != null) - && this.instrumentName.equals(rhs.instrumentName))) - && ((this.instrumentType == rhs.instrumentType) - || ((this.instrumentType != null) - && this.instrumentType.equals(rhs.instrumentType)))) - && ((this.unit == rhs.unit) - || ((this.unit != null) && this.unit.equals(rhs.unit)))) - && ((this.meterSchemaUrl == rhs.meterSchemaUrl) - || ((this.meterSchemaUrl != null) - && this.meterSchemaUrl.equals(rhs.meterSchemaUrl)))) - && ((this.meterName == rhs.meterName) - || ((this.meterName != null) && this.meterName.equals(rhs.meterName)))) - && ((this.meterVersion == rhs.meterVersion) - || ((this.meterVersion != null) && this.meterVersion.equals(rhs.meterVersion)))); + return false; } @Generated("jsonschema2pojo") - @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public enum InstrumentType { COUNTER("counter"), GAUGE("gauge"), diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewStreamModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewStreamModel.java index e172e91450d..334fe9b08f7 100644 --- a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewStreamModel.java +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewStreamModel.java @@ -21,53 +21,44 @@ "attribute_keys" }) @Generated("jsonschema2pojo") -@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) public class ViewStreamModel { /** * Configure metric name of the resulting stream(s). If omitted or null, the instrument's original * name is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("name") @JsonPropertyDescription( "Configure metric name of the resulting stream(s).\nIf omitted or null, the instrument's original name is used.\n") + @Nullable private String name; /** * Configure metric description of the resulting stream(s). If omitted or null, the instrument's * origin description is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("description") @JsonPropertyDescription( "Configure metric description of the resulting stream(s).\nIf omitted or null, the instrument's origin description is used.\n") + @Nullable private String description; - /** (Can be null) */ - @Nullable @JsonProperty("aggregation") + @Nullable private AggregationModel aggregation; /** * Configure the aggregation cardinality limit. If omitted or null, the metric reader's default * cardinality limit is used. - * - *

(Can be null) */ - @Nullable @JsonProperty("aggregation_cardinality_limit") @JsonPropertyDescription( "Configure the aggregation cardinality limit.\nIf omitted or null, the metric reader's default cardinality limit is used.\n") + @Nullable private Integer aggregationCardinalityLimit; - /** (Can be null) */ - @Nullable @JsonProperty("attribute_keys") + @Nullable private IncludeExcludeModel attributeKeys; /** @@ -139,74 +130,60 @@ public ViewStreamModel withAttributeKeys(IncludeExcludeModel attributeKeys) { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ViewStreamModel.class.getName()) - .append('@') - .append(Integer.toHexString(System.identityHashCode(this))) - .append('['); - sb.append("name"); - sb.append('='); - sb.append(((this.name == null) ? "" : this.name)); - sb.append(','); - sb.append("description"); - sb.append('='); - sb.append(((this.description == null) ? "" : this.description)); - sb.append(','); - sb.append("aggregation"); - sb.append('='); - sb.append(((this.aggregation == null) ? "" : this.aggregation)); - sb.append(','); - sb.append("aggregationCardinalityLimit"); - sb.append('='); - sb.append( - ((this.aggregationCardinalityLimit == null) ? "" : this.aggregationCardinalityLimit)); - sb.append(','); - sb.append("attributeKeys"); - sb.append('='); - sb.append(((this.attributeKeys == null) ? "" : this.attributeKeys)); - sb.append(','); - if (sb.charAt((sb.length() - 1)) == ',') { - sb.setCharAt((sb.length() - 1), ']'); - } else { - sb.append(']'); - } - return sb.toString(); + return "ViewStreamModel{" + + "name=" + + name + + ", description=" + + description + + ", aggregation=" + + aggregation + + ", aggregationCardinalityLimit=" + + aggregationCardinalityLimit + + ", attributeKeys=" + + attributeKeys + + "}"; } @Override public int hashCode() { - int result = 1; - result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); - result = ((result * 31) + ((this.description == null) ? 0 : this.description.hashCode())); - result = ((result * 31) + ((this.aggregation == null) ? 0 : this.aggregation.hashCode())); - result = ((result * 31) + ((this.attributeKeys == null) ? 0 : this.attributeKeys.hashCode())); - result = - ((result * 31) - + ((this.aggregationCardinalityLimit == null) - ? 0 - : this.aggregationCardinalityLimit.hashCode())); - return result; + int h = 1; + h *= 1000003; + h ^= (this.name == null) ? 0 : this.name.hashCode(); + h *= 1000003; + h ^= (this.description == null) ? 0 : this.description.hashCode(); + h *= 1000003; + h ^= (this.aggregation == null) ? 0 : this.aggregation.hashCode(); + h *= 1000003; + h ^= + (this.aggregationCardinalityLimit == null) + ? 0 + : this.aggregationCardinalityLimit.hashCode(); + h *= 1000003; + h ^= (this.attributeKeys == null) ? 0 : this.attributeKeys.hashCode(); + return h; } @Override - public boolean equals(Object other) { - if (other == this) { + public boolean equals(@Nullable Object o) { + if (o == this) { return true; } - if ((other instanceof ViewStreamModel) == false) { - return false; + if (o instanceof ViewStreamModel) { + ViewStreamModel that = (ViewStreamModel) o; + return (this.name == null ? that.name == null : this.name.equals(that.name)) + && (this.description == null + ? that.description == null + : this.description.equals(that.description)) + && (this.aggregation == null + ? that.aggregation == null + : this.aggregation.equals(that.aggregation)) + && (this.aggregationCardinalityLimit == null + ? that.aggregationCardinalityLimit == null + : this.aggregationCardinalityLimit.equals(that.aggregationCardinalityLimit)) + && (this.attributeKeys == null + ? that.attributeKeys == null + : this.attributeKeys.equals(that.attributeKeys)); } - ViewStreamModel rhs = ((ViewStreamModel) other); - return ((((((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) - && ((this.description == rhs.description) - || ((this.description != null) - && this.description.equals(rhs.description)))) - && ((this.aggregation == rhs.aggregation) - || ((this.aggregation != null) && this.aggregation.equals(rhs.aggregation)))) - && ((this.attributeKeys == rhs.attributeKeys) - || ((this.attributeKeys != null) && this.attributeKeys.equals(rhs.attributeKeys)))) - && ((this.aggregationCardinalityLimit == rhs.aggregationCardinalityLimit) - || ((this.aggregationCardinalityLimit != null) - && this.aggregationCardinalityLimit.equals(rhs.aggregationCardinalityLimit)))); + return false; } } diff --git a/sdk-extensions/declarative-config/src/test/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ModelEqualsHashCodeTest.java b/sdk-extensions/declarative-config/src/test/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ModelEqualsHashCodeTest.java new file mode 100644 index 00000000000..0455f6a00d6 --- /dev/null +++ b/sdk-extensions/declarative-config/src/test/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ModelEqualsHashCodeTest.java @@ -0,0 +1,72 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.google.common.reflect.ClassPath; +import java.io.IOException; +import java.util.Comparator; +import java.util.stream.Stream; +import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +/** + * Verifies the {@code equals}/{@code hashCode} contract for every generated model POJO. The models + * and their {@code equals}/{@code hashCode} implementations are generated (see {@code + * io.opentelemetry.gradle.js2p.OtelObjectRule}), so this test guards the generator output rather + * than any hand-written code. + */ +class ModelEqualsHashCodeTest { + + private static final String MODEL_PACKAGE = + "io.opentelemetry.sdk.autoconfigure.declarativeconfig.model"; + + @ParameterizedTest + @MethodSource("modelClasses") + void equalsHashCode(Class modelClass) { + EqualsVerifier.forClass(modelClass) + // Generated POJOs are mutable (non-final fields) and non-final with an instanceof-based + // equals, neither of which EqualsVerifier accepts by default. + .suppress(Warning.NONFINAL_FIELDS, Warning.STRICT_INHERITANCE) + // Several models hold "oneOf" sub-models that are empty (e.g. ConsoleExporterModel), whose + // equals is instanceof-only. EqualsVerifier can't produce two unequal instances of such a + // type, so it can't prove the enclosing field is significant. The full equals/hashCode + // contract is still verified. + .suppress(Warning.ALL_FIELDS_SHOULD_BE_USED) + // Break the self-referential sampler graphs (e.g. parent-based and jaeger-remote samplers + // contain a nested SamplerModel; composable parent-threshold samplers contain a root + // sampler). Prefab values only need to be unequal to each other. + .withPrefabValues( + SamplerModel.class, + new SamplerModel(), + new SamplerModel().withAlwaysOn(new AlwaysOnSamplerModel())) + .withPrefabValues( + ExperimentalComposableSamplerModel.class, + new ExperimentalComposableSamplerModel(), + new ExperimentalComposableSamplerModel() + .withAlwaysOff(new ExperimentalComposableAlwaysOffSamplerModel())) + .withPrefabValues( + ExperimentalComposableParentThresholdSamplerModel.class, + new ExperimentalComposableParentThresholdSamplerModel(), + new ExperimentalComposableParentThresholdSamplerModel() + .withRoot(new ExperimentalComposableSamplerModel())) + .verify(); + } + + static Stream modelClasses() throws IOException { + return ClassPath.from(ModelEqualsHashCodeTest.class.getClassLoader()) + .getTopLevelClasses(MODEL_PACKAGE) + .stream() + .map(ClassPath.ClassInfo::load) + // The "Model" suffix (jsonschema2pojo classNameSuffix) selects the generated POJOs and + // excludes generated enums and this test class, which share the package. + .filter(clazz -> clazz.getSimpleName().endsWith("Model")) + .sorted(Comparator.comparing(Class::getSimpleName)) + .map(clazz -> Arguments.argumentSet(clazz.getSimpleName(), clazz)); + } +}