|
| 1 | +/* |
| 2 | + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. |
| 3 | + * This product includes software developed at Datadog (https://www.datadoghq.com/). |
| 4 | + * Copyright 2019-Present Datadog, Inc. |
| 5 | + */ |
| 6 | + |
| 7 | +package com.datadog.api.client.v2.model; |
| 8 | + |
| 9 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; |
| 10 | +import com.fasterxml.jackson.annotation.JsonAnySetter; |
| 11 | +import com.fasterxml.jackson.annotation.JsonIgnore; |
| 12 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 13 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 14 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| 15 | +import java.util.HashMap; |
| 16 | +import java.util.Map; |
| 17 | +import java.util.Objects; |
| 18 | + |
| 19 | +/** Configuration options for writing to OpenSearch Data Streams instead of a fixed index. */ |
| 20 | +@JsonPropertyOrder({ |
| 21 | + ObservabilityPipelineOpenSearchDestinationDataStream.JSON_PROPERTY_DATASET, |
| 22 | + ObservabilityPipelineOpenSearchDestinationDataStream.JSON_PROPERTY_DTYPE, |
| 23 | + ObservabilityPipelineOpenSearchDestinationDataStream.JSON_PROPERTY_NAMESPACE |
| 24 | +}) |
| 25 | +@jakarta.annotation.Generated( |
| 26 | + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") |
| 27 | +public class ObservabilityPipelineOpenSearchDestinationDataStream { |
| 28 | + @JsonIgnore public boolean unparsed = false; |
| 29 | + public static final String JSON_PROPERTY_DATASET = "dataset"; |
| 30 | + private String dataset; |
| 31 | + |
| 32 | + public static final String JSON_PROPERTY_DTYPE = "dtype"; |
| 33 | + private String dtype; |
| 34 | + |
| 35 | + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; |
| 36 | + private String namespace; |
| 37 | + |
| 38 | + public ObservabilityPipelineOpenSearchDestinationDataStream dataset(String dataset) { |
| 39 | + this.dataset = dataset; |
| 40 | + return this; |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * The data stream dataset for your logs. This groups logs by their source or application. |
| 45 | + * |
| 46 | + * @return dataset |
| 47 | + */ |
| 48 | + @jakarta.annotation.Nullable |
| 49 | + @JsonProperty(JSON_PROPERTY_DATASET) |
| 50 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 51 | + public String getDataset() { |
| 52 | + return dataset; |
| 53 | + } |
| 54 | + |
| 55 | + public void setDataset(String dataset) { |
| 56 | + this.dataset = dataset; |
| 57 | + } |
| 58 | + |
| 59 | + public ObservabilityPipelineOpenSearchDestinationDataStream dtype(String dtype) { |
| 60 | + this.dtype = dtype; |
| 61 | + return this; |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * The data stream type for your logs. This determines how logs are categorized within the data |
| 66 | + * stream. |
| 67 | + * |
| 68 | + * @return dtype |
| 69 | + */ |
| 70 | + @jakarta.annotation.Nullable |
| 71 | + @JsonProperty(JSON_PROPERTY_DTYPE) |
| 72 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 73 | + public String getDtype() { |
| 74 | + return dtype; |
| 75 | + } |
| 76 | + |
| 77 | + public void setDtype(String dtype) { |
| 78 | + this.dtype = dtype; |
| 79 | + } |
| 80 | + |
| 81 | + public ObservabilityPipelineOpenSearchDestinationDataStream namespace(String namespace) { |
| 82 | + this.namespace = namespace; |
| 83 | + return this; |
| 84 | + } |
| 85 | + |
| 86 | + /** |
| 87 | + * The data stream namespace for your logs. This separates logs into different environments or |
| 88 | + * domains. |
| 89 | + * |
| 90 | + * @return namespace |
| 91 | + */ |
| 92 | + @jakarta.annotation.Nullable |
| 93 | + @JsonProperty(JSON_PROPERTY_NAMESPACE) |
| 94 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 95 | + public String getNamespace() { |
| 96 | + return namespace; |
| 97 | + } |
| 98 | + |
| 99 | + public void setNamespace(String namespace) { |
| 100 | + this.namespace = namespace; |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * A container for additional, undeclared properties. This is a holder for any undeclared |
| 105 | + * properties as specified with the 'additionalProperties' keyword in the OAS document. |
| 106 | + */ |
| 107 | + private Map<String, Object> additionalProperties; |
| 108 | + |
| 109 | + /** |
| 110 | + * Set the additional (undeclared) property with the specified name and value. If the property |
| 111 | + * does not already exist, create it otherwise replace it. |
| 112 | + * |
| 113 | + * @param key The arbitrary key to set |
| 114 | + * @param value The associated value |
| 115 | + * @return ObservabilityPipelineOpenSearchDestinationDataStream |
| 116 | + */ |
| 117 | + @JsonAnySetter |
| 118 | + public ObservabilityPipelineOpenSearchDestinationDataStream putAdditionalProperty( |
| 119 | + String key, Object value) { |
| 120 | + if (this.additionalProperties == null) { |
| 121 | + this.additionalProperties = new HashMap<String, Object>(); |
| 122 | + } |
| 123 | + this.additionalProperties.put(key, value); |
| 124 | + return this; |
| 125 | + } |
| 126 | + |
| 127 | + /** |
| 128 | + * Return the additional (undeclared) property. |
| 129 | + * |
| 130 | + * @return The additional properties |
| 131 | + */ |
| 132 | + @JsonAnyGetter |
| 133 | + public Map<String, Object> getAdditionalProperties() { |
| 134 | + return additionalProperties; |
| 135 | + } |
| 136 | + |
| 137 | + /** |
| 138 | + * Return the additional (undeclared) property with the specified name. |
| 139 | + * |
| 140 | + * @param key The arbitrary key to get |
| 141 | + * @return The specific additional property for the given key |
| 142 | + */ |
| 143 | + public Object getAdditionalProperty(String key) { |
| 144 | + if (this.additionalProperties == null) { |
| 145 | + return null; |
| 146 | + } |
| 147 | + return this.additionalProperties.get(key); |
| 148 | + } |
| 149 | + |
| 150 | + /** |
| 151 | + * Return true if this ObservabilityPipelineOpenSearchDestinationDataStream object is equal to o. |
| 152 | + */ |
| 153 | + @Override |
| 154 | + public boolean equals(Object o) { |
| 155 | + if (this == o) { |
| 156 | + return true; |
| 157 | + } |
| 158 | + if (o == null || getClass() != o.getClass()) { |
| 159 | + return false; |
| 160 | + } |
| 161 | + ObservabilityPipelineOpenSearchDestinationDataStream |
| 162 | + observabilityPipelineOpenSearchDestinationDataStream = |
| 163 | + (ObservabilityPipelineOpenSearchDestinationDataStream) o; |
| 164 | + return Objects.equals( |
| 165 | + this.dataset, observabilityPipelineOpenSearchDestinationDataStream.dataset) |
| 166 | + && Objects.equals(this.dtype, observabilityPipelineOpenSearchDestinationDataStream.dtype) |
| 167 | + && Objects.equals( |
| 168 | + this.namespace, observabilityPipelineOpenSearchDestinationDataStream.namespace) |
| 169 | + && Objects.equals( |
| 170 | + this.additionalProperties, |
| 171 | + observabilityPipelineOpenSearchDestinationDataStream.additionalProperties); |
| 172 | + } |
| 173 | + |
| 174 | + @Override |
| 175 | + public int hashCode() { |
| 176 | + return Objects.hash(dataset, dtype, namespace, additionalProperties); |
| 177 | + } |
| 178 | + |
| 179 | + @Override |
| 180 | + public String toString() { |
| 181 | + StringBuilder sb = new StringBuilder(); |
| 182 | + sb.append("class ObservabilityPipelineOpenSearchDestinationDataStream {\n"); |
| 183 | + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); |
| 184 | + sb.append(" dtype: ").append(toIndentedString(dtype)).append("\n"); |
| 185 | + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); |
| 186 | + sb.append(" additionalProperties: ") |
| 187 | + .append(toIndentedString(additionalProperties)) |
| 188 | + .append("\n"); |
| 189 | + sb.append('}'); |
| 190 | + return sb.toString(); |
| 191 | + } |
| 192 | + |
| 193 | + /** |
| 194 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 195 | + */ |
| 196 | + private String toIndentedString(Object o) { |
| 197 | + if (o == null) { |
| 198 | + return "null"; |
| 199 | + } |
| 200 | + return o.toString().replace("\n", "\n "); |
| 201 | + } |
| 202 | +} |
0 commit comments