|
| 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 | +/** |
| 20 | + * Defines how the <code>datadog_logs</code> destination routes matching logs to a Datadog site |
| 21 | + * using a specific API key. |
| 22 | + */ |
| 23 | +@JsonPropertyOrder({ |
| 24 | + ObservabilityPipelineDatadogLogsDestinationRoute.JSON_PROPERTY_API_KEY_KEY, |
| 25 | + ObservabilityPipelineDatadogLogsDestinationRoute.JSON_PROPERTY_INCLUDE, |
| 26 | + ObservabilityPipelineDatadogLogsDestinationRoute.JSON_PROPERTY_ROUTE_ID, |
| 27 | + ObservabilityPipelineDatadogLogsDestinationRoute.JSON_PROPERTY_SITE |
| 28 | +}) |
| 29 | +@jakarta.annotation.Generated( |
| 30 | + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") |
| 31 | +public class ObservabilityPipelineDatadogLogsDestinationRoute { |
| 32 | + @JsonIgnore public boolean unparsed = false; |
| 33 | + public static final String JSON_PROPERTY_API_KEY_KEY = "api_key_key"; |
| 34 | + private String apiKeyKey; |
| 35 | + |
| 36 | + public static final String JSON_PROPERTY_INCLUDE = "include"; |
| 37 | + private String include; |
| 38 | + |
| 39 | + public static final String JSON_PROPERTY_ROUTE_ID = "route_id"; |
| 40 | + private String routeId; |
| 41 | + |
| 42 | + public static final String JSON_PROPERTY_SITE = "site"; |
| 43 | + private String site; |
| 44 | + |
| 45 | + public ObservabilityPipelineDatadogLogsDestinationRoute apiKeyKey(String apiKeyKey) { |
| 46 | + this.apiKeyKey = apiKeyKey; |
| 47 | + return this; |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * Name of the environment variable or secret that stores the Datadog API key used by this route. |
| 52 | + * |
| 53 | + * @return apiKeyKey |
| 54 | + */ |
| 55 | + @jakarta.annotation.Nullable |
| 56 | + @JsonProperty(JSON_PROPERTY_API_KEY_KEY) |
| 57 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 58 | + public String getApiKeyKey() { |
| 59 | + return apiKeyKey; |
| 60 | + } |
| 61 | + |
| 62 | + public void setApiKeyKey(String apiKeyKey) { |
| 63 | + this.apiKeyKey = apiKeyKey; |
| 64 | + } |
| 65 | + |
| 66 | + public ObservabilityPipelineDatadogLogsDestinationRoute include(String include) { |
| 67 | + this.include = include; |
| 68 | + return this; |
| 69 | + } |
| 70 | + |
| 71 | + /** |
| 72 | + * A Datadog search query that determines which logs are forwarded using this route. |
| 73 | + * |
| 74 | + * @return include |
| 75 | + */ |
| 76 | + @jakarta.annotation.Nullable |
| 77 | + @JsonProperty(JSON_PROPERTY_INCLUDE) |
| 78 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 79 | + public String getInclude() { |
| 80 | + return include; |
| 81 | + } |
| 82 | + |
| 83 | + public void setInclude(String include) { |
| 84 | + this.include = include; |
| 85 | + } |
| 86 | + |
| 87 | + public ObservabilityPipelineDatadogLogsDestinationRoute routeId(String routeId) { |
| 88 | + this.routeId = routeId; |
| 89 | + return this; |
| 90 | + } |
| 91 | + |
| 92 | + /** |
| 93 | + * Unique identifier for this route within the destination. |
| 94 | + * |
| 95 | + * @return routeId |
| 96 | + */ |
| 97 | + @jakarta.annotation.Nullable |
| 98 | + @JsonProperty(JSON_PROPERTY_ROUTE_ID) |
| 99 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 100 | + public String getRouteId() { |
| 101 | + return routeId; |
| 102 | + } |
| 103 | + |
| 104 | + public void setRouteId(String routeId) { |
| 105 | + this.routeId = routeId; |
| 106 | + } |
| 107 | + |
| 108 | + public ObservabilityPipelineDatadogLogsDestinationRoute site(String site) { |
| 109 | + this.site = site; |
| 110 | + return this; |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * Datadog site where matching logs are sent (for example, <code>us1</code>). |
| 115 | + * |
| 116 | + * @return site |
| 117 | + */ |
| 118 | + @jakarta.annotation.Nullable |
| 119 | + @JsonProperty(JSON_PROPERTY_SITE) |
| 120 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 121 | + public String getSite() { |
| 122 | + return site; |
| 123 | + } |
| 124 | + |
| 125 | + public void setSite(String site) { |
| 126 | + this.site = site; |
| 127 | + } |
| 128 | + |
| 129 | + /** |
| 130 | + * A container for additional, undeclared properties. This is a holder for any undeclared |
| 131 | + * properties as specified with the 'additionalProperties' keyword in the OAS document. |
| 132 | + */ |
| 133 | + private Map<String, Object> additionalProperties; |
| 134 | + |
| 135 | + /** |
| 136 | + * Set the additional (undeclared) property with the specified name and value. If the property |
| 137 | + * does not already exist, create it otherwise replace it. |
| 138 | + * |
| 139 | + * @param key The arbitrary key to set |
| 140 | + * @param value The associated value |
| 141 | + * @return ObservabilityPipelineDatadogLogsDestinationRoute |
| 142 | + */ |
| 143 | + @JsonAnySetter |
| 144 | + public ObservabilityPipelineDatadogLogsDestinationRoute putAdditionalProperty( |
| 145 | + String key, Object value) { |
| 146 | + if (this.additionalProperties == null) { |
| 147 | + this.additionalProperties = new HashMap<String, Object>(); |
| 148 | + } |
| 149 | + this.additionalProperties.put(key, value); |
| 150 | + return this; |
| 151 | + } |
| 152 | + |
| 153 | + /** |
| 154 | + * Return the additional (undeclared) property. |
| 155 | + * |
| 156 | + * @return The additional properties |
| 157 | + */ |
| 158 | + @JsonAnyGetter |
| 159 | + public Map<String, Object> getAdditionalProperties() { |
| 160 | + return additionalProperties; |
| 161 | + } |
| 162 | + |
| 163 | + /** |
| 164 | + * Return the additional (undeclared) property with the specified name. |
| 165 | + * |
| 166 | + * @param key The arbitrary key to get |
| 167 | + * @return The specific additional property for the given key |
| 168 | + */ |
| 169 | + public Object getAdditionalProperty(String key) { |
| 170 | + if (this.additionalProperties == null) { |
| 171 | + return null; |
| 172 | + } |
| 173 | + return this.additionalProperties.get(key); |
| 174 | + } |
| 175 | + |
| 176 | + /** Return true if this ObservabilityPipelineDatadogLogsDestinationRoute object is equal to o. */ |
| 177 | + @Override |
| 178 | + public boolean equals(Object o) { |
| 179 | + if (this == o) { |
| 180 | + return true; |
| 181 | + } |
| 182 | + if (o == null || getClass() != o.getClass()) { |
| 183 | + return false; |
| 184 | + } |
| 185 | + ObservabilityPipelineDatadogLogsDestinationRoute |
| 186 | + observabilityPipelineDatadogLogsDestinationRoute = |
| 187 | + (ObservabilityPipelineDatadogLogsDestinationRoute) o; |
| 188 | + return Objects.equals( |
| 189 | + this.apiKeyKey, observabilityPipelineDatadogLogsDestinationRoute.apiKeyKey) |
| 190 | + && Objects.equals(this.include, observabilityPipelineDatadogLogsDestinationRoute.include) |
| 191 | + && Objects.equals(this.routeId, observabilityPipelineDatadogLogsDestinationRoute.routeId) |
| 192 | + && Objects.equals(this.site, observabilityPipelineDatadogLogsDestinationRoute.site) |
| 193 | + && Objects.equals( |
| 194 | + this.additionalProperties, |
| 195 | + observabilityPipelineDatadogLogsDestinationRoute.additionalProperties); |
| 196 | + } |
| 197 | + |
| 198 | + @Override |
| 199 | + public int hashCode() { |
| 200 | + return Objects.hash(apiKeyKey, include, routeId, site, additionalProperties); |
| 201 | + } |
| 202 | + |
| 203 | + @Override |
| 204 | + public String toString() { |
| 205 | + StringBuilder sb = new StringBuilder(); |
| 206 | + sb.append("class ObservabilityPipelineDatadogLogsDestinationRoute {\n"); |
| 207 | + sb.append(" apiKeyKey: ").append(toIndentedString(apiKeyKey)).append("\n"); |
| 208 | + sb.append(" include: ").append(toIndentedString(include)).append("\n"); |
| 209 | + sb.append(" routeId: ").append(toIndentedString(routeId)).append("\n"); |
| 210 | + sb.append(" site: ").append(toIndentedString(site)).append("\n"); |
| 211 | + sb.append(" additionalProperties: ") |
| 212 | + .append(toIndentedString(additionalProperties)) |
| 213 | + .append("\n"); |
| 214 | + sb.append('}'); |
| 215 | + return sb.toString(); |
| 216 | + } |
| 217 | + |
| 218 | + /** |
| 219 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 220 | + */ |
| 221 | + private String toIndentedString(Object o) { |
| 222 | + if (o == null) { |
| 223 | + return "null"; |
| 224 | + } |
| 225 | + return o.toString().replace("\n", "\n "); |
| 226 | + } |
| 227 | +} |
0 commit comments