content: /*
   * Copyright The OpenTelemetry Authors
   * SPDX-License-Identifier: Apache-2.0
   */
  
  package io.opentelemetry.instrumentation.docs.internal;
  
  import java.util.Objects;
  
  /**
   * This class is internal and is hence not for public use. Its APIs are unstable and can change at
   * any time.
   */
  public class TelemetryAttribute {
    private String name;
    private String type;
  
    public TelemetryAttribute() {
      this.name = "";
      this.type = "";
    }
  
    public TelemetryAttribute(String name, String type) {
      this.name = name;
      this.type = type;
    }
  
    public String getName() {
      return name;
    }
  
    public void setName(String name) {
      this.name = name;
    }
  
    public String getType() {
      return type;
    }
  
    public void setType(String type) {
      this.type = type;
    }
  
    // Overriding equals and hashCode to compare TelemetryAttribute objects based on name and type
    // This is important for our deduplication logic in the documentation generation process.
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (!(o instanceof TelemetryAttribute that)) {
        return false;
      }
      return Objects.equals(name, that.name) && Objects.equals(type, that.type);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(name, type);
    }
  }
  