diff --git a/.apigentools-info b/.apigentools-info index 32c3f1d6d3fb..1a8a70120140 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.4.1.dev2", - "regenerated": "2021-01-29 12:49:08.865785", - "spec_repo_commit": "bc876ff" + "regenerated": "2021-01-29 22:07:43.241718", + "spec_repo_commit": "23b373b" }, "v2": { "apigentools_version": "1.4.1.dev2", - "regenerated": "2021-01-29 12:49:21.065278", - "spec_repo_commit": "bc876ff" + "regenerated": "2021-01-29 22:07:55.474327", + "spec_repo_commit": "23b373b" } } } \ No newline at end of file diff --git a/data/v1/openapi.yaml b/data/v1/openapi.yaml index 94ab5b667033..79a46881e985 100644 --- a/data/v1/openapi.yaml +++ b/data/v1/openapi.yaml @@ -4002,6 +4002,13 @@ components: query: description: The monitor query. type: string + restricted_roles: + description: A list of role identifiers that can be pulled from the Roles + API. Cannot be used with `locked` option. + items: + description: A role UUID. + type: string + type: array state: $ref: '#/components/schemas/MonitorState' tags: @@ -4169,13 +4176,6 @@ components: \ to `false` for sparse metrics,\notherwise some evaluations are skipped.\ \ Default is false." type: boolean - restricted_roles: - description: A list of role identifiers that can be pulled from the Roles - API. Cannot be used with `locked`. - items: - description: A role UUID. - type: string - type: array silenced: additionalProperties: description: ID of the downtime applied to the monitor. diff --git a/docs/v1/Monitor.md b/docs/v1/Monitor.md index 15e5b7d74ab2..5e7cb7220835 100644 --- a/docs/v1/Monitor.md +++ b/docs/v1/Monitor.md @@ -16,6 +16,7 @@ | **overall_state** | [**MonitorOverallStates**](MonitorOverallStates.md) | | [optional] | | **priority** | **Integer** | Integer from 1 (high) to 5 (low) indicating alert severity. | [optional] | | **query** | **String** | The monitor query. | [optional] | +| **restricted_roles** | **Array<String>** | A list of role identifiers that can be pulled from the Roles API. Cannot be used with `locked` option. | [optional] | | **state** | [**MonitorState**](MonitorState.md) | | [optional] | | **tags** | **Array<String>** | Tags associated to your monitor. | [optional] | | **type** | [**MonitorType**](MonitorType.md) | | [optional] | @@ -38,6 +39,7 @@ instance = DatadogAPIClient::V1::Monitor.new( overall_state: null, priority: null, query: null, + restricted_roles: null, state: null, tags: null, type: null diff --git a/docs/v1/MonitorOptions.md b/docs/v1/MonitorOptions.md index 736da6463b42..9d3bf0764716 100644 --- a/docs/v1/MonitorOptions.md +++ b/docs/v1/MonitorOptions.md @@ -19,7 +19,6 @@ | **notify_no_data** | **Boolean** | A Boolean indicating whether this monitor notifies when data stops reporting. | [optional][default to false] | | **renotify_interval** | **Integer** | The number of minutes after the last notification before a monitor re-notifies on the current status. It only re-notifies if it’s not resolved. | [optional] | | **require_full_window** | **Boolean** | A Boolean indicating whether this monitor needs a full window of data before it’s evaluated. We highly recommend you set this to `false` for sparse metrics, otherwise some evaluations are skipped. Default is false. | [optional] | -| **restricted_roles** | **Array<String>** | A list of role identifiers that can be pulled from the Roles API. Cannot be used with `locked`. | [optional] | | **silenced** | **Hash<String, Integer>** | Information about the downtime applied to the monitor. | [optional] | | **synthetics_check_id** | **String** | ID of the corresponding Synthetic check. | [optional] | | **threshold_windows** | [**MonitorThresholdWindowOptions**](MonitorThresholdWindowOptions.md) | | [optional] | @@ -47,7 +46,6 @@ instance = DatadogAPIClient::V1::MonitorOptions.new( notify_no_data: null, renotify_interval: null, require_full_window: null, - restricted_roles: null, silenced: null, synthetics_check_id: null, threshold_windows: null, diff --git a/lib/datadog_api_client/v1/models/monitor.rb b/lib/datadog_api_client/v1/models/monitor.rb index 8ef53a2dafec..caaa9f5a7400 100644 --- a/lib/datadog_api_client/v1/models/monitor.rb +++ b/lib/datadog_api_client/v1/models/monitor.rb @@ -52,6 +52,9 @@ class Monitor # The monitor query. attr_accessor :query + # A list of role identifiers that can be pulled from the Roles API. Cannot be used with `locked` option. + attr_accessor :restricted_roles + attr_accessor :state # Tags associated to your monitor. @@ -74,6 +77,7 @@ def self.attribute_map :'overall_state' => :'overall_state', :'priority' => :'priority', :'query' => :'query', + :'restricted_roles' => :'restricted_roles', :'state' => :'state', :'tags' => :'tags', :'type' => :'type' @@ -100,6 +104,7 @@ def self.openapi_types :'overall_state' => :'MonitorOverallStates', :'priority' => :'Integer', :'query' => :'String', + :'restricted_roles' => :'Array', :'state' => :'MonitorState', :'tags' => :'Array', :'type' => :'MonitorType' @@ -176,6 +181,12 @@ def initialize(attributes = {}) self.query = attributes[:'query'] end + if attributes.key?(:'restricted_roles') + if (value = attributes[:'restricted_roles']).is_a?(Array) + self.restricted_roles = value + end + end + if attributes.key?(:'state') self.state = attributes[:'state'] end @@ -245,6 +256,7 @@ def ==(o) overall_state == o.overall_state && priority == o.priority && query == o.query && + restricted_roles == o.restricted_roles && state == o.state && tags == o.tags && type == o.type @@ -259,7 +271,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created, creator, deleted, id, message, modified, multi, name, options, overall_state, priority, query, state, tags, type].hash + [created, creator, deleted, id, message, modified, multi, name, options, overall_state, priority, query, restricted_roles, state, tags, type].hash end # Builds the object from hash diff --git a/lib/datadog_api_client/v1/models/monitor_options.rb b/lib/datadog_api_client/v1/models/monitor_options.rb index 799f8166b45f..8a26a0455720 100644 --- a/lib/datadog_api_client/v1/models/monitor_options.rb +++ b/lib/datadog_api_client/v1/models/monitor_options.rb @@ -63,9 +63,6 @@ class MonitorOptions # A Boolean indicating whether this monitor needs a full window of data before it’s evaluated. We highly recommend you set this to `false` for sparse metrics, otherwise some evaluations are skipped. Default is false. attr_accessor :require_full_window - # A list of role identifiers that can be pulled from the Roles API. Cannot be used with `locked`. - attr_accessor :restricted_roles - # Information about the downtime applied to the monitor. attr_accessor :silenced @@ -97,7 +94,6 @@ def self.attribute_map :'notify_no_data' => :'notify_no_data', :'renotify_interval' => :'renotify_interval', :'require_full_window' => :'require_full_window', - :'restricted_roles' => :'restricted_roles', :'silenced' => :'silenced', :'synthetics_check_id' => :'synthetics_check_id', :'threshold_windows' => :'threshold_windows', @@ -129,7 +125,6 @@ def self.openapi_types :'notify_no_data' => :'Boolean', :'renotify_interval' => :'Integer', :'require_full_window' => :'Boolean', - :'restricted_roles' => :'Array', :'silenced' => :'Hash', :'synthetics_check_id' => :'String', :'threshold_windows' => :'MonitorThresholdWindowOptions', @@ -243,12 +238,6 @@ def initialize(attributes = {}) self.require_full_window = attributes[:'require_full_window'] end - if attributes.key?(:'restricted_roles') - if (value = attributes[:'restricted_roles']).is_a?(Array) - self.restricted_roles = value - end - end - if attributes.key?(:'silenced') if (value = attributes[:'silenced']).is_a?(Hash) self.silenced = value @@ -329,7 +318,6 @@ def ==(o) notify_no_data == o.notify_no_data && renotify_interval == o.renotify_interval && require_full_window == o.require_full_window && - restricted_roles == o.restricted_roles && silenced == o.silenced && synthetics_check_id == o.synthetics_check_id && threshold_windows == o.threshold_windows && @@ -346,7 +334,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [aggregation, device_ids, enable_logs_sample, escalation_message, evaluation_delay, include_tags, locked, min_failure_duration, min_location_failed, new_host_delay, no_data_timeframe, notify_audit, notify_no_data, renotify_interval, require_full_window, restricted_roles, silenced, synthetics_check_id, threshold_windows, thresholds, timeout_h].hash + [aggregation, device_ids, enable_logs_sample, escalation_message, evaluation_delay, include_tags, locked, min_failure_duration, min_location_failed, new_host_delay, no_data_timeframe, notify_audit, notify_no_data, renotify_interval, require_full_window, silenced, synthetics_check_id, threshold_windows, thresholds, timeout_h].hash end # Builds the object from hash