datadog_api_client 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +233 -14
  4. data/.generator/schemas/v2/openapi.yaml +1403 -151
  5. data/CHANGELOG.md +27 -0
  6. data/examples/v1/dashboards/CreateDashboard_1039800684.rb +37 -0
  7. data/examples/v1/dashboards/CreateDashboard_2432046716.rb +33 -0
  8. data/examples/v1/dashboards/CreateDashboard_2610827685.rb +38 -0
  9. data/examples/v1/dashboards/CreateDashboard_2843286292.rb +43 -0
  10. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +1 -0
  11. data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +1 -0
  12. data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +1 -0
  13. data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
  14. data/examples/v1/monitors/ValidateMonitor.rb +1 -0
  15. data/examples/v1/service-level-objectives/CreateSLO.rb +2 -2
  16. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +16 -0
  17. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
  18. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +74 -0
  19. data/examples/v1/synthetics/UpdateBrowserTest.rb +16 -0
  20. data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +16 -0
  21. data/examples/v2/cloudflare-integration/DeleteCloudflareAccount.rb +5 -0
  22. data/examples/v2/cloudflare-integration/GetCloudflareAccount.rb +8 -0
  23. data/examples/v2/cloudflare-integration/ListCloudflareAccounts.rb +5 -0
  24. data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +18 -0
  25. data/examples/v2/fastly-integration/CreateFastlyAccount.rb +16 -0
  26. data/examples/v2/fastly-integration/CreateFastlyService.rb +18 -0
  27. data/examples/v2/fastly-integration/DeleteFastlyAccount.rb +5 -0
  28. data/examples/v2/fastly-integration/DeleteFastlyService.rb +5 -0
  29. data/examples/v2/fastly-integration/GetFastlyAccount.rb +8 -0
  30. data/examples/v2/fastly-integration/GetFastlyService.rb +5 -0
  31. data/examples/v2/fastly-integration/ListFastlyAccounts.rb +5 -0
  32. data/examples/v2/fastly-integration/ListFastlyServices.rb +5 -0
  33. data/examples/v2/fastly-integration/UpdateFastlyAccount.rb +17 -0
  34. data/examples/v2/fastly-integration/UpdateFastlyService.rb +18 -0
  35. data/examples/v2/metrics/QueryScalarData.rb +5 -6
  36. data/examples/v2/metrics/QueryScalarData_3112571352.rb +35 -0
  37. data/examples/v2/metrics/QueryTimeseriesData.rb +5 -6
  38. data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +35 -0
  39. data/examples/v2/monitors/CreateMonitorConfigPolicy.rb +22 -0
  40. data/examples/v2/monitors/DeleteMonitorConfigPolicy.rb +8 -0
  41. data/examples/v2/monitors/GetMonitorConfigPolicy.rb +8 -0
  42. data/examples/v2/monitors/ListMonitorConfigPolicies.rb +5 -0
  43. data/examples/v2/monitors/UpdateMonitorConfigPolicy.rb +26 -0
  44. data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +6 -0
  45. data/examples/v2/{users → service-accounts}/CreateServiceAccount.rb +1 -1
  46. data/lib/datadog_api_client/inflector.rb +61 -0
  47. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  48. data/lib/datadog_api_client/v1/models/gcp_account.rb +11 -1
  49. data/lib/datadog_api_client/v1/models/host_meta.rb +1 -1
  50. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -1
  51. data/lib/datadog_api_client/v1/models/list_stream_compute_aggregation.rb +40 -0
  52. data/lib/datadog_api_client/v1/models/list_stream_compute_items.rb +112 -0
  53. data/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb +102 -0
  54. data/lib/datadog_api_client/v1/models/list_stream_query.rb +61 -1
  55. data/lib/datadog_api_client/v1/models/list_stream_source.rb +2 -0
  56. data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +3 -2
  57. data/lib/datadog_api_client/v1/models/monitor_options.rb +11 -1
  58. data/lib/datadog_api_client/v1/models/monitor_options_notification_presets.rb +29 -0
  59. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -2
  60. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +13 -13
  61. data/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb +187 -0
  62. data/lib/datadog_api_client/v1/models/run_workflow_widget_definition_type.rb +26 -0
  63. data/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb +123 -0
  64. data/lib/datadog_api_client/v1/models/synthetics_config_variable.rb +1 -1
  65. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
  66. data/lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb +28 -0
  67. data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb +103 -0
  68. data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb +126 -0
  69. data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -0
  70. data/lib/datadog_api_client/v2/api/cloudflare_integration_api.rb +355 -0
  71. data/lib/datadog_api_client/v2/api/fastly_integration_api.rb +709 -0
  72. data/lib/datadog_api_client/v2/api/metrics_api.rb +7 -6
  73. data/lib/datadog_api_client/v2/api/monitors_api.rb +355 -0
  74. data/lib/datadog_api_client/v2/api/service_accounts_api.rb +67 -0
  75. data/lib/datadog_api_client/v2/api/users_api.rb +0 -67
  76. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb +102 -0
  77. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +133 -0
  78. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb +123 -0
  79. data/lib/datadog_api_client/v2/models/cloudflare_account_response.rb +91 -0
  80. data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +112 -0
  81. data/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb +144 -0
  82. data/lib/datadog_api_client/v2/models/cloudflare_account_type.rb +26 -0
  83. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb +102 -0
  84. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +112 -0
  85. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb +101 -0
  86. data/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb +93 -0
  87. data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +11 -1
  88. data/lib/datadog_api_client/v2/models/data_scalar_column.rb +123 -0
  89. data/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb +114 -0
  90. data/lib/datadog_api_client/v2/models/fastly_account_create_request.rb +102 -0
  91. data/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb +135 -0
  92. data/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb +123 -0
  93. data/lib/datadog_api_client/v2/models/fastly_account_response.rb +91 -0
  94. data/lib/datadog_api_client/v2/models/fastly_account_response_data.rb +144 -0
  95. data/lib/datadog_api_client/v2/models/fastly_account_type.rb +26 -0
  96. data/lib/datadog_api_client/v2/models/fastly_account_update_request.rb +102 -0
  97. data/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb +91 -0
  98. data/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb +101 -0
  99. data/lib/datadog_api_client/v2/models/fastly_accounts_response.rb +93 -0
  100. data/lib/datadog_api_client/v2/models/fastly_service.rb +114 -0
  101. data/lib/datadog_api_client/v2/models/fastly_service_attributes.rb +93 -0
  102. data/lib/datadog_api_client/v2/models/fastly_service_data.rb +133 -0
  103. data/lib/datadog_api_client/v2/models/fastly_service_request.rb +102 -0
  104. data/lib/datadog_api_client/v2/models/fastly_service_response.rb +91 -0
  105. data/lib/datadog_api_client/v2/models/fastly_service_type.rb +26 -0
  106. data/lib/datadog_api_client/v2/models/fastly_services_response.rb +93 -0
  107. data/lib/datadog_api_client/v2/models/group_scalar_column.rb +113 -0
  108. data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb +123 -0
  109. data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb +123 -0
  110. data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb +101 -0
  111. data/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb +123 -0
  112. data/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb +102 -0
  113. data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb +144 -0
  114. data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb +102 -0
  115. data/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb +93 -0
  116. data/lib/datadog_api_client/v2/models/monitor_config_policy_policy.rb +62 -0
  117. data/lib/datadog_api_client/v2/models/monitor_config_policy_policy_create_request.rb +62 -0
  118. data/lib/datadog_api_client/v2/models/monitor_config_policy_resource_type.rb +26 -0
  119. data/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb +91 -0
  120. data/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb +111 -0
  121. data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb +124 -0
  122. data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb +150 -0
  123. data/lib/datadog_api_client/v2/models/monitor_config_policy_type.rb +26 -0
  124. data/lib/datadog_api_client/v2/models/scalar_column.rb +35 -77
  125. data/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb +4 -16
  126. data/lib/datadog_api_client/v2/models/scalar_meta.rb +96 -0
  127. data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
  128. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
  129. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +11 -1
  130. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +11 -1
  131. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +22 -9
  132. data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +4 -1
  133. data/lib/datadog_api_client/version.rb +1 -1
  134. metadata +91 -3
@@ -0,0 +1,133 @@
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 object for Fastly service requests.
21
+ class FastlyServiceData
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Attributes object for Fastly service requests.
29
+ attr_accessor :attributes
30
+
31
+ # The ID of the Fastly service.
32
+ attr_reader :id
33
+
34
+ # The JSON:API type for this API. Should always be `fastly-services`.
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' => :'FastlyServiceAttributes',
52
+ :'id' => :'String',
53
+ :'type' => :'FastlyServiceType'
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::FastlyServiceData` 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::FastlyServiceData`. 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 @id.nil?
91
+ return false if @type.nil?
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param id [Object] Object to be assigned
97
+ # @!visibility private
98
+ def id=(id)
99
+ if id.nil?
100
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
101
+ end
102
+ @id = id
103
+ end
104
+
105
+ # Custom attribute writer method with validation
106
+ # @param type [Object] Object to be assigned
107
+ # @!visibility private
108
+ def type=(type)
109
+ if type.nil?
110
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
111
+ end
112
+ @type = type
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param o [Object] Object to be compared
117
+ # @!visibility private
118
+ def ==(o)
119
+ return true if self.equal?(o)
120
+ self.class == o.class &&
121
+ attributes == o.attributes &&
122
+ id == o.id &&
123
+ type == o.type
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ # @!visibility private
129
+ def hash
130
+ [attributes, id, type].hash
131
+ end
132
+ end
133
+ 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
+ # Payload schema for Fastly service requests.
21
+ class FastlyServiceRequest
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Data object for Fastly service requests.
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' => :'FastlyServiceData'
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::FastlyServiceRequest` 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::FastlyServiceRequest`. 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,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
+ # The expected response schema when getting a Fastly service.
21
+ class FastlyServiceResponse
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Data object for Fastly service requests.
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' => :'FastlyServiceData'
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::FastlyServiceResponse` 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::FastlyServiceResponse`. 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
+ # The JSON:API type for this API. Should always be `fastly-services`.
21
+ class FastlyServiceType
22
+ include BaseEnumModel
23
+
24
+ FASTLY_SERVICES = "fastly-services".freeze
25
+ end
26
+ end
@@ -0,0 +1,93 @@
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 expected response schema when getting Fastly services.
21
+ class FastlyServicesResponse
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The JSON:API data schema.
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' => :'Array<FastlyServiceResponse>'
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::FastlyServicesResponse` 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::FastlyServicesResponse`. 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
+ if (value = attributes[:'data']).is_a?(Array)
65
+ self.data = 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
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param o [Object] Object to be compared
79
+ # @!visibility private
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ data == o.data
84
+ end
85
+
86
+ # Calculates hash code according to all attributes.
87
+ # @return [Integer] Hash code
88
+ # @!visibility private
89
+ def hash
90
+ [data].hash
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,113 @@
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 column containing the tag keys and values in a group.
21
+ class GroupScalarColumn
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The name of the tag key or group.
29
+ attr_accessor :name
30
+
31
+ # The type of column present.
32
+ attr_accessor :type
33
+
34
+ # The array of tag values for each group found for the results of the formulas or queries.
35
+ attr_accessor :values
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'name' => :'name',
42
+ :'type' => :'type',
43
+ :'values' => :'values'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'name' => :'String',
52
+ :'type' => :'String',
53
+ :'values' => :'Array<Array<String>>'
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::GroupScalarColumn` 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::GroupScalarColumn`. 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?(:'name')
74
+ self.name = attributes[:'name']
75
+ end
76
+
77
+ if attributes.key?(:'type')
78
+ self.type = attributes[:'type']
79
+ end
80
+
81
+ if attributes.key?(:'values')
82
+ if (value = attributes[:'values']).is_a?(Array)
83
+ self.values = value
84
+ end
85
+ end
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ # @!visibility private
91
+ def valid?
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param o [Object] Object to be compared
97
+ # @!visibility private
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ name == o.name &&
102
+ type == o.type &&
103
+ values == o.values
104
+ end
105
+
106
+ # Calculates hash code according to all attributes.
107
+ # @return [Integer] Hash code
108
+ # @!visibility private
109
+ def hash
110
+ [name, type, values].hash
111
+ end
112
+ end
113
+ 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
+ # Policy and policy type for a monitor configuration policy.
21
+ class MonitorConfigPolicyAttributeCreateRequest
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Configuration for the policy.
29
+ attr_reader :policy
30
+
31
+ # The monitor configuration policy type.
32
+ attr_reader :policy_type
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ # @!visibility private
36
+ def self.attribute_map
37
+ {
38
+ :'policy' => :'policy',
39
+ :'policy_type' => :'policy_type'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'policy' => :'MonitorConfigPolicyPolicyCreateRequest',
48
+ :'policy_type' => :'MonitorConfigPolicyType'
49
+ }
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param attributes [Hash] Model attributes in the form of hash
54
+ # @!visibility private
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeCreateRequest` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'policy')
69
+ self.policy = attributes[:'policy']
70
+ end
71
+
72
+ if attributes.key?(:'policy_type')
73
+ self.policy_type = attributes[:'policy_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 @policy.nil?
82
+ return false if @policy_type.nil?
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param policy [Object] Object to be assigned
88
+ # @!visibility private
89
+ def policy=(policy)
90
+ if policy.nil?
91
+ fail ArgumentError, 'invalid value for "policy", policy cannot be nil.'
92
+ end
93
+ @policy = policy
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param policy_type [Object] Object to be assigned
98
+ # @!visibility private
99
+ def policy_type=(policy_type)
100
+ if policy_type.nil?
101
+ fail ArgumentError, 'invalid value for "policy_type", policy_type cannot be nil.'
102
+ end
103
+ @policy_type = policy_type
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
+ policy == o.policy &&
113
+ policy_type == o.policy_type
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [policy, policy_type].hash
121
+ end
122
+ end
123
+ end