datadog_api_client 2.57.0 → 2.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.generator/schemas/v1/openapi.yaml +2 -0
- data/.generator/schemas/v2/openapi.yaml +748 -397
- data/CHANGELOG.md +21 -0
- data/examples/v1/monitors/CreateMonitor_1348801712.rb +23 -0
- data/examples/v2/ci-visibility-github-accounts/ListCIAppGitHubAccounts.rb +5 -0
- data/examples/v2/ci-visibility-github-accounts/UpdateCIAppGitHubAccount.rb +20 -0
- data/examples/v2/dora-metrics/PatchDORADeploymentByVersion.rb +24 -0
- data/examples/v2/governance-console/UpdateGovernanceControl.rb +0 -1
- data/examples/v2/status-pages/PatchMaintenanceUpdate.rb +15 -0
- data/lib/datadog_api_client/configuration.rb +1 -3
- data/lib/datadog_api_client/inflector.rb +33 -14
- data/lib/datadog_api_client/v1/models/monitor_type.rb +1 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_git_hub_accounts_api.rb +160 -0
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +73 -0
- data/lib/datadog_api_client/v2/api/status_pages_api.rb +83 -1
- data/lib/datadog_api_client/v2/models/agent_trigger.rb +105 -0
- data/lib/datadog_api_client/v2/models/agent_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_attributes.rb +147 -0
- data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_data.rb → ci_app_git_hub_account_data.rb} +10 -8
- data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_repository.rb +115 -0
- data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_response.rb → ci_app_git_hub_account_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{rum_rate_limit_quota_reached_action.rb → ci_app_git_hub_account_type.rb} +4 -4
- data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_update_request.rb → ci_app_git_hub_account_update_request.rb} +5 -5
- data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_update_request_attributes.rb +159 -0
- data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_update_request_data.rb +146 -0
- data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_update_request_repository.rb +148 -0
- data/lib/datadog_api_client/v2/models/{rum_rate_limit_adaptive_config.rb → ci_app_git_hub_accounts_response.rb} +19 -25
- data/lib/datadog_api_client/v2/models/completion_condition.rb +4 -29
- data/lib/datadog_api_client/v2/models/completion_gate.rb +4 -29
- data/lib/datadog_api_client/v2/models/create_degradation_request.rb +13 -3
- data/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes.rb +1 -11
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_schema.rb +9 -1
- data/lib/datadog_api_client/v2/models/create_upload_request_data_attributes.rb +5 -1
- data/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/datastore_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/degradation_request_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/deployment_gates_fdd_rule_options.rb +13 -1
- data/lib/datadog_api_client/v2/models/deployment_rule_options_faulty_deployment_detection.rb +13 -1
- data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_remediation.rb +63 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_remediation_by_id.rb +119 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_remediation_by_version.rb +119 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_request_attributes.rb +196 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation.rb +15 -5
- data/lib/datadog_api_client/v2/models/dora_deployment_patch_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/error_handler.rb +4 -29
- data/lib/datadog_api_client/v2/models/fleet_agent_info_details_v2.rb +1 -49
- data/lib/datadog_api_client/v2/models/form_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/governance_control_attributes.rb +1 -22
- data/lib/datadog_api_client/v2/models/governance_control_parameter_definition.rb +10 -13
- data/lib/datadog_api_client/v2/models/governance_control_update_attributes.rb +1 -11
- data/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/input_schema_parameters.rb +4 -0
- data/lib/datadog_api_client/v2/models/maintenance_update.rb +105 -0
- data/lib/datadog_api_client/v2/models/maintenance_update_data.rb +164 -0
- data/lib/datadog_api_client/v2/models/maintenance_update_data_attributes.rb +167 -0
- data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_type.rb → maintenance_update_data_attributes_status.rb} +6 -3
- data/lib/datadog_api_client/v2/models/maintenance_update_data_relationships.rb +125 -0
- data/lib/datadog_api_client/v2/models/maintenance_update_data_relationships_maintenance.rb +123 -0
- data/lib/datadog_api_client/v2/models/maintenance_update_data_relationships_maintenance_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_update_attributes.rb → maintenance_update_data_relationships_user.rb} +17 -38
- data/lib/datadog_api_client/v2/models/maintenance_update_data_relationships_user_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/on_call_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/outbound_edge.rb +8 -0
- data/lib/datadog_api_client/v2/models/parameter.rb +4 -0
- data/lib/datadog_api_client/v2/models/patch_degradation_request.rb +13 -3
- data/lib/datadog_api_client/v2/models/patch_maintenance_request_data_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/patch_maintenance_update_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_update_data.rb → patch_maintenance_update_request_data.rb} +9 -21
- data/lib/datadog_api_client/v2/models/patch_maintenance_update_request_data_attributes.rb +105 -0
- data/lib/datadog_api_client/v2/models/{rum_rate_limit_scope_type.rb → patch_maintenance_update_request_data_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/patch_status_page_request_data_attributes.rb +1 -11
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_schema.rb +9 -1
- data/lib/datadog_api_client/v2/models/readiness_gate.rb +4 -29
- data/lib/datadog_api_client/v2/models/retry_strategy.rb +12 -26
- data/lib/datadog_api_client/v2/models/retry_strategy_linear.rb +18 -29
- data/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/spec.rb +1 -1
- data/lib/datadog_api_client/v2/models/step.rb +11 -2
- data/lib/datadog_api_client/v2/models/step_display.rb +2 -1
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_schema.rb +9 -1
- data/lib/datadog_api_client/v2/models/trigger.rb +1 -0
- data/lib/datadog_api_client/v2/models/workflow_data_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/workflow_data_update_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/workflow_list_item_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb +2 -2
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +39 -18
- data/examples/v2/rum-rate-limit/DeleteRumRateLimitConfig.rb +0 -8
- data/examples/v2/rum-rate-limit/GetRumRateLimitConfig.rb +0 -8
- data/examples/v2/rum-rate-limit/UpdateRumRateLimitConfig.rb +0 -28
- data/lib/datadog_api_client/v2/api/rum_rate_limit_api.rb +0 -277
- data/lib/datadog_api_client/v2/models/rum_rate_limit_config_attributes.rb +0 -185
- data/lib/datadog_api_client/v2/models/rum_rate_limit_custom_config.rb +0 -223
- data/lib/datadog_api_client/v2/models/rum_rate_limit_mode.rb +0 -28
- data/lib/datadog_api_client/v2/models/rum_rate_limit_window_type.rb +0 -26
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# Attributes of a maintenance update resource.
|
|
21
|
+
class MaintenanceUpdateDataAttributes
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Components affected at the time of the update.
|
|
25
|
+
attr_accessor :components_affected
|
|
26
|
+
|
|
27
|
+
# The date and time the update was created.
|
|
28
|
+
attr_accessor :created_at
|
|
29
|
+
|
|
30
|
+
# The message body of the update.
|
|
31
|
+
attr_accessor :description
|
|
32
|
+
|
|
33
|
+
# Whether the update was applied manually by a user (true) or automatically by the system (false).
|
|
34
|
+
attr_accessor :manual_transition
|
|
35
|
+
|
|
36
|
+
# The date and time the update was last modified.
|
|
37
|
+
attr_accessor :modified_at
|
|
38
|
+
|
|
39
|
+
# The date and time the update started.
|
|
40
|
+
attr_accessor :started_at
|
|
41
|
+
|
|
42
|
+
# The status of the maintenance update.
|
|
43
|
+
attr_accessor :status
|
|
44
|
+
|
|
45
|
+
attr_accessor :additional_properties
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
# @!visibility private
|
|
49
|
+
def self.attribute_map
|
|
50
|
+
{
|
|
51
|
+
:'components_affected' => :'components_affected',
|
|
52
|
+
:'created_at' => :'created_at',
|
|
53
|
+
:'description' => :'description',
|
|
54
|
+
:'manual_transition' => :'manual_transition',
|
|
55
|
+
:'modified_at' => :'modified_at',
|
|
56
|
+
:'started_at' => :'started_at',
|
|
57
|
+
:'status' => :'status'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
# @!visibility private
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'components_affected' => :'Array<CreateMaintenanceRequestDataAttributesComponentsAffectedItems>',
|
|
66
|
+
:'created_at' => :'Time',
|
|
67
|
+
:'description' => :'String',
|
|
68
|
+
:'manual_transition' => :'Boolean',
|
|
69
|
+
:'modified_at' => :'Time',
|
|
70
|
+
:'started_at' => :'Time',
|
|
71
|
+
:'status' => :'MaintenanceUpdateDataAttributesStatus'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Initializes the object
|
|
76
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
77
|
+
# @!visibility private
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceUpdateDataAttributes` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
self.additional_properties = {}
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
86
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
87
|
+
self.additional_properties[k.to_sym] = v
|
|
88
|
+
else
|
|
89
|
+
h[k.to_sym] = v
|
|
90
|
+
end
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'components_affected')
|
|
94
|
+
if (value = attributes[:'components_affected']).is_a?(Array)
|
|
95
|
+
self.components_affected = value
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'created_at')
|
|
100
|
+
self.created_at = attributes[:'created_at']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'description')
|
|
104
|
+
self.description = attributes[:'description']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'manual_transition')
|
|
108
|
+
self.manual_transition = attributes[:'manual_transition']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'modified_at')
|
|
112
|
+
self.modified_at = attributes[:'modified_at']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'started_at')
|
|
116
|
+
self.started_at = attributes[:'started_at']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'status')
|
|
120
|
+
self.status = attributes[:'status']
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
|
125
|
+
# @return [Hash] Returns the object in the form of hash
|
|
126
|
+
# @!visibility private
|
|
127
|
+
def to_hash
|
|
128
|
+
hash = {}
|
|
129
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
130
|
+
value = self.send(attr)
|
|
131
|
+
if value.nil?
|
|
132
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
133
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
hash[param] = _to_hash(value)
|
|
137
|
+
end
|
|
138
|
+
self.additional_properties.each_pair do |attr, value|
|
|
139
|
+
hash[attr] = value
|
|
140
|
+
end
|
|
141
|
+
hash
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Checks equality by comparing each attribute.
|
|
145
|
+
# @param o [Object] Object to be compared
|
|
146
|
+
# @!visibility private
|
|
147
|
+
def ==(o)
|
|
148
|
+
return true if self.equal?(o)
|
|
149
|
+
self.class == o.class &&
|
|
150
|
+
components_affected == o.components_affected &&
|
|
151
|
+
created_at == o.created_at &&
|
|
152
|
+
description == o.description &&
|
|
153
|
+
manual_transition == o.manual_transition &&
|
|
154
|
+
modified_at == o.modified_at &&
|
|
155
|
+
started_at == o.started_at &&
|
|
156
|
+
status == o.status &&
|
|
157
|
+
additional_properties == o.additional_properties
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Calculates hash code according to all attributes.
|
|
161
|
+
# @return [Integer] Hash code
|
|
162
|
+
# @!visibility private
|
|
163
|
+
def hash
|
|
164
|
+
[components_affected, created_at, description, manual_transition, modified_at, started_at, status, additional_properties].hash
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -17,10 +17,13 @@ require 'date'
|
|
|
17
17
|
require 'time'
|
|
18
18
|
|
|
19
19
|
module DatadogAPIClient::V2
|
|
20
|
-
# The
|
|
21
|
-
class
|
|
20
|
+
# The status of the maintenance update.
|
|
21
|
+
class MaintenanceUpdateDataAttributesStatus
|
|
22
22
|
include BaseEnumModel
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
SCHEDULED = "scheduled".freeze
|
|
25
|
+
IN_PROGRESS = "in_progress".freeze
|
|
26
|
+
COMPLETED = "completed".freeze
|
|
27
|
+
CANCELED = "canceled".freeze
|
|
25
28
|
end
|
|
26
29
|
end
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# Relationships of a maintenance update resource.
|
|
21
|
+
class MaintenanceUpdateDataRelationships
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# A user relationship of a maintenance update.
|
|
25
|
+
attr_accessor :created_by_user
|
|
26
|
+
|
|
27
|
+
# A user relationship of a maintenance update.
|
|
28
|
+
attr_accessor :last_modified_by_user
|
|
29
|
+
|
|
30
|
+
# The parent maintenance of the update.
|
|
31
|
+
attr_accessor :maintenance
|
|
32
|
+
|
|
33
|
+
attr_accessor :additional_properties
|
|
34
|
+
|
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
|
+
# @!visibility private
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'created_by_user' => :'created_by_user',
|
|
40
|
+
:'last_modified_by_user' => :'last_modified_by_user',
|
|
41
|
+
:'maintenance' => :'maintenance'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
# @!visibility private
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'created_by_user' => :'MaintenanceUpdateDataRelationshipsUser',
|
|
50
|
+
:'last_modified_by_user' => :'MaintenanceUpdateDataRelationshipsUser',
|
|
51
|
+
:'maintenance' => :'MaintenanceUpdateDataRelationshipsMaintenance'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
57
|
+
# @!visibility private
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceUpdateDataRelationships` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
self.additional_properties = {}
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
67
|
+
self.additional_properties[k.to_sym] = v
|
|
68
|
+
else
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
end
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'created_by_user')
|
|
74
|
+
self.created_by_user = attributes[:'created_by_user']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'last_modified_by_user')
|
|
78
|
+
self.last_modified_by_user = attributes[:'last_modified_by_user']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'maintenance')
|
|
82
|
+
self.maintenance = attributes[:'maintenance']
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
|
87
|
+
# @return [Hash] Returns the object in the form of hash
|
|
88
|
+
# @!visibility private
|
|
89
|
+
def to_hash
|
|
90
|
+
hash = {}
|
|
91
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
92
|
+
value = self.send(attr)
|
|
93
|
+
if value.nil?
|
|
94
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
95
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
hash[param] = _to_hash(value)
|
|
99
|
+
end
|
|
100
|
+
self.additional_properties.each_pair do |attr, value|
|
|
101
|
+
hash[attr] = value
|
|
102
|
+
end
|
|
103
|
+
hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Checks equality by comparing each attribute.
|
|
107
|
+
# @param o [Object] Object to be compared
|
|
108
|
+
# @!visibility private
|
|
109
|
+
def ==(o)
|
|
110
|
+
return true if self.equal?(o)
|
|
111
|
+
self.class == o.class &&
|
|
112
|
+
created_by_user == o.created_by_user &&
|
|
113
|
+
last_modified_by_user == o.last_modified_by_user &&
|
|
114
|
+
maintenance == o.maintenance &&
|
|
115
|
+
additional_properties == o.additional_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
# @!visibility private
|
|
121
|
+
def hash
|
|
122
|
+
[created_by_user, last_modified_by_user, maintenance, additional_properties].hash
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# The parent maintenance of the update.
|
|
21
|
+
class MaintenanceUpdateDataRelationshipsMaintenance
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# The maintenance linked to a maintenance update.
|
|
25
|
+
attr_reader :data
|
|
26
|
+
|
|
27
|
+
attr_accessor :additional_properties
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
# @!visibility private
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'data' => :'data'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
# @!visibility private
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'data' => :'MaintenanceUpdateDataRelationshipsMaintenanceData'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Initializes the object
|
|
46
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
47
|
+
# @!visibility private
|
|
48
|
+
def initialize(attributes = {})
|
|
49
|
+
if (!attributes.is_a?(Hash))
|
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceUpdateDataRelationshipsMaintenance` initialize method"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
self.additional_properties = {}
|
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
57
|
+
self.additional_properties[k.to_sym] = v
|
|
58
|
+
else
|
|
59
|
+
h[k.to_sym] = v
|
|
60
|
+
end
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if attributes.key?(:'data')
|
|
64
|
+
self.data = attributes[:'data']
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Check to see if the all the properties in the model are valid
|
|
69
|
+
# @return true if the model is valid
|
|
70
|
+
# @!visibility private
|
|
71
|
+
def valid?
|
|
72
|
+
return false if @data.nil?
|
|
73
|
+
true
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Custom attribute writer method with validation
|
|
77
|
+
# @param data [Object] Object to be assigned
|
|
78
|
+
# @!visibility private
|
|
79
|
+
def data=(data)
|
|
80
|
+
if data.nil?
|
|
81
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
|
82
|
+
end
|
|
83
|
+
@data = data
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
|
87
|
+
# @return [Hash] Returns the object in the form of hash
|
|
88
|
+
# @!visibility private
|
|
89
|
+
def to_hash
|
|
90
|
+
hash = {}
|
|
91
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
92
|
+
value = self.send(attr)
|
|
93
|
+
if value.nil?
|
|
94
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
95
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
hash[param] = _to_hash(value)
|
|
99
|
+
end
|
|
100
|
+
self.additional_properties.each_pair do |attr, value|
|
|
101
|
+
hash[attr] = value
|
|
102
|
+
end
|
|
103
|
+
hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Checks equality by comparing each attribute.
|
|
107
|
+
# @param o [Object] Object to be compared
|
|
108
|
+
# @!visibility private
|
|
109
|
+
def ==(o)
|
|
110
|
+
return true if self.equal?(o)
|
|
111
|
+
self.class == o.class &&
|
|
112
|
+
data == o.data &&
|
|
113
|
+
additional_properties == o.additional_properties
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Calculates hash code according to all attributes.
|
|
117
|
+
# @return [Integer] Hash code
|
|
118
|
+
# @!visibility private
|
|
119
|
+
def hash
|
|
120
|
+
[data, additional_properties].hash
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
data/lib/datadog_api_client/v2/models/maintenance_update_data_relationships_maintenance_data.rb
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# The maintenance linked to a maintenance update.
|
|
21
|
+
class MaintenanceUpdateDataRelationshipsMaintenanceData
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# The ID of the maintenance.
|
|
25
|
+
attr_reader :id
|
|
26
|
+
|
|
27
|
+
# Maintenances resource type.
|
|
28
|
+
attr_reader :type
|
|
29
|
+
|
|
30
|
+
attr_accessor :additional_properties
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
# @!visibility private
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'id' => :'id',
|
|
37
|
+
:'type' => :'type'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
# @!visibility private
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'id' => :'UUID',
|
|
46
|
+
:'type' => :'PatchMaintenanceRequestDataType'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
52
|
+
# @!visibility private
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceUpdateDataRelationshipsMaintenanceData` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
self.additional_properties = {}
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
62
|
+
self.additional_properties[k.to_sym] = v
|
|
63
|
+
else
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
end
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'id')
|
|
69
|
+
self.id = attributes[:'id']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'type')
|
|
73
|
+
self.type = attributes[:'type']
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Check to see if the all the properties in the model are valid
|
|
78
|
+
# @return true if the model is valid
|
|
79
|
+
# @!visibility private
|
|
80
|
+
def valid?
|
|
81
|
+
return false if @id.nil?
|
|
82
|
+
return false if @type.nil?
|
|
83
|
+
true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Custom attribute writer method with validation
|
|
87
|
+
# @param id [Object] Object to be assigned
|
|
88
|
+
# @!visibility private
|
|
89
|
+
def id=(id)
|
|
90
|
+
if id.nil?
|
|
91
|
+
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
|
|
92
|
+
end
|
|
93
|
+
@id = id
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Custom attribute writer method with validation
|
|
97
|
+
# @param type [Object] Object to be assigned
|
|
98
|
+
# @!visibility private
|
|
99
|
+
def type=(type)
|
|
100
|
+
if type.nil?
|
|
101
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
|
102
|
+
end
|
|
103
|
+
@type = type
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
|
107
|
+
# @return [Hash] Returns the object in the form of hash
|
|
108
|
+
# @!visibility private
|
|
109
|
+
def to_hash
|
|
110
|
+
hash = {}
|
|
111
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
112
|
+
value = self.send(attr)
|
|
113
|
+
if value.nil?
|
|
114
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
115
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
hash[param] = _to_hash(value)
|
|
119
|
+
end
|
|
120
|
+
self.additional_properties.each_pair do |attr, value|
|
|
121
|
+
hash[attr] = value
|
|
122
|
+
end
|
|
123
|
+
hash
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Checks equality by comparing each attribute.
|
|
127
|
+
# @param o [Object] Object to be compared
|
|
128
|
+
# @!visibility private
|
|
129
|
+
def ==(o)
|
|
130
|
+
return true if self.equal?(o)
|
|
131
|
+
self.class == o.class &&
|
|
132
|
+
id == o.id &&
|
|
133
|
+
type == o.type &&
|
|
134
|
+
additional_properties == o.additional_properties
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Calculates hash code according to all attributes.
|
|
138
|
+
# @return [Integer] Hash code
|
|
139
|
+
# @!visibility private
|
|
140
|
+
def hash
|
|
141
|
+
[id, type, additional_properties].hash
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
@@ -17,19 +17,12 @@ require 'date'
|
|
|
17
17
|
require 'time'
|
|
18
18
|
|
|
19
19
|
module DatadogAPIClient::V2
|
|
20
|
-
#
|
|
21
|
-
class
|
|
20
|
+
# A user relationship of a maintenance update.
|
|
21
|
+
class MaintenanceUpdateDataRelationshipsUser
|
|
22
22
|
include BaseGenericModel
|
|
23
23
|
|
|
24
|
-
# The
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
# The configuration used when `mode` is `custom`.
|
|
28
|
-
attr_accessor :custom
|
|
29
|
-
|
|
30
|
-
# The rate limit mode. `custom` enforces a fixed session limit, while
|
|
31
|
-
# `adaptive` dynamically adjusts retention.
|
|
32
|
-
attr_reader :mode
|
|
24
|
+
# The data object identifying a Datadog user linked to a maintenance update.
|
|
25
|
+
attr_reader :data
|
|
33
26
|
|
|
34
27
|
attr_accessor :additional_properties
|
|
35
28
|
|
|
@@ -37,9 +30,7 @@ module DatadogAPIClient::V2
|
|
|
37
30
|
# @!visibility private
|
|
38
31
|
def self.attribute_map
|
|
39
32
|
{
|
|
40
|
-
:'
|
|
41
|
-
:'custom' => :'custom',
|
|
42
|
-
:'mode' => :'mode'
|
|
33
|
+
:'data' => :'data'
|
|
43
34
|
}
|
|
44
35
|
end
|
|
45
36
|
|
|
@@ -47,9 +38,7 @@ module DatadogAPIClient::V2
|
|
|
47
38
|
# @!visibility private
|
|
48
39
|
def self.openapi_types
|
|
49
40
|
{
|
|
50
|
-
:'
|
|
51
|
-
:'custom' => :'RumRateLimitCustomConfig',
|
|
52
|
-
:'mode' => :'RumRateLimitMode'
|
|
41
|
+
:'data' => :'MaintenanceUpdateDataRelationshipsUserData'
|
|
53
42
|
}
|
|
54
43
|
end
|
|
55
44
|
|
|
@@ -58,7 +47,7 @@ module DatadogAPIClient::V2
|
|
|
58
47
|
# @!visibility private
|
|
59
48
|
def initialize(attributes = {})
|
|
60
49
|
if (!attributes.is_a?(Hash))
|
|
61
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::
|
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceUpdateDataRelationshipsUser` initialize method"
|
|
62
51
|
end
|
|
63
52
|
|
|
64
53
|
self.additional_properties = {}
|
|
@@ -71,16 +60,8 @@ module DatadogAPIClient::V2
|
|
|
71
60
|
end
|
|
72
61
|
}
|
|
73
62
|
|
|
74
|
-
if attributes.key?(:'
|
|
75
|
-
self.
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
if attributes.key?(:'custom')
|
|
79
|
-
self.custom = attributes[:'custom']
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
if attributes.key?(:'mode')
|
|
83
|
-
self.mode = attributes[:'mode']
|
|
63
|
+
if attributes.key?(:'data')
|
|
64
|
+
self.data = attributes[:'data']
|
|
84
65
|
end
|
|
85
66
|
end
|
|
86
67
|
|
|
@@ -88,18 +69,18 @@ module DatadogAPIClient::V2
|
|
|
88
69
|
# @return true if the model is valid
|
|
89
70
|
# @!visibility private
|
|
90
71
|
def valid?
|
|
91
|
-
return false if @
|
|
72
|
+
return false if @data.nil?
|
|
92
73
|
true
|
|
93
74
|
end
|
|
94
75
|
|
|
95
76
|
# Custom attribute writer method with validation
|
|
96
|
-
# @param
|
|
77
|
+
# @param data [Object] Object to be assigned
|
|
97
78
|
# @!visibility private
|
|
98
|
-
def
|
|
99
|
-
if
|
|
100
|
-
fail ArgumentError, 'invalid value for "
|
|
79
|
+
def data=(data)
|
|
80
|
+
if data.nil?
|
|
81
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
|
101
82
|
end
|
|
102
|
-
@
|
|
83
|
+
@data = data
|
|
103
84
|
end
|
|
104
85
|
|
|
105
86
|
# Returns the object in the form of hash, with additionalProperties support.
|
|
@@ -128,9 +109,7 @@ module DatadogAPIClient::V2
|
|
|
128
109
|
def ==(o)
|
|
129
110
|
return true if self.equal?(o)
|
|
130
111
|
self.class == o.class &&
|
|
131
|
-
|
|
132
|
-
custom == o.custom &&
|
|
133
|
-
mode == o.mode &&
|
|
112
|
+
data == o.data &&
|
|
134
113
|
additional_properties == o.additional_properties
|
|
135
114
|
end
|
|
136
115
|
|
|
@@ -138,7 +117,7 @@ module DatadogAPIClient::V2
|
|
|
138
117
|
# @return [Integer] Hash code
|
|
139
118
|
# @!visibility private
|
|
140
119
|
def hash
|
|
141
|
-
[
|
|
120
|
+
[data, additional_properties].hash
|
|
142
121
|
end
|
|
143
122
|
end
|
|
144
123
|
end
|