|
| 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 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 7 | + * https://openapi-generator.tech |
| 8 | + * Do not edit the class manually. |
| 9 | + */ |
| 10 | + |
| 11 | + |
| 12 | +package com.datadog.api.v2.client.model; |
| 13 | + |
| 14 | +import java.util.Objects; |
| 15 | +import java.util.Arrays; |
| 16 | +import java.util.Map; |
| 17 | +import java.util.HashMap; |
| 18 | +import com.datadog.api.v2.client.model.SecurityMonitoringFilterAction; |
| 19 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 20 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 21 | +import com.fasterxml.jackson.annotation.JsonCreator; |
| 22 | +import com.fasterxml.jackson.annotation.JsonTypeName; |
| 23 | +import com.fasterxml.jackson.annotation.JsonValue; |
| 24 | +import io.swagger.annotations.ApiModel; |
| 25 | +import io.swagger.annotations.ApiModelProperty; |
| 26 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| 27 | +import com.datadog.api.v2.client.JSON; |
| 28 | + |
| 29 | + |
| 30 | +/** |
| 31 | + * The rule's suppression filter. |
| 32 | + */ |
| 33 | +@ApiModel(description = "The rule's suppression filter.") |
| 34 | +@JsonPropertyOrder({ |
| 35 | + SecurityMonitoringFilter.JSON_PROPERTY_ACTION, |
| 36 | + SecurityMonitoringFilter.JSON_PROPERTY_QUERY |
| 37 | +}) |
| 38 | +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") |
| 39 | +public class SecurityMonitoringFilter { |
| 40 | + public static final String JSON_PROPERTY_ACTION = "action"; |
| 41 | + private SecurityMonitoringFilterAction action; |
| 42 | + |
| 43 | + public static final String JSON_PROPERTY_QUERY = "query"; |
| 44 | + private String query; |
| 45 | + |
| 46 | + |
| 47 | + public SecurityMonitoringFilter action(SecurityMonitoringFilterAction action) { |
| 48 | + this.action = action; |
| 49 | + return this; |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * Get action |
| 54 | + * @return action |
| 55 | + **/ |
| 56 | + @javax.annotation.Nullable |
| 57 | + @ApiModelProperty(value = "") |
| 58 | + @JsonProperty(JSON_PROPERTY_ACTION) |
| 59 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 60 | + |
| 61 | + public SecurityMonitoringFilterAction getAction() { |
| 62 | + return action; |
| 63 | + } |
| 64 | + |
| 65 | + |
| 66 | + public void setAction(SecurityMonitoringFilterAction action) { |
| 67 | + this.action = action; |
| 68 | + } |
| 69 | + |
| 70 | + |
| 71 | + public SecurityMonitoringFilter query(String query) { |
| 72 | + this.query = query; |
| 73 | + return this; |
| 74 | + } |
| 75 | + |
| 76 | + /** |
| 77 | + * Query for selecting logs to apply the filtering action. |
| 78 | + * @return query |
| 79 | + **/ |
| 80 | + @javax.annotation.Nullable |
| 81 | + @ApiModelProperty(value = "Query for selecting logs to apply the filtering action.") |
| 82 | + @JsonProperty(JSON_PROPERTY_QUERY) |
| 83 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 84 | + |
| 85 | + public String getQuery() { |
| 86 | + return query; |
| 87 | + } |
| 88 | + |
| 89 | + |
| 90 | + public void setQuery(String query) { |
| 91 | + this.query = query; |
| 92 | + } |
| 93 | + |
| 94 | + |
| 95 | + /** |
| 96 | + * Return true if this SecurityMonitoringFilter object is equal to o. |
| 97 | + */ |
| 98 | + @Override |
| 99 | + public boolean equals(Object o) { |
| 100 | + if (this == o) { |
| 101 | + return true; |
| 102 | + } |
| 103 | + if (o == null || getClass() != o.getClass()) { |
| 104 | + return false; |
| 105 | + } |
| 106 | + SecurityMonitoringFilter securityMonitoringFilter = (SecurityMonitoringFilter) o; |
| 107 | + return Objects.equals(this.action, securityMonitoringFilter.action) && |
| 108 | + Objects.equals(this.query, securityMonitoringFilter.query); |
| 109 | + } |
| 110 | + |
| 111 | + @Override |
| 112 | + public int hashCode() { |
| 113 | + return Objects.hash(action, query); |
| 114 | + } |
| 115 | + |
| 116 | + |
| 117 | + @Override |
| 118 | + public String toString() { |
| 119 | + StringBuilder sb = new StringBuilder(); |
| 120 | + sb.append("class SecurityMonitoringFilter {\n"); |
| 121 | + sb.append(" action: ").append(toIndentedString(action)).append("\n"); |
| 122 | + sb.append(" query: ").append(toIndentedString(query)).append("\n"); |
| 123 | + sb.append("}"); |
| 124 | + return sb.toString(); |
| 125 | + } |
| 126 | + |
| 127 | + /** |
| 128 | + * Convert the given object to string with each line indented by 4 spaces |
| 129 | + * (except the first line). |
| 130 | + */ |
| 131 | + private String toIndentedString(Object o) { |
| 132 | + if (o == null) { |
| 133 | + return "null"; |
| 134 | + } |
| 135 | + return o.toString().replace("\n", "\n "); |
| 136 | + } |
| 137 | + |
| 138 | +} |
| 139 | + |
0 commit comments