|
| 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 | + * Options for scheduled rules. When this field is present, the rule runs based on the schedule. |
| 21 | + * When absent, it runs real-time on ingested logs. |
| 22 | + */ |
| 23 | +@JsonPropertyOrder({ |
| 24 | + SecurityMonitoringSchedulingOptions.JSON_PROPERTY_RRULE, |
| 25 | + SecurityMonitoringSchedulingOptions.JSON_PROPERTY_START, |
| 26 | + SecurityMonitoringSchedulingOptions.JSON_PROPERTY_TIMEZONE |
| 27 | +}) |
| 28 | +@jakarta.annotation.Generated( |
| 29 | + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") |
| 30 | +public class SecurityMonitoringSchedulingOptions { |
| 31 | + @JsonIgnore public boolean unparsed = false; |
| 32 | + public static final String JSON_PROPERTY_RRULE = "rrule"; |
| 33 | + private String rrule; |
| 34 | + |
| 35 | + public static final String JSON_PROPERTY_START = "start"; |
| 36 | + private String start; |
| 37 | + |
| 38 | + public static final String JSON_PROPERTY_TIMEZONE = "timezone"; |
| 39 | + private String timezone; |
| 40 | + |
| 41 | + public SecurityMonitoringSchedulingOptions rrule(String rrule) { |
| 42 | + this.rrule = rrule; |
| 43 | + return this; |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * Schedule for the rule queries, written in RRULE syntax. See <a |
| 48 | + * href="https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html">RFC</a> for syntax |
| 49 | + * reference. |
| 50 | + * |
| 51 | + * @return rrule |
| 52 | + */ |
| 53 | + @jakarta.annotation.Nullable |
| 54 | + @JsonProperty(JSON_PROPERTY_RRULE) |
| 55 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 56 | + public String getRrule() { |
| 57 | + return rrule; |
| 58 | + } |
| 59 | + |
| 60 | + public void setRrule(String rrule) { |
| 61 | + this.rrule = rrule; |
| 62 | + } |
| 63 | + |
| 64 | + public SecurityMonitoringSchedulingOptions start(String start) { |
| 65 | + this.start = start; |
| 66 | + return this; |
| 67 | + } |
| 68 | + |
| 69 | + /** |
| 70 | + * Start date for the schedule, in ISO 8601 format without timezone. |
| 71 | + * |
| 72 | + * @return start |
| 73 | + */ |
| 74 | + @jakarta.annotation.Nullable |
| 75 | + @JsonProperty(JSON_PROPERTY_START) |
| 76 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 77 | + public String getStart() { |
| 78 | + return start; |
| 79 | + } |
| 80 | + |
| 81 | + public void setStart(String start) { |
| 82 | + this.start = start; |
| 83 | + } |
| 84 | + |
| 85 | + public SecurityMonitoringSchedulingOptions timezone(String timezone) { |
| 86 | + this.timezone = timezone; |
| 87 | + return this; |
| 88 | + } |
| 89 | + |
| 90 | + /** |
| 91 | + * Time zone of the start date, in the <a |
| 92 | + * href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">tz database</a> format. |
| 93 | + * |
| 94 | + * @return timezone |
| 95 | + */ |
| 96 | + @jakarta.annotation.Nullable |
| 97 | + @JsonProperty(JSON_PROPERTY_TIMEZONE) |
| 98 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 99 | + public String getTimezone() { |
| 100 | + return timezone; |
| 101 | + } |
| 102 | + |
| 103 | + public void setTimezone(String timezone) { |
| 104 | + this.timezone = timezone; |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * A container for additional, undeclared properties. This is a holder for any undeclared |
| 109 | + * properties as specified with the 'additionalProperties' keyword in the OAS document. |
| 110 | + */ |
| 111 | + private Map<String, Object> additionalProperties; |
| 112 | + |
| 113 | + /** |
| 114 | + * Set the additional (undeclared) property with the specified name and value. If the property |
| 115 | + * does not already exist, create it otherwise replace it. |
| 116 | + * |
| 117 | + * @param key The arbitrary key to set |
| 118 | + * @param value The associated value |
| 119 | + * @return SecurityMonitoringSchedulingOptions |
| 120 | + */ |
| 121 | + @JsonAnySetter |
| 122 | + public SecurityMonitoringSchedulingOptions putAdditionalProperty(String key, Object value) { |
| 123 | + if (this.additionalProperties == null) { |
| 124 | + this.additionalProperties = new HashMap<String, Object>(); |
| 125 | + } |
| 126 | + this.additionalProperties.put(key, value); |
| 127 | + return this; |
| 128 | + } |
| 129 | + |
| 130 | + /** |
| 131 | + * Return the additional (undeclared) property. |
| 132 | + * |
| 133 | + * @return The additional properties |
| 134 | + */ |
| 135 | + @JsonAnyGetter |
| 136 | + public Map<String, Object> getAdditionalProperties() { |
| 137 | + return additionalProperties; |
| 138 | + } |
| 139 | + |
| 140 | + /** |
| 141 | + * Return the additional (undeclared) property with the specified name. |
| 142 | + * |
| 143 | + * @param key The arbitrary key to get |
| 144 | + * @return The specific additional property for the given key |
| 145 | + */ |
| 146 | + public Object getAdditionalProperty(String key) { |
| 147 | + if (this.additionalProperties == null) { |
| 148 | + return null; |
| 149 | + } |
| 150 | + return this.additionalProperties.get(key); |
| 151 | + } |
| 152 | + |
| 153 | + /** Return true if this SecurityMonitoringSchedulingOptions object is equal to o. */ |
| 154 | + @Override |
| 155 | + public boolean equals(Object o) { |
| 156 | + if (this == o) { |
| 157 | + return true; |
| 158 | + } |
| 159 | + if (o == null || getClass() != o.getClass()) { |
| 160 | + return false; |
| 161 | + } |
| 162 | + SecurityMonitoringSchedulingOptions securityMonitoringSchedulingOptions = |
| 163 | + (SecurityMonitoringSchedulingOptions) o; |
| 164 | + return Objects.equals(this.rrule, securityMonitoringSchedulingOptions.rrule) |
| 165 | + && Objects.equals(this.start, securityMonitoringSchedulingOptions.start) |
| 166 | + && Objects.equals(this.timezone, securityMonitoringSchedulingOptions.timezone) |
| 167 | + && Objects.equals( |
| 168 | + this.additionalProperties, securityMonitoringSchedulingOptions.additionalProperties); |
| 169 | + } |
| 170 | + |
| 171 | + @Override |
| 172 | + public int hashCode() { |
| 173 | + return Objects.hash(rrule, start, timezone, additionalProperties); |
| 174 | + } |
| 175 | + |
| 176 | + @Override |
| 177 | + public String toString() { |
| 178 | + StringBuilder sb = new StringBuilder(); |
| 179 | + sb.append("class SecurityMonitoringSchedulingOptions {\n"); |
| 180 | + sb.append(" rrule: ").append(toIndentedString(rrule)).append("\n"); |
| 181 | + sb.append(" start: ").append(toIndentedString(start)).append("\n"); |
| 182 | + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); |
| 183 | + sb.append(" additionalProperties: ") |
| 184 | + .append(toIndentedString(additionalProperties)) |
| 185 | + .append("\n"); |
| 186 | + sb.append('}'); |
| 187 | + return sb.toString(); |
| 188 | + } |
| 189 | + |
| 190 | + /** |
| 191 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 192 | + */ |
| 193 | + private String toIndentedString(Object o) { |
| 194 | + if (o == null) { |
| 195 | + return "null"; |
| 196 | + } |
| 197 | + return o.toString().replace("\n", "\n "); |
| 198 | + } |
| 199 | +} |
0 commit comments