|
| 1 | +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost |
| 2 | +// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. |
| 3 | + |
| 4 | +package com.algolia.model.composition; |
| 5 | + |
| 6 | +import com.fasterxml.jackson.annotation.*; |
| 7 | +import com.fasterxml.jackson.databind.annotation.*; |
| 8 | +import java.util.HashMap; |
| 9 | +import java.util.Map; |
| 10 | +import java.util.Objects; |
| 11 | + |
| 12 | +/** An object that contains the extra key-value pairs provided in the injectedItem definition. */ |
| 13 | +public class HitMetadata { |
| 14 | + |
| 15 | + @JsonProperty("_injectedItemKey") |
| 16 | + private String injectedItemKey; |
| 17 | + |
| 18 | + private Map<String, Object> additionalProperties = new HashMap<>(); |
| 19 | + |
| 20 | + @JsonAnyGetter |
| 21 | + public Map<String, Object> getAdditionalProperties() { |
| 22 | + return this.additionalProperties; |
| 23 | + } |
| 24 | + |
| 25 | + @JsonAnySetter |
| 26 | + public HitMetadata setAdditionalProperty(String name, Object value) { |
| 27 | + this.additionalProperties.put(name, value); |
| 28 | + return this; |
| 29 | + } |
| 30 | + |
| 31 | + public HitMetadata setInjectedItemKey(String injectedItemKey) { |
| 32 | + this.injectedItemKey = injectedItemKey; |
| 33 | + return this; |
| 34 | + } |
| 35 | + |
| 36 | + /** The key of the injectedItem that inserted this metadata. */ |
| 37 | + @javax.annotation.Nullable |
| 38 | + public String getInjectedItemKey() { |
| 39 | + return injectedItemKey; |
| 40 | + } |
| 41 | + |
| 42 | + @Override |
| 43 | + public boolean equals(Object o) { |
| 44 | + if (this == o) { |
| 45 | + return true; |
| 46 | + } |
| 47 | + if (o == null || getClass() != o.getClass()) { |
| 48 | + return false; |
| 49 | + } |
| 50 | + HitMetadata hitMetadata = (HitMetadata) o; |
| 51 | + return Objects.equals(this.injectedItemKey, hitMetadata.injectedItemKey) && super.equals(o); |
| 52 | + } |
| 53 | + |
| 54 | + @Override |
| 55 | + public int hashCode() { |
| 56 | + return Objects.hash(injectedItemKey, super.hashCode()); |
| 57 | + } |
| 58 | + |
| 59 | + @Override |
| 60 | + public String toString() { |
| 61 | + StringBuilder sb = new StringBuilder(); |
| 62 | + sb.append("class HitMetadata {\n"); |
| 63 | + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); |
| 64 | + sb.append(" injectedItemKey: ").append(toIndentedString(injectedItemKey)).append("\n"); |
| 65 | + sb.append("}"); |
| 66 | + return sb.toString(); |
| 67 | + } |
| 68 | + |
| 69 | + /** |
| 70 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 71 | + */ |
| 72 | + private String toIndentedString(Object o) { |
| 73 | + if (o == null) { |
| 74 | + return "null"; |
| 75 | + } |
| 76 | + return o.toString().replace("\n", "\n "); |
| 77 | + } |
| 78 | +} |
0 commit comments