datadog_api_client 2.23.0 → 2.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +666 -156
  4. data/.generator/schemas/v2/openapi.yaml +774 -89
  5. data/.generator/src/generator/replacement.json +1 -1
  6. data/.github/CODEOWNERS +5 -5
  7. data/CHANGELOG.md +26 -0
  8. data/examples/v1/dashboards/CreateDashboard_1213075383.rb +10 -4
  9. data/examples/v1/dashboards/CreateDashboard_2336428357.rb +10 -4
  10. data/examples/v1/dashboards/CreateDashboard_2563642929.rb +66 -0
  11. data/examples/v1/dashboards/CreateDashboard_3669695268.rb +10 -4
  12. data/examples/v1/dashboards/CreateDashboard_915214113.rb +10 -4
  13. data/examples/v1/monitors/UpdateMonitor.rb +1 -0
  14. data/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb +1 -0
  15. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +9 -4
  16. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +15 -0
  17. data/examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.rb +134 -0
  18. data/examples/v2/api-management/ListAPIs.rb +8 -0
  19. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule.rb +3 -0
  20. data/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.rb +1 -0
  21. data/examples/v2/organizations/GetOrgConfig.rb +5 -0
  22. data/examples/v2/organizations/ListOrgConfigs.rb +5 -0
  23. data/examples/v2/organizations/UpdateOrgConfig.rb +14 -0
  24. data/examples/v2/security-monitoring/TestExistingSecurityMonitoringRule.rb +21 -0
  25. data/examples/v2/security-monitoring/TestSecurityMonitoringRule.rb +58 -0
  26. data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.rb +1 -1
  27. data/lib/datadog_api_client/configuration.rb +1 -0
  28. data/lib/datadog_api_client/inflector.rb +37 -1
  29. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
  30. data/lib/datadog_api_client/v1/models/event.rb +1 -1
  31. data/lib/datadog_api_client/v1/models/formula_type.rb +26 -0
  32. data/lib/datadog_api_client/v1/models/geomap_widget_request.rb +14 -4
  33. data/lib/datadog_api_client/v1/models/group_type.rb +26 -0
  34. data/lib/datadog_api_client/v1/models/monitor.rb +1 -16
  35. data/lib/datadog_api_client/v1/models/monitor_update_request.rb +2 -23
  36. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +2 -2
  37. data/lib/datadog_api_client/v1/models/synthetics_api_step.rb +37 -180
  38. data/lib/datadog_api_client/v1/models/synthetics_api_test_step.rb +206 -0
  39. data/lib/datadog_api_client/v1/models/{synthetics_api_step_subtype.rb → synthetics_api_test_step_subtype.rb} +2 -2
  40. data/lib/datadog_api_client/v1/models/synthetics_api_wait_step.rb +148 -0
  41. data/lib/datadog_api_client/v1/models/synthetics_api_wait_step_subtype.rb +26 -0
  42. data/lib/datadog_api_client/v1/models/synthetics_assertion.rb +1 -0
  43. data/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_operator.rb +28 -0
  44. data/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_target.rb +140 -0
  45. data/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_type.rb +26 -0
  46. data/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target_target.rb +11 -1
  47. data/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options.rb +0 -4
  48. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +22 -1
  49. data/lib/datadog_api_client/v1/models/table_widget_request.rb +14 -4
  50. data/lib/datadog_api_client/v1/models/toplist_widget_request.rb +11 -1
  51. data/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb +7 -7
  52. data/lib/datadog_api_client/v1/models/usage_rum_sessions_response.rb +2 -2
  53. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +168 -18
  54. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +169 -19
  55. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +171 -21
  56. data/lib/datadog_api_client/v1/models/widget_formula_sort.rb +144 -0
  57. data/lib/datadog_api_client/v1/models/widget_group_sort.rb +140 -0
  58. data/lib/datadog_api_client/v1/models/widget_sort_by.rb +110 -0
  59. data/lib/datadog_api_client/v1/models/widget_sort_order_by.rb +63 -0
  60. data/lib/datadog_api_client/v2/api/api_management_api.rb +80 -2
  61. data/lib/datadog_api_client/v2/api/organizations_api.rb +197 -0
  62. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +140 -1
  63. data/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb +240 -0
  64. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +13 -1
  65. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +1 -1
  66. data/lib/datadog_api_client/v2/models/events_group_by.rb +5 -4
  67. data/lib/datadog_api_client/v2/models/list_apis_response.rb +92 -0
  68. data/lib/datadog_api_client/v2/models/list_apis_response_data.rb +90 -0
  69. data/lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb +80 -0
  70. data/lib/datadog_api_client/v2/models/list_apis_response_meta.rb +80 -0
  71. data/lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb +100 -0
  72. data/lib/datadog_api_client/v2/models/org_config_get_response.rb +98 -0
  73. data/lib/datadog_api_client/v2/models/org_config_list_response.rb +100 -0
  74. data/lib/datadog_api_client/v2/models/org_config_read.rb +140 -0
  75. data/lib/datadog_api_client/v2/models/org_config_read_attributes.rb +179 -0
  76. data/lib/datadog_api_client/v2/models/org_config_type.rb +26 -0
  77. data/lib/datadog_api_client/v2/models/org_config_write.rb +119 -0
  78. data/lib/datadog_api_client/v2/models/org_config_write_attributes.rb +98 -0
  79. data/lib/datadog_api_client/v2/models/org_config_write_request.rb +98 -0
  80. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload.rb +118 -0
  81. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload_data.rb +120 -0
  82. data/lib/datadog_api_client/v2/models/security_monitoring_rule_test_payload.rb +62 -0
  83. data/lib/datadog_api_client/v2/models/security_monitoring_rule_test_request.rb +92 -0
  84. data/lib/datadog_api_client/v2/models/security_monitoring_rule_test_response.rb +84 -0
  85. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_test.rb +26 -0
  86. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +1 -1
  87. data/lib/datadog_api_client/v2/models/security_monitoring_rule_validate_payload.rb +64 -0
  88. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb +251 -0
  89. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +1 -1
  90. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +263 -0
  91. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +1 -1
  92. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +263 -0
  93. data/lib/datadog_api_client/version.rb +1 -1
  94. metadata +47 -3
@@ -0,0 +1,92 @@
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 for `ListAPIs`.
21
+ class ListAPIsResponse
22
+ include BaseGenericModel
23
+
24
+ # List of API items.
25
+ attr_accessor :data
26
+
27
+ # Metadata for `ListAPIsResponse`.
28
+ attr_accessor :meta
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'data' => :'data',
35
+ :'meta' => :'meta'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'data' => :'Array<ListAPIsResponseData>',
44
+ :'meta' => :'ListAPIsResponseMeta'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponse` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'data')
65
+ if (value = attributes[:'data']).is_a?(Array)
66
+ self.data = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'meta')
71
+ self.meta = attributes[:'meta']
72
+ end
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
+ meta == o.meta
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Integer] Hash code
87
+ # @!visibility private
88
+ def hash
89
+ [data, meta].hash
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,90 @@
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 envelope for `ListAPIsResponse`.
21
+ class ListAPIsResponseData
22
+ include BaseGenericModel
23
+
24
+ # Attributes for `ListAPIsResponseData`.
25
+ attr_accessor :attributes
26
+
27
+ # API identifier.
28
+ attr_accessor :id
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'attributes' => :'attributes',
35
+ :'id' => :'id'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'attributes' => :'ListAPIsResponseDataAttributes',
44
+ :'id' => :'UUID'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponseData` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'attributes')
65
+ self.attributes = attributes[:'attributes']
66
+ end
67
+
68
+ if attributes.key?(:'id')
69
+ self.id = attributes[:'id']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ attributes == o.attributes &&
80
+ id == o.id
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [attributes, id].hash
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,80 @@
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 for `ListAPIsResponseData`.
21
+ class ListAPIsResponseDataAttributes
22
+ include BaseGenericModel
23
+
24
+ # API name.
25
+ attr_accessor :name
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'name' => :'name'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'name' => :'String'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponseDataAttributes` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponseDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'name')
60
+ self.name = attributes[:'name']
61
+ end
62
+ end
63
+
64
+ # Checks equality by comparing each attribute.
65
+ # @param o [Object] Object to be compared
66
+ # @!visibility private
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ name == o.name
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [name].hash
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,80 @@
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
+ # Metadata for `ListAPIsResponse`.
21
+ class ListAPIsResponseMeta
22
+ include BaseGenericModel
23
+
24
+ # Pagination metadata information for `ListAPIsResponse`.
25
+ attr_accessor :pagination
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'pagination' => :'pagination'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'pagination' => :'ListAPIsResponseMetaPagination'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponseMeta` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'pagination')
60
+ self.pagination = attributes[:'pagination']
61
+ end
62
+ end
63
+
64
+ # Checks equality by comparing each attribute.
65
+ # @param o [Object] Object to be compared
66
+ # @!visibility private
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ pagination == o.pagination
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [pagination].hash
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,100 @@
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
+ # Pagination metadata information for `ListAPIsResponse`.
21
+ class ListAPIsResponseMetaPagination
22
+ include BaseGenericModel
23
+
24
+ # Number of items in the current page.
25
+ attr_accessor :limit
26
+
27
+ # Offset for pagination.
28
+ attr_accessor :offset
29
+
30
+ # Total number of items.
31
+ attr_accessor :total_count
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'limit' => :'limit',
38
+ :'offset' => :'offset',
39
+ :'total_count' => :'total_count'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'limit' => :'Integer',
48
+ :'offset' => :'Integer',
49
+ :'total_count' => :'Integer'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param attributes [Hash] Model attributes in the form of hash
55
+ # @!visibility private
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponseMetaPagination` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponseMetaPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'limit')
70
+ self.limit = attributes[:'limit']
71
+ end
72
+
73
+ if attributes.key?(:'offset')
74
+ self.offset = attributes[:'offset']
75
+ end
76
+
77
+ if attributes.key?(:'total_count')
78
+ self.total_count = attributes[:'total_count']
79
+ end
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ limit == o.limit &&
89
+ offset == o.offset &&
90
+ total_count == o.total_count
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [limit, offset, total_count].hash
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,98 @@
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
+ # A response with a single Org Config.
21
+ class OrgConfigGetResponse
22
+ include BaseGenericModel
23
+
24
+ # A single Org Config.
25
+ attr_reader :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'data' => :'data'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'data' => :'OrgConfigRead'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigGetResponse` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'data')
60
+ self.data = attributes[:'data']
61
+ end
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ # @!visibility private
67
+ def valid?
68
+ return false if @data.nil?
69
+ true
70
+ end
71
+
72
+ # Custom attribute writer method with validation
73
+ # @param data [Object] Object to be assigned
74
+ # @!visibility private
75
+ def data=(data)
76
+ if data.nil?
77
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
78
+ end
79
+ @data = data
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ data == o.data
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ # @!visibility private
94
+ def hash
95
+ [data].hash
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,100 @@
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
+ # A response with multiple Org Configs.
21
+ class OrgConfigListResponse
22
+ include BaseGenericModel
23
+
24
+ # An array of Org Configs.
25
+ attr_reader :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'data' => :'data'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'data' => :'Array<OrgConfigRead>'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigListResponse` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'data')
60
+ if (value = attributes[:'data']).is_a?(Array)
61
+ self.data = value
62
+ end
63
+ end
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ # @!visibility private
69
+ def valid?
70
+ return false if @data.nil?
71
+ true
72
+ end
73
+
74
+ # Custom attribute writer method with validation
75
+ # @param data [Object] Object to be assigned
76
+ # @!visibility private
77
+ def data=(data)
78
+ if data.nil?
79
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
80
+ end
81
+ @data = data
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param o [Object] Object to be compared
86
+ # @!visibility private
87
+ def ==(o)
88
+ return true if self.equal?(o)
89
+ self.class == o.class &&
90
+ data == o.data
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [data].hash
98
+ end
99
+ end
100
+ end