datadog_api_client 2.7.0 → 2.9.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.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +195 -46
  4. data/.generator/schemas/v2/openapi.yaml +877 -96
  5. data/.generator/src/generator/formatter.py +1 -0
  6. data/.generator/src/generator/templates/model_base.j2 +8 -4
  7. data/CHANGELOG.md +39 -0
  8. data/examples/v1/dashboards/CreateDashboard_109450134.rb +44 -0
  9. data/examples/v1/dashboards/CreateDashboard_2800096921.rb +62 -0
  10. data/examples/v1/dashboards/CreateDashboard_3195475781.rb +32 -0
  11. data/examples/v1/service-level-objectives/SearchSLO.rb +0 -3
  12. data/examples/v2/incidents/CreateIncidentIntegration.rb +31 -0
  13. data/examples/v2/incidents/DeleteIncidentIntegration.rb +14 -0
  14. data/examples/v2/incidents/GetIncidentIntegration.rb +14 -0
  15. data/examples/v2/incidents/ListIncidentIntegrations.rb +11 -0
  16. data/examples/v2/incidents/UpdateIncidentIntegration.rb +34 -0
  17. data/examples/v2/ip-allowlist/GetIPAllowlist.rb +5 -0
  18. data/examples/v2/ip-allowlist/UpdateIPAllowlist.rb +25 -0
  19. data/examples/v2/logs-metrics/CreateLogsMetric.rb +1 -1
  20. data/examples/v2/restriction-policies/DeleteRestrictionPolicy.rb +5 -0
  21. data/examples/v2/restriction-policies/GetRestrictionPolicy.rb +5 -0
  22. data/examples/v2/restriction-policies/UpdateRestrictionPolicy.rb +25 -0
  23. data/examples/v2/synthetics/GetOnDemandConcurrencyCap.rb +5 -0
  24. data/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.rb +5 -0
  25. data/examples/v2/synthetics/SetOnDemandConcurrencyCap.rb +7 -0
  26. data/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.rb +9 -0
  27. data/lib/datadog_api_client/configuration.rb +5 -1
  28. data/lib/datadog_api_client/inflector.rb +38 -0
  29. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +0 -6
  30. data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -2
  31. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  32. data/lib/datadog_api_client/v1/model_base.rb +7 -3
  33. data/lib/datadog_api_client/v1/models/application_key.rb +16 -16
  34. data/lib/datadog_api_client/v1/models/cancel_downtimes_by_scope_request.rb +1 -1
  35. data/lib/datadog_api_client/v1/models/downtime.rb +1 -1
  36. data/lib/datadog_api_client/v1/models/downtime_child.rb +1 -1
  37. data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
  38. data/lib/datadog_api_client/v1/models/host_meta.rb +3 -3
  39. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
  40. data/lib/datadog_api_client/v1/models/ip_prefixes_orchestrator.rb +105 -0
  41. data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
  42. data/lib/datadog_api_client/v1/models/list_stream_source.rb +3 -0
  43. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
  44. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +31 -11
  45. data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +11 -1
  46. data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +16 -4
  47. data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +24 -1
  48. data/lib/datadog_api_client/v1/models/slo_state.rb +29 -0
  49. data/lib/datadog_api_client/v1/models/slo_status.rb +164 -0
  50. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +10 -10
  51. data/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb +12 -1
  52. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
  53. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
  54. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
  55. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +3 -3
  56. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +3 -3
  57. data/lib/datadog_api_client/v2/api/incidents_api.rb +384 -0
  58. data/lib/datadog_api_client/v2/api/ip_allowlist_api.rb +153 -0
  59. data/lib/datadog_api_client/v2/api/logs_api.rb +1 -0
  60. data/lib/datadog_api_client/v2/api/metrics_api.rb +2 -2
  61. data/lib/datadog_api_client/v2/api/monitors_api.rb +3 -3
  62. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +236 -0
  63. data/lib/datadog_api_client/v2/api/synthetics_api.rb +153 -0
  64. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  65. data/lib/datadog_api_client/v2/model_base.rb +7 -3
  66. data/lib/datadog_api_client/v2/models/events_data_source.rb +1 -0
  67. data/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +161 -0
  68. data/lib/datadog_api_client/v2/models/incident_integration_metadata_create_data.rb +123 -0
  69. data/lib/datadog_api_client/v2/models/incident_integration_metadata_create_request.rb +102 -0
  70. data/lib/datadog_api_client/v2/models/incident_integration_metadata_list_response.rb +126 -0
  71. data/lib/datadog_api_client/v2/models/incident_integration_metadata_metadata.rb +63 -0
  72. data/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_data.rb +123 -0
  73. data/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_request.rb +102 -0
  74. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response.rb +114 -0
  75. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +133 -0
  76. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_included_item.rb +62 -0
  77. data/lib/datadog_api_client/v2/models/incident_update_data.rb +1 -1
  78. data/lib/datadog_api_client/v2/models/ip_allowlist_attributes.rb +103 -0
  79. data/lib/datadog_api_client/v2/models/ip_allowlist_data.rb +122 -0
  80. data/lib/datadog_api_client/v2/models/ip_allowlist_entry.rb +102 -0
  81. data/lib/datadog_api_client/v2/models/ip_allowlist_entry_attributes.rb +121 -0
  82. data/lib/datadog_api_client/v2/models/ip_allowlist_entry_data.rb +122 -0
  83. data/lib/datadog_api_client/v2/models/ip_allowlist_entry_type.rb +26 -0
  84. data/lib/datadog_api_client/v2/models/ip_allowlist_response.rb +91 -0
  85. data/lib/datadog_api_client/v2/models/ip_allowlist_type.rb +26 -0
  86. data/lib/datadog_api_client/v2/models/ip_allowlist_update_request.rb +102 -0
  87. data/lib/datadog_api_client/v2/models/jira_integration_metadata.rb +104 -0
  88. data/lib/datadog_api_client/v2/models/jira_integration_metadata_issues_item.rb +153 -0
  89. data/lib/datadog_api_client/v2/models/metrics_aggregator.rb +4 -0
  90. data/lib/datadog_api_client/v2/models/metrics_data_source.rb +2 -1
  91. data/lib/datadog_api_client/v2/models/metrics_scalar_query.rb +1 -1
  92. data/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb +1 -1
  93. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb +91 -0
  94. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_attributes.rb +91 -0
  95. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_response.rb +91 -0
  96. data/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadatas.rb +1 -1
  97. data/lib/datadog_api_client/v2/models/restriction_policy.rb +144 -0
  98. data/lib/datadog_api_client/v2/models/restriction_policy_attributes.rb +104 -0
  99. data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +127 -0
  100. data/lib/datadog_api_client/v2/models/restriction_policy_response.rb +102 -0
  101. data/lib/datadog_api_client/v2/models/restriction_policy_type.rb +26 -0
  102. data/lib/datadog_api_client/v2/models/restriction_policy_update_request.rb +102 -0
  103. data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +7 -7
  104. data/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb +7 -7
  105. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb +1 -0
  106. data/lib/datadog_api_client/v2/models/slack_integration_metadata.rb +104 -0
  107. data/lib/datadog_api_client/v2/models/slack_integration_metadata_channel_item.rb +154 -0
  108. data/lib/datadog_api_client/version.rb +1 -1
  109. metadata +57 -2
@@ -0,0 +1,121 @@
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 the IP allowlist entry.
21
+ class IPAllowlistEntryAttributes
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The CIDR block describing the IP range of the entry.
29
+ attr_accessor :cidr_block
30
+
31
+ # Creation time of the entry.
32
+ attr_accessor :created_at
33
+
34
+ # Time of last entry modification.
35
+ attr_accessor :modified_at
36
+
37
+ # A note describing the IP allowlist entry.
38
+ attr_accessor :note
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ # @!visibility private
42
+ def self.attribute_map
43
+ {
44
+ :'cidr_block' => :'cidr_block',
45
+ :'created_at' => :'created_at',
46
+ :'modified_at' => :'modified_at',
47
+ :'note' => :'note'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ # @!visibility private
53
+ def self.openapi_types
54
+ {
55
+ :'cidr_block' => :'String',
56
+ :'created_at' => :'Time',
57
+ :'modified_at' => :'Time',
58
+ :'note' => :'String'
59
+ }
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param attributes [Hash] Model attributes in the form of hash
64
+ # @!visibility private
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistEntryAttributes` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!self.class.attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistEntryAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'cidr_block')
79
+ self.cidr_block = attributes[:'cidr_block']
80
+ end
81
+
82
+ if attributes.key?(:'created_at')
83
+ self.created_at = attributes[:'created_at']
84
+ end
85
+
86
+ if attributes.key?(:'modified_at')
87
+ self.modified_at = attributes[:'modified_at']
88
+ end
89
+
90
+ if attributes.key?(:'note')
91
+ self.note = attributes[:'note']
92
+ end
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ # @!visibility private
98
+ def valid?
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param o [Object] Object to be compared
104
+ # @!visibility private
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ cidr_block == o.cidr_block &&
109
+ created_at == o.created_at &&
110
+ modified_at == o.modified_at &&
111
+ note == o.note
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ # @!visibility private
117
+ def hash
118
+ [cidr_block, created_at, modified_at, note].hash
119
+ end
120
+ end
121
+ end
@@ -0,0 +1,122 @@
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
+ # Data of the IP allowlist entry object.
21
+ class IPAllowlistEntryData
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Attributes of the IP allowlist entry.
29
+ attr_accessor :attributes
30
+
31
+ # The unique identifier of the IP allowlist entry.
32
+ attr_accessor :id
33
+
34
+ # IP allowlist Entry type.
35
+ attr_reader :type
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'attributes' => :'attributes',
42
+ :'id' => :'id',
43
+ :'type' => :'type'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'attributes' => :'IPAllowlistEntryAttributes',
52
+ :'id' => :'String',
53
+ :'type' => :'IPAllowlistEntryType'
54
+ }
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param attributes [Hash] Model attributes in the form of hash
59
+ # @!visibility private
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistEntryData` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!self.class.attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistEntryData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'attributes')
74
+ self.attributes = attributes[:'attributes']
75
+ end
76
+
77
+ if attributes.key?(:'id')
78
+ self.id = attributes[:'id']
79
+ end
80
+
81
+ if attributes.key?(:'type')
82
+ self.type = attributes[:'type']
83
+ end
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ # @!visibility private
89
+ def valid?
90
+ return false if @type.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param type [Object] Object to be assigned
96
+ # @!visibility private
97
+ def type=(type)
98
+ if type.nil?
99
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
100
+ end
101
+ @type = type
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param o [Object] Object to be compared
106
+ # @!visibility private
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ attributes == o.attributes &&
111
+ id == o.id &&
112
+ type == o.type
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Integer] Hash code
117
+ # @!visibility private
118
+ def hash
119
+ [attributes, id, type].hash
120
+ end
121
+ end
122
+ end
@@ -0,0 +1,26 @@
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
+ # IP allowlist Entry type.
21
+ class IPAllowlistEntryType
22
+ include BaseEnumModel
23
+
24
+ IP_ALLOWLIST_ENTRY = "ip_allowlist_entry".freeze
25
+ end
26
+ end
@@ -0,0 +1,91 @@
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
+ # Response containing information about the IP allowlist.
21
+ class IPAllowlistResponse
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # IP allowlist data.
29
+ attr_accessor :data
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ # @!visibility private
33
+ def self.attribute_map
34
+ {
35
+ :'data' => :'data'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'data' => :'IPAllowlistData'
44
+ }
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param attributes [Hash] Model attributes in the form of hash
49
+ # @!visibility private
50
+ def initialize(attributes = {})
51
+ if (!attributes.is_a?(Hash))
52
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistResponse` initialize method"
53
+ end
54
+
55
+ # check to see if the attribute exists and convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h|
57
+ if (!self.class.attribute_map.key?(k.to_sym))
58
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ end
60
+ h[k.to_sym] = v
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
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param o [Object] Object to be compared
77
+ # @!visibility private
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ data == o.data
82
+ end
83
+
84
+ # Calculates hash code according to all attributes.
85
+ # @return [Integer] Hash code
86
+ # @!visibility private
87
+ def hash
88
+ [data].hash
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,26 @@
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
+ # IP allowlist type.
21
+ class IPAllowlistType
22
+ include BaseEnumModel
23
+
24
+ IP_ALLOWLIST = "ip_allowlist".freeze
25
+ end
26
+ end
@@ -0,0 +1,102 @@
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
+ # Update the IP allowlist.
21
+ class IPAllowlistUpdateRequest
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # IP allowlist data.
29
+ attr_reader :data
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ # @!visibility private
33
+ def self.attribute_map
34
+ {
35
+ :'data' => :'data'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'data' => :'IPAllowlistData'
44
+ }
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param attributes [Hash] Model attributes in the form of hash
49
+ # @!visibility private
50
+ def initialize(attributes = {})
51
+ if (!attributes.is_a?(Hash))
52
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistUpdateRequest` initialize method"
53
+ end
54
+
55
+ # check to see if the attribute exists and convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h|
57
+ if (!self.class.attribute_map.key?(k.to_sym))
58
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ end
60
+ h[k.to_sym] = v
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
+ # Checks equality by comparing each attribute.
87
+ # @param o [Object] Object to be compared
88
+ # @!visibility private
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ data == o.data
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ # @!visibility private
98
+ def hash
99
+ [data].hash
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,104 @@
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
+ # Incident integration metadata for the Jira integration.
21
+ class JiraIntegrationMetadata
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Array of Jira issues in this integration metadata.
29
+ attr_reader :issues
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ # @!visibility private
33
+ def self.attribute_map
34
+ {
35
+ :'issues' => :'issues'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'issues' => :'Array<JiraIntegrationMetadataIssuesItem>'
44
+ }
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param attributes [Hash] Model attributes in the form of hash
49
+ # @!visibility private
50
+ def initialize(attributes = {})
51
+ if (!attributes.is_a?(Hash))
52
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIntegrationMetadata` initialize method"
53
+ end
54
+
55
+ # check to see if the attribute exists and convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h|
57
+ if (!self.class.attribute_map.key?(k.to_sym))
58
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::JiraIntegrationMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ end
60
+ h[k.to_sym] = v
61
+ }
62
+
63
+ if attributes.key?(:'issues')
64
+ if (value = attributes[:'issues']).is_a?(Array)
65
+ self.issues = value
66
+ end
67
+ end
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ # @!visibility private
73
+ def valid?
74
+ return false if @issues.nil?
75
+ true
76
+ end
77
+
78
+ # Custom attribute writer method with validation
79
+ # @param issues [Object] Object to be assigned
80
+ # @!visibility private
81
+ def issues=(issues)
82
+ if issues.nil?
83
+ fail ArgumentError, 'invalid value for "issues", issues cannot be nil.'
84
+ end
85
+ @issues = issues
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param o [Object] Object to be compared
90
+ # @!visibility private
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ issues == o.issues
95
+ end
96
+
97
+ # Calculates hash code according to all attributes.
98
+ # @return [Integer] Hash code
99
+ # @!visibility private
100
+ def hash
101
+ [issues].hash
102
+ end
103
+ end
104
+ end