datadog_api_client 2.17.0 → 2.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +145 -5
  4. data/.generator/schemas/v2/openapi.yaml +1306 -45
  5. data/.generator/src/generator/cli.py +5 -0
  6. data/.generator/src/generator/templates/datadog_api_client.j2 +19 -0
  7. data/.pre-commit-config.yaml +1 -1
  8. data/CHANGELOG.md +25 -0
  9. data/examples/v1/aws-integration/CreateAWSAccount.rb +2 -2
  10. data/examples/v1/aws-integration/DeleteAWSAccount.rb +1 -1
  11. data/examples/v1/aws-integration/UpdateAWSAccount.rb +6 -6
  12. data/examples/v1/azure-integration/CreateAzureIntegration.rb +1 -0
  13. data/examples/v1/azure-integration/DeleteAzureIntegration.rb +1 -0
  14. data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +1 -0
  15. data/examples/v1/azure-integration/UpdateAzureIntegration.rb +1 -0
  16. data/examples/v1/dashboards/CreateDashboard_1284514532.rb +3 -0
  17. data/examples/v1/synthetics/PatchTest.rb +22 -0
  18. data/examples/v2/container-images/ListContainerImages.rb +0 -3
  19. data/examples/v2/container-images/ListContainerImages_3088586393.rb +0 -3
  20. data/examples/v2/container-images/ListContainerImages_3974828736.rb +0 -3
  21. data/examples/v2/containers/ListContainers.rb +0 -3
  22. data/examples/v2/containers/ListContainers_2175733917.rb +0 -3
  23. data/examples/v2/containers/ListContainers_931009654.rb +0 -3
  24. data/examples/v2/dora-metrics/CreateDORADeployment.rb +23 -0
  25. data/examples/v2/dora-metrics/CreateDORAIncident.rb +25 -0
  26. data/examples/v2/events/ListEvents.rb +0 -3
  27. data/examples/v2/events/ListEvents_1527584014.rb +0 -3
  28. data/examples/v2/events/ListEvents_2663715109.rb +0 -3
  29. data/examples/v2/events/SearchEvents.rb +0 -3
  30. data/examples/v2/events/SearchEvents_3856995058.rb +0 -3
  31. data/examples/v2/okta-integration/CreateOktaAccount.rb +19 -0
  32. data/examples/v2/okta-integration/DeleteOktaAccount.rb +5 -0
  33. data/examples/v2/okta-integration/GetOktaAccount.rb +8 -0
  34. data/examples/v2/okta-integration/ListOktaAccounts.rb +5 -0
  35. data/examples/v2/okta-integration/UpdateOktaAccount.rb +20 -0
  36. data/examples/v2/usage-metering/GetActiveBillingDimensions.rb +8 -0
  37. data/examples/v2/usage-metering/GetMonthlyCostAttribution.rb +8 -0
  38. data/examples/v2/usage-metering/GetProjectedCost.rb +8 -0
  39. data/lib/datadog_api_client/configuration.rb +4 -4
  40. data/lib/datadog_api_client/inflector.rb +61 -0
  41. data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -1
  42. data/lib/datadog_api_client/v1/api/synthetics_api.rb +73 -1
  43. data/lib/datadog_api_client/v1/models/azure_account.rb +13 -2
  44. data/lib/datadog_api_client/v1/models/synthetics_patch_test_body.rb +82 -0
  45. data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation.rb +100 -0
  46. data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation_name.rb +31 -0
  47. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +21 -1
  48. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +21 -1
  49. data/lib/datadog_api_client/v1/models/widget_live_span.rb +2 -0
  50. data/lib/datadog_api_client/v2/api/container_images_api.rb +0 -6
  51. data/lib/datadog_api_client/v2/api/containers_api.rb +0 -6
  52. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +181 -0
  53. data/lib/datadog_api_client/v2/api/events_api.rb +0 -12
  54. data/lib/datadog_api_client/v2/api/okta_integration_api.rb +355 -0
  55. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +241 -0
  56. data/lib/datadog_api_client/v2/models/active_billing_dimensions_attributes.rb +92 -0
  57. data/lib/datadog_api_client/v2/models/active_billing_dimensions_body.rb +100 -0
  58. data/lib/datadog_api_client/v2/models/active_billing_dimensions_response.rb +80 -0
  59. data/lib/datadog_api_client/v2/models/active_billing_dimensions_type.rb +26 -0
  60. data/lib/datadog_api_client/v2/models/api_keys_response.rb +14 -4
  61. data/lib/datadog_api_client/v2/models/api_keys_response_meta.rb +90 -0
  62. data/lib/datadog_api_client/v2/models/api_keys_response_meta_page.rb +80 -0
  63. data/lib/datadog_api_client/v2/models/application_key_response_meta.rb +90 -0
  64. data/lib/datadog_api_client/v2/models/application_key_response_meta_page.rb +80 -0
  65. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +13 -1
  66. data/lib/datadog_api_client/v2/models/cost_attribution_aggregates_body.rb +100 -0
  67. data/lib/datadog_api_client/v2/models/cost_attribution_type.rb +26 -0
  68. data/lib/datadog_api_client/v2/models/dora_deployment_request.rb +98 -0
  69. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +170 -0
  70. data/lib/datadog_api_client/v2/models/dora_deployment_request_data.rb +98 -0
  71. data/lib/datadog_api_client/v2/models/dora_deployment_response.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/dora_deployment_response_data.rb +108 -0
  73. data/lib/datadog_api_client/v2/models/dora_deployment_type.rb +26 -0
  74. data/lib/datadog_api_client/v2/models/dora_git_info.rb +125 -0
  75. data/lib/datadog_api_client/v2/models/dora_incident_request.rb +98 -0
  76. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +179 -0
  77. data/lib/datadog_api_client/v2/models/dora_incident_request_data.rb +98 -0
  78. data/lib/datadog_api_client/v2/models/dora_incident_response.rb +98 -0
  79. data/lib/datadog_api_client/v2/models/dora_incident_response_data.rb +108 -0
  80. data/lib/datadog_api_client/v2/models/dora_incident_type.rb +26 -0
  81. data/lib/datadog_api_client/v2/models/full_api_key_attributes.rb +24 -4
  82. data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +14 -4
  83. data/lib/datadog_api_client/v2/models/incident_create_relationships.rb +9 -19
  84. data/lib/datadog_api_client/v2/models/incident_impacts_type.rb +26 -0
  85. data/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +21 -1
  86. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +11 -1
  87. data/lib/datadog_api_client/v2/models/incident_integration_relationships.rb +90 -0
  88. data/lib/datadog_api_client/v2/models/incident_non_datadog_creator.rb +90 -0
  89. data/lib/datadog_api_client/v2/models/incident_responders_type.rb +26 -0
  90. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +69 -4
  91. data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +42 -4
  92. data/lib/datadog_api_client/v2/models/incident_severity.rb +31 -0
  93. data/lib/datadog_api_client/v2/models/incident_todo_attributes.rb +24 -4
  94. data/lib/datadog_api_client/v2/models/incident_todo_relationships.rb +90 -0
  95. data/lib/datadog_api_client/v2/models/incident_todo_response_data.rb +11 -1
  96. data/lib/datadog_api_client/v2/models/incident_update_relationships.rb +8 -0
  97. data/lib/datadog_api_client/v2/models/incident_user_defined_field_type.rb +26 -0
  98. data/lib/datadog_api_client/v2/models/list_application_keys_response.rb +14 -4
  99. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_attributes.rb +151 -0
  100. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_body.rb +100 -0
  101. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_meta.rb +92 -0
  102. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_pagination.rb +88 -0
  103. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_response.rb +92 -0
  104. data/lib/datadog_api_client/v2/models/okta_account.rb +129 -0
  105. data/lib/datadog_api_client/v2/models/okta_account_attributes.rb +170 -0
  106. data/lib/datadog_api_client/v2/models/okta_account_request.rb +98 -0
  107. data/lib/datadog_api_client/v2/models/okta_account_response.rb +80 -0
  108. data/lib/datadog_api_client/v2/models/okta_account_response_data.rb +140 -0
  109. data/lib/datadog_api_client/v2/models/okta_account_type.rb +26 -0
  110. data/lib/datadog_api_client/v2/models/okta_account_update_request.rb +98 -0
  111. data/lib/datadog_api_client/v2/models/okta_account_update_request_attributes.rb +149 -0
  112. data/lib/datadog_api_client/v2/models/okta_account_update_request_data.rb +90 -0
  113. data/lib/datadog_api_client/v2/models/okta_accounts_response.rb +82 -0
  114. data/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb +24 -4
  115. data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +2 -2
  116. data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +8 -0
  117. data/lib/datadog_api_client/v2/models/projected_cost.rb +100 -0
  118. data/lib/datadog_api_client/v2/models/projected_cost_attributes.rb +132 -0
  119. data/lib/datadog_api_client/v2/models/projected_cost_response.rb +82 -0
  120. data/lib/datadog_api_client/v2/models/projected_cost_type.rb +26 -0
  121. data/lib/datadog_api_client/v2/models/relationship_to_incident_impact_data.rb +119 -0
  122. data/lib/datadog_api_client/v2/models/relationship_to_incident_impacts.rb +100 -0
  123. data/lib/datadog_api_client/v2/models/relationship_to_incident_responder_data.rb +119 -0
  124. data/lib/datadog_api_client/v2/models/relationship_to_incident_responders.rb +100 -0
  125. data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_field_data.rb +119 -0
  126. data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_fields.rb +100 -0
  127. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb +1 -0
  128. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +13 -1
  129. data/lib/datadog_api_client/v2/models/sort_direction.rb +27 -0
  130. data/lib/datadog_api_client/version.rb +1 -1
  131. data/lib/datadog_api_client.rb +16 -1
  132. metadata +75 -2
@@ -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
+ # Cost data.
21
+ class MonthlyCostAttributionBody
22
+ include BaseGenericModel
23
+
24
+ # Cost Attribution by Tag for a given organization.
25
+ attr_accessor :attributes
26
+
27
+ # Unique ID of the response.
28
+ attr_accessor :id
29
+
30
+ # Type of cost attribution data.
31
+ attr_accessor :type
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'attributes' => :'attributes',
38
+ :'id' => :'id',
39
+ :'type' => :'type'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'attributes' => :'MonthlyCostAttributionAttributes',
48
+ :'id' => :'String',
49
+ :'type' => :'CostAttributionType'
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::MonthlyCostAttributionBody` 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::MonthlyCostAttributionBody`. 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?(:'attributes')
70
+ self.attributes = attributes[:'attributes']
71
+ end
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'type')
78
+ self.type = attributes[:'type']
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
+ attributes == o.attributes &&
89
+ id == o.id &&
90
+ type == o.type
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [attributes, id, type].hash
98
+ end
99
+ end
100
+ end
@@ -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
+ # The object containing document metadata.
21
+ class MonthlyCostAttributionMeta
22
+ include BaseGenericModel
23
+
24
+ # An array of available aggregates.
25
+ attr_accessor :aggregates
26
+
27
+ # The metadata for the current pagination.
28
+ attr_accessor :pagination
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'aggregates' => :'aggregates',
35
+ :'pagination' => :'pagination'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'aggregates' => :'Array<CostAttributionAggregatesBody>',
44
+ :'pagination' => :'MonthlyCostAttributionPagination'
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::MonthlyCostAttributionMeta` 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::MonthlyCostAttributionMeta`. 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?(:'aggregates')
65
+ if (value = attributes[:'aggregates']).is_a?(Array)
66
+ self.aggregates = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'pagination')
71
+ self.pagination = attributes[:'pagination']
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
+ aggregates == o.aggregates &&
82
+ pagination == o.pagination
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Integer] Hash code
87
+ # @!visibility private
88
+ def hash
89
+ [aggregates, pagination].hash
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,88 @@
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 metadata for the current pagination.
21
+ class MonthlyCostAttributionPagination
22
+ include BaseGenericModel
23
+
24
+ # The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of the `next_record_id`.
25
+ attr_accessor :next_record_id
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'next_record_id' => :'next_record_id'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'next_record_id' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ # @!visibility private
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ :'next_record_id',
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param attributes [Hash] Model attributes in the form of hash
53
+ # @!visibility private
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonthlyCostAttributionPagination` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonthlyCostAttributionPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'next_record_id')
68
+ self.next_record_id = attributes[:'next_record_id']
69
+ end
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param o [Object] Object to be compared
74
+ # @!visibility private
75
+ def ==(o)
76
+ return true if self.equal?(o)
77
+ self.class == o.class &&
78
+ next_record_id == o.next_record_id
79
+ end
80
+
81
+ # Calculates hash code according to all attributes.
82
+ # @return [Integer] Hash code
83
+ # @!visibility private
84
+ def hash
85
+ [next_record_id].hash
86
+ end
87
+ end
88
+ end
@@ -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 containing the monthly cost attribution by tag(s).
21
+ class MonthlyCostAttributionResponse
22
+ include BaseGenericModel
23
+
24
+ # Response containing cost attribution.
25
+ attr_accessor :data
26
+
27
+ # The object containing document metadata.
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<MonthlyCostAttributionBody>',
44
+ :'meta' => :'MonthlyCostAttributionMeta'
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::MonthlyCostAttributionResponse` 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::MonthlyCostAttributionResponse`. 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,129 @@
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
+ # Schema for an Okta account.
21
+ class OktaAccount
22
+ include BaseGenericModel
23
+
24
+ # Attributes object for an Okta account.
25
+ attr_reader :attributes
26
+
27
+ # The ID of the Okta account, a UUID hash of the account name.
28
+ attr_accessor :id
29
+
30
+ # Account type for an Okta account.
31
+ attr_reader :type
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'attributes' => :'attributes',
38
+ :'id' => :'id',
39
+ :'type' => :'type'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'attributes' => :'OktaAccountAttributes',
48
+ :'id' => :'String',
49
+ :'type' => :'OktaAccountType'
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::OktaAccount` 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::OktaAccount`. 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?(:'attributes')
70
+ self.attributes = attributes[:'attributes']
71
+ end
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'type')
78
+ self.type = attributes[:'type']
79
+ end
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ # @!visibility private
85
+ def valid?
86
+ return false if @attributes.nil?
87
+ return false if @type.nil?
88
+ true
89
+ end
90
+
91
+ # Custom attribute writer method with validation
92
+ # @param attributes [Object] Object to be assigned
93
+ # @!visibility private
94
+ def attributes=(attributes)
95
+ if attributes.nil?
96
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
97
+ end
98
+ @attributes = attributes
99
+ end
100
+
101
+ # Custom attribute writer method with validation
102
+ # @param type [Object] Object to be assigned
103
+ # @!visibility private
104
+ def type=(type)
105
+ if type.nil?
106
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
107
+ end
108
+ @type = type
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param o [Object] Object to be compared
113
+ # @!visibility private
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ attributes == o.attributes &&
118
+ id == o.id &&
119
+ type == o.type
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ # @!visibility private
125
+ def hash
126
+ [attributes, id, type].hash
127
+ end
128
+ end
129
+ end
@@ -0,0 +1,170 @@
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 object for an Okta account.
21
+ class OktaAccountAttributes
22
+ include BaseGenericModel
23
+
24
+ # The API key of the Okta account.
25
+ attr_accessor :api_key
26
+
27
+ # The authorization method for an Okta account.
28
+ attr_reader :auth_method
29
+
30
+ # The Client ID of an Okta app integration.
31
+ attr_accessor :client_id
32
+
33
+ # The client secret of an Okta app integration.
34
+ attr_accessor :client_secret
35
+
36
+ # The domain of the Okta account.
37
+ attr_reader :domain
38
+
39
+ # The name of the Okta account.
40
+ attr_reader :name
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ # @!visibility private
44
+ def self.attribute_map
45
+ {
46
+ :'api_key' => :'api_key',
47
+ :'auth_method' => :'auth_method',
48
+ :'client_id' => :'client_id',
49
+ :'client_secret' => :'client_secret',
50
+ :'domain' => :'domain',
51
+ :'name' => :'name'
52
+ }
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ # @!visibility private
57
+ def self.openapi_types
58
+ {
59
+ :'api_key' => :'String',
60
+ :'auth_method' => :'String',
61
+ :'client_id' => :'String',
62
+ :'client_secret' => :'String',
63
+ :'domain' => :'String',
64
+ :'name' => :'String'
65
+ }
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param attributes [Hash] Model attributes in the form of hash
70
+ # @!visibility private
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccountAttributes` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!self.class.attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccountAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'api_key')
85
+ self.api_key = attributes[:'api_key']
86
+ end
87
+
88
+ if attributes.key?(:'auth_method')
89
+ self.auth_method = attributes[:'auth_method']
90
+ end
91
+
92
+ if attributes.key?(:'client_id')
93
+ self.client_id = attributes[:'client_id']
94
+ end
95
+
96
+ if attributes.key?(:'client_secret')
97
+ self.client_secret = attributes[:'client_secret']
98
+ end
99
+
100
+ if attributes.key?(:'domain')
101
+ self.domain = attributes[:'domain']
102
+ end
103
+
104
+ if attributes.key?(:'name')
105
+ self.name = attributes[:'name']
106
+ end
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ # @!visibility private
112
+ def valid?
113
+ return false if @auth_method.nil?
114
+ return false if @domain.nil?
115
+ return false if @name.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param auth_method [Object] Object to be assigned
121
+ # @!visibility private
122
+ def auth_method=(auth_method)
123
+ if auth_method.nil?
124
+ fail ArgumentError, 'invalid value for "auth_method", auth_method cannot be nil.'
125
+ end
126
+ @auth_method = auth_method
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param domain [Object] Object to be assigned
131
+ # @!visibility private
132
+ def domain=(domain)
133
+ if domain.nil?
134
+ fail ArgumentError, 'invalid value for "domain", domain cannot be nil.'
135
+ end
136
+ @domain = domain
137
+ end
138
+
139
+ # Custom attribute writer method with validation
140
+ # @param name [Object] Object to be assigned
141
+ # @!visibility private
142
+ def name=(name)
143
+ if name.nil?
144
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
145
+ end
146
+ @name = name
147
+ end
148
+
149
+ # Checks equality by comparing each attribute.
150
+ # @param o [Object] Object to be compared
151
+ # @!visibility private
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ api_key == o.api_key &&
156
+ auth_method == o.auth_method &&
157
+ client_id == o.client_id &&
158
+ client_secret == o.client_secret &&
159
+ domain == o.domain &&
160
+ name == o.name
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ # @!visibility private
166
+ def hash
167
+ [api_key, auth_method, client_id, client_secret, domain, name].hash
168
+ end
169
+ end
170
+ end