Class: DatadogAPIClient::V1::DowntimeRecurrence
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::DowntimeRecurrence
- Defined in:
- lib/datadog_api_client/v1/models/downtime_recurrence.rb
Overview
An object defining the recurrence of the downtime.
Instance Attribute Summary collapse
-
#period ⇒ Object
How often to repeat as an integer.
-
#rrule ⇒ Object
The ‘RRULE` standard for defining recurring events (**requires to set "type" to rrule**) For example, to have a recurring event on the first day of each month, set the type to `rrule` and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`.
-
#type ⇒ Object
The type of recurrence.
-
#until_date ⇒ Object
The date at which the recurrence should end as a POSIX timestamp.
-
#until_occurrences ⇒ Object
How many times the downtime is rescheduled.
-
#week_days ⇒ Object
A list of week days to repeat on.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ DowntimeRecurrence
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ DowntimeRecurrence
Initializes the object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/datadog_api_client/v1/models/downtime_recurrence.rb', line 88 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DowntimeRecurrence` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DowntimeRecurrence`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'period') self.period = attributes[:'period'] end if attributes.key?(:'rrule') self.rrule = attributes[:'rrule'] end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'until_date') self.until_date = attributes[:'until_date'] end if attributes.key?(:'until_occurrences') self.until_occurrences = attributes[:'until_occurrences'] end if attributes.key?(:'week_days') if (value = attributes[:'week_days']).is_a?(Array) self.week_days = value end end end |
Instance Attribute Details
#period ⇒ Object
How often to repeat as an integer. For example, to repeat every 3 days, select a type of ‘days` and a period of `3`.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/downtime_recurrence.rb', line 27 def period @period end |
#rrule ⇒ Object
The ‘RRULE` standard for defining recurring events (**requires to set "type" to rrule**) For example, to have a recurring event on the first day of each month, set the type to `rrule` and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`. Most common `rrule` options from the [iCalendar Spec](tools.ietf.org/html/rfc5545) are supported. Note: Attributes specifying the duration in `RRULE` are not supported (for example, `DTSTART`, `DTEND`, `DURATION`). More examples available in this [downtime guide](docs.datadoghq.com/monitors/guide/suppress-alert-with-downtimes/?tab=api)
30 31 32 |
# File 'lib/datadog_api_client/v1/models/downtime_recurrence.rb', line 30 def rrule @rrule end |
#type ⇒ Object
The type of recurrence. Choose from ‘days`, `weeks`, `months`, `years`, `rrule`.
33 34 35 |
# File 'lib/datadog_api_client/v1/models/downtime_recurrence.rb', line 33 def type @type end |
#until_date ⇒ Object
The date at which the recurrence should end as a POSIX timestamp. ‘until_occurences` and `until_date` are mutually exclusive.
36 37 38 |
# File 'lib/datadog_api_client/v1/models/downtime_recurrence.rb', line 36 def until_date @until_date end |
#until_occurrences ⇒ Object
How many times the downtime is rescheduled. ‘until_occurences` and `until_date` are mutually exclusive.
39 40 41 |
# File 'lib/datadog_api_client/v1/models/downtime_recurrence.rb', line 39 def until_occurrences @until_occurrences end |
#week_days ⇒ Object
A list of week days to repeat on. Choose from ‘Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat` or `Sun`. Only applicable when type is weeks. First letter must be capitalized.
42 43 44 |
# File 'lib/datadog_api_client/v1/models/downtime_recurrence.rb', line 42 def week_days @week_days end |