datadog_api_client 2.21.0 → 2.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +180 -637
  4. data/.generator/schemas/v2/openapi.yaml +515 -33
  5. data/.github/workflows/prepare_release.yml +2 -2
  6. data/.github/workflows/publish.yml +2 -2
  7. data/.github/workflows/release.yml +2 -2
  8. data/.github/workflows/test.yml +1 -1
  9. data/CHANGELOG.md +24 -0
  10. data/Gemfile +1 -1
  11. data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
  12. data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -0
  13. data/examples/v1/aws-integration/UpdateAWSAccount.rb +1 -1
  14. data/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb +118 -0
  15. data/examples/v1/synthetics/UpdateBrowserTest.rb +3 -0
  16. data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +2 -2
  17. data/examples/v2/authn-mappings/CreateAuthNMapping.rb +1 -1
  18. data/examples/v2/authn-mappings/UpdateAuthNMapping.rb +1 -1
  19. data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +1 -1
  20. data/examples/v2/gcp-integration/CreateGCPSTSAccount.rb +1 -1
  21. data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +1 -1
  22. data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +1 -1
  23. data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +1 -1
  24. data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +1 -1
  25. data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +1 -1
  26. data/examples/v2/gcp-integration/UpdateGCPSTSAccount.rb +1 -1
  27. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +1 -1
  28. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +1 -1
  29. data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +4 -0
  30. data/examples/v2/metrics/QueryScalarData_3112571352.rb +2 -2
  31. data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +3 -3
  32. data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb +19 -0
  33. data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.rb +42 -0
  34. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +4 -0
  35. data/examples/v2/service-level-objectives/CreateSLOReportJob.rb +20 -0
  36. data/examples/v2/service-level-objectives/GetSLOReport.rb +8 -0
  37. data/examples/v2/service-level-objectives/GetSLOReportJobStatus.rb +11 -0
  38. data/lib/datadog_api_client/configuration.rb +3 -0
  39. data/lib/datadog_api_client/inflector.rb +20 -7
  40. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +104 -131
  41. data/lib/datadog_api_client/v1/models/aws_account.rb +12 -2
  42. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
  43. data/lib/datadog_api_client/v1/models/monitor_options.rb +4 -1
  44. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
  45. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
  46. data/lib/datadog_api_client/v1/models/series.rb +1 -1
  47. data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +14 -2
  48. data/lib/datadog_api_client/v1/models/slo_time_slice_interval.rb +29 -0
  49. data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +1 -1
  50. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +13 -1
  51. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +175 -0
  52. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_type.rb +2 -0
  53. data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +6 -0
  54. data/lib/datadog_api_client/v2/api/metrics_api.rb +1 -1
  55. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +67 -0
  56. data/lib/datadog_api_client/v2/api/service_level_objectives_api.rb +245 -0
  57. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +12 -3
  58. data/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb +1 -1
  59. data/lib/datadog_api_client/v2/models/authn_mapping_create_relationships.rb +37 -54
  60. data/lib/datadog_api_client/v2/models/authn_mapping_included.rb +2 -1
  61. data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb +98 -0
  62. data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb +98 -0
  63. data/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb +14 -4
  64. data/lib/datadog_api_client/{v1/models/usage_attribution_metadata.rb → v2/models/authn_mapping_team.rb} +31 -23
  65. data/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb +212 -0
  66. data/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb +1 -1
  67. data/lib/datadog_api_client/v2/models/authn_mapping_update_relationships.rb +37 -54
  68. data/lib/datadog_api_client/v2/models/custom_destination_type.rb +1 -1
  69. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
  70. data/lib/datadog_api_client/v2/models/metric_series.rb +1 -1
  71. data/lib/datadog_api_client/v2/models/relationship_to_team.rb +80 -0
  72. data/lib/datadog_api_client/{v1/models/usage_attribution_response.rb → v2/models/relationship_to_team_data.rb} +21 -23
  73. data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +183 -0
  74. data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +1 -1
  75. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +1 -1
  76. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +1 -1
  77. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +1 -1
  78. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +1 -1
  79. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +1 -1
  80. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +11 -1
  81. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +13 -14
  82. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +11 -1
  83. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +13 -1
  84. data/lib/datadog_api_client/v2/models/slo_report_create_request.rb +98 -0
  85. data/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb +160 -0
  86. data/lib/datadog_api_client/{v1/models/usage_attribution_pagination.rb → v2/models/slo_report_create_request_data.rb} +29 -51
  87. data/lib/datadog_api_client/v2/models/slo_report_interval.rb +27 -0
  88. data/lib/datadog_api_client/v2/models/slo_report_post_response.rb +80 -0
  89. data/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb +90 -0
  90. data/lib/datadog_api_client/v2/models/slo_report_status.rb +29 -0
  91. data/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb +80 -0
  92. data/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb +80 -0
  93. data/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb +100 -0
  94. data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +8 -0
  95. data/lib/datadog_api_client/v2/models/user_teams_response.rb +13 -1
  96. data/lib/datadog_api_client/version.rb +1 -1
  97. metadata +51 -33
  98. data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -9
  99. data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +0 -152
  100. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +0 -63
  101. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +0 -74
  102. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +0 -590
@@ -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
+ # The SLO report request body.
21
+ class SloReportCreateRequest
22
+ include BaseGenericModel
23
+
24
+ # The data portion of the SLO report request.
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' => :'SloReportCreateRequestData'
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::SloReportCreateRequest` 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::SloReportCreateRequest`. 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,160 @@
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 attributes portion of the SLO report request.
21
+ class SloReportCreateRequestAttributes
22
+ include BaseGenericModel
23
+
24
+ # The `from` timestamp for the report in epoch seconds.
25
+ attr_reader :from_ts
26
+
27
+ # The frequency at which report data is to be generated.
28
+ attr_accessor :interval
29
+
30
+ # The query string used to filter SLO results. Some examples of queries include `service:<service-name>` and `slo-name`.
31
+ attr_reader :query
32
+
33
+ # The timezone used to determine the start and end of each interval. For example, weekly intervals start at 12am on Sunday in the specified timezone.
34
+ attr_accessor :timezone
35
+
36
+ # The `to` timestamp for the report in epoch seconds.
37
+ attr_reader :to_ts
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ # @!visibility private
41
+ def self.attribute_map
42
+ {
43
+ :'from_ts' => :'from_ts',
44
+ :'interval' => :'interval',
45
+ :'query' => :'query',
46
+ :'timezone' => :'timezone',
47
+ :'to_ts' => :'to_ts'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ # @!visibility private
53
+ def self.openapi_types
54
+ {
55
+ :'from_ts' => :'Integer',
56
+ :'interval' => :'SLOReportInterval',
57
+ :'query' => :'String',
58
+ :'timezone' => :'String',
59
+ :'to_ts' => :'Integer'
60
+ }
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param attributes [Hash] Model attributes in the form of hash
65
+ # @!visibility private
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SloReportCreateRequestAttributes` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!self.class.attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SloReportCreateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'from_ts')
80
+ self.from_ts = attributes[:'from_ts']
81
+ end
82
+
83
+ if attributes.key?(:'interval')
84
+ self.interval = attributes[:'interval']
85
+ end
86
+
87
+ if attributes.key?(:'query')
88
+ self.query = attributes[:'query']
89
+ end
90
+
91
+ if attributes.key?(:'timezone')
92
+ self.timezone = attributes[:'timezone']
93
+ end
94
+
95
+ if attributes.key?(:'to_ts')
96
+ self.to_ts = attributes[:'to_ts']
97
+ end
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ # @!visibility private
103
+ def valid?
104
+ return false if @from_ts.nil?
105
+ return false if @query.nil?
106
+ return false if @to_ts.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param from_ts [Object] Object to be assigned
112
+ # @!visibility private
113
+ def from_ts=(from_ts)
114
+ if from_ts.nil?
115
+ fail ArgumentError, 'invalid value for "from_ts", from_ts cannot be nil.'
116
+ end
117
+ @from_ts = from_ts
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param query [Object] Object to be assigned
122
+ # @!visibility private
123
+ def query=(query)
124
+ if query.nil?
125
+ fail ArgumentError, 'invalid value for "query", query cannot be nil.'
126
+ end
127
+ @query = query
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param to_ts [Object] Object to be assigned
132
+ # @!visibility private
133
+ def to_ts=(to_ts)
134
+ if to_ts.nil?
135
+ fail ArgumentError, 'invalid value for "to_ts", to_ts cannot be nil.'
136
+ end
137
+ @to_ts = to_ts
138
+ end
139
+
140
+ # Checks equality by comparing each attribute.
141
+ # @param o [Object] Object to be compared
142
+ # @!visibility private
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ from_ts == o.from_ts &&
147
+ interval == o.interval &&
148
+ query == o.query &&
149
+ timezone == o.timezone &&
150
+ to_ts == o.to_ts
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ # @!visibility private
156
+ def hash
157
+ [from_ts, interval, query, timezone, to_ts].hash
158
+ end
159
+ end
160
+ end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Datadog API V1 Collection
2
+ #Datadog API V2 Collection
3
3
 
4
4
  #Collection of all Datadog Public endpoints.
5
5
 
@@ -16,35 +16,19 @@ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.ge
16
16
  require 'date'
17
17
  require 'time'
18
18
 
19
- module DatadogAPIClient::V1
20
- # The metadata for the current pagination.
21
- class UsageAttributionPagination
19
+ module DatadogAPIClient::V2
20
+ # The data portion of the SLO report request.
21
+ class SloReportCreateRequestData
22
22
  include BaseGenericModel
23
23
 
24
- # Maximum amount of records to be returned.
25
- attr_accessor :limit
26
-
27
- # Records to be skipped before beginning to return.
28
- attr_accessor :offset
29
-
30
- # Direction to sort by.
31
- attr_accessor :sort_direction
32
-
33
- # Field to sort by.
34
- attr_accessor :sort_name
35
-
36
- # Total number of records.
37
- attr_accessor :total_number_of_records
24
+ # The attributes portion of the SLO report request.
25
+ attr_reader :attributes
38
26
 
39
27
  # Attribute mapping from ruby-style variable name to JSON key.
40
28
  # @!visibility private
41
29
  def self.attribute_map
42
30
  {
43
- :'limit' => :'limit',
44
- :'offset' => :'offset',
45
- :'sort_direction' => :'sort_direction',
46
- :'sort_name' => :'sort_name',
47
- :'total_number_of_records' => :'total_number_of_records'
31
+ :'attributes' => :'attributes'
48
32
  }
49
33
  end
50
34
 
@@ -52,11 +36,7 @@ module DatadogAPIClient::V1
52
36
  # @!visibility private
53
37
  def self.openapi_types
54
38
  {
55
- :'limit' => :'Integer',
56
- :'offset' => :'Integer',
57
- :'sort_direction' => :'String',
58
- :'sort_name' => :'String',
59
- :'total_number_of_records' => :'Integer'
39
+ :'attributes' => :'SloReportCreateRequestAttributes'
60
40
  }
61
41
  end
62
42
 
@@ -65,36 +45,38 @@ module DatadogAPIClient::V1
65
45
  # @!visibility private
66
46
  def initialize(attributes = {})
67
47
  if (!attributes.is_a?(Hash))
68
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageAttributionPagination` initialize method"
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SloReportCreateRequestData` initialize method"
69
49
  end
70
50
 
71
51
  # check to see if the attribute exists and convert string to symbol for hash key
72
52
  attributes = attributes.each_with_object({}) { |(k, v), h|
73
53
  if (!self.class.attribute_map.key?(k.to_sym))
74
- fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageAttributionPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SloReportCreateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
55
  end
76
56
  h[k.to_sym] = v
77
57
  }
78
58
 
79
- if attributes.key?(:'limit')
80
- self.limit = attributes[:'limit']
81
- end
82
-
83
- if attributes.key?(:'offset')
84
- self.offset = attributes[:'offset']
85
- end
86
-
87
- if attributes.key?(:'sort_direction')
88
- self.sort_direction = attributes[:'sort_direction']
59
+ if attributes.key?(:'attributes')
60
+ self.attributes = attributes[:'attributes']
89
61
  end
62
+ end
90
63
 
91
- if attributes.key?(:'sort_name')
92
- self.sort_name = attributes[:'sort_name']
93
- end
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 @attributes.nil?
69
+ true
70
+ end
94
71
 
95
- if attributes.key?(:'total_number_of_records')
96
- self.total_number_of_records = attributes[:'total_number_of_records']
72
+ # Custom attribute writer method with validation
73
+ # @param attributes [Object] Object to be assigned
74
+ # @!visibility private
75
+ def attributes=(attributes)
76
+ if attributes.nil?
77
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
97
78
  end
79
+ @attributes = attributes
98
80
  end
99
81
 
100
82
  # Checks equality by comparing each attribute.
@@ -103,18 +85,14 @@ module DatadogAPIClient::V1
103
85
  def ==(o)
104
86
  return true if self.equal?(o)
105
87
  self.class == o.class &&
106
- limit == o.limit &&
107
- offset == o.offset &&
108
- sort_direction == o.sort_direction &&
109
- sort_name == o.sort_name &&
110
- total_number_of_records == o.total_number_of_records
88
+ attributes == o.attributes
111
89
  end
112
90
 
113
91
  # Calculates hash code according to all attributes.
114
92
  # @return [Integer] Hash code
115
93
  # @!visibility private
116
94
  def hash
117
- [limit, offset, sort_direction, sort_name, total_number_of_records].hash
95
+ [attributes].hash
118
96
  end
119
97
  end
120
98
  end
@@ -0,0 +1,27 @@
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 frequency at which report data is to be generated.
21
+ class SLOReportInterval
22
+ include BaseEnumModel
23
+
24
+ WEEKLY = "weekly".freeze
25
+ MONTHLY = "monthly".freeze
26
+ end
27
+ 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
+ # The SLO report response.
21
+ class SLOReportPostResponse
22
+ include BaseGenericModel
23
+
24
+ # The data portion of the SLO report response.
25
+ attr_accessor :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' => :'SLOReportPostResponseData'
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::SLOReportPostResponse` 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::SLOReportPostResponse`. 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
+ # 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
+ data == o.data
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [data].hash
78
+ end
79
+ end
80
+ 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
+ # The data portion of the SLO report response.
21
+ class SLOReportPostResponseData
22
+ include BaseGenericModel
23
+
24
+ # The ID of the report job.
25
+ attr_accessor :id
26
+
27
+ # The type of ID.
28
+ attr_accessor :type
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'id' => :'id',
35
+ :'type' => :'type'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'id' => :'String',
44
+ :'type' => :'String'
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::SLOReportPostResponseData` 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::SLOReportPostResponseData`. 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?(:'id')
65
+ self.id = attributes[:'id']
66
+ end
67
+
68
+ if attributes.key?(:'type')
69
+ self.type = attributes[:'type']
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
+ id == o.id &&
80
+ type == o.type
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [id, type].hash
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,29 @@
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 status of the SLO report job.
21
+ class SLOReportStatus
22
+ include BaseEnumModel
23
+
24
+ IN_PROGRESS = "in_progress".freeze
25
+ COMPLETED = "completed".freeze
26
+ COMPLETED_WITH_ERRORS = "completed_with_errors".freeze
27
+ FAILED = "failed".freeze
28
+ end
29
+ end