datadog_api_client 2.15.0 → 2.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +6 -6
- data/.generator/schemas/v1/openapi.yaml +643 -123
- data/.generator/schemas/v2/openapi.yaml +1815 -195
- data/.generator/src/generator/templates/api_client.j2 +19 -1
- data/.generator/src/generator/templates/model_base.j2 +1 -0
- data/CHANGELOG.md +30 -0
- data/examples/v1/dashboards/CreateDashboard_1754992756.rb +44 -0
- data/examples/v1/dashboards/CreateDashboard_2278756614.rb +91 -0
- data/examples/v1/monitors/CreateMonitor_1539578087.rb +36 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +1 -1
- data/examples/v1/usage-metering/GetUsageCIApp.rb +4 -1
- data/examples/v1/usage-metering/GetUsageCWS.rb +4 -1
- data/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.rb +1 -1
- data/examples/v2/apm-retention-filters/CreateApmRetentionFilter.rb +20 -0
- data/examples/v2/apm-retention-filters/DeleteApmRetentionFilter.rb +8 -0
- data/examples/v2/apm-retention-filters/GetApmRetentionFilter.rb +8 -0
- data/examples/v2/apm-retention-filters/ListApmRetentionFilters.rb +5 -0
- data/examples/v2/apm-retention-filters/ReorderApmRetentionFilters.rb +18 -0
- data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +24 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -8
- data/examples/v2/container-images/ListContainerImages.rb +8 -0
- data/examples/v2/container-images/ListContainerImages_3088586393.rb +11 -0
- data/examples/v2/container-images/ListContainerImages_3974828736.rb +11 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +19 -0
- data/examples/v2/powerpack/CreatePowerpack.rb +47 -0
- data/examples/v2/powerpack/DeletePowerpack.rb +8 -0
- data/examples/v2/powerpack/GetPowerpack.rb +8 -0
- data/examples/v2/powerpack/ListPowerpacks.rb +8 -0
- data/examples/v2/powerpack/ListPowerpacks_1173755071.rb +8 -0
- data/examples/v2/powerpack/UpdatePowerpack.rb +50 -0
- data/examples/v2/rum/CreateRUMApplication.rb +1 -1
- data/examples/v2/service-accounts/CreateServiceAccountApplicationKey.rb +5 -7
- data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.rb +7 -1
- data/examples/v2/service-accounts/GetServiceAccountApplicationKey.rb +7 -1
- data/examples/v2/service-accounts/ListServiceAccountApplicationKeys.rb +4 -1
- data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.rb +11 -9
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +23 -12
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2621709423.rb +53 -0
- data/lib/datadog_api_client/api_client.rb +19 -1
- data/lib/datadog_api_client/configuration.rb +1 -1
- data/lib/datadog_api_client/inflector.rb +80 -0
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -20
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
- data/lib/datadog_api_client/v1/api/webhooks_integration_api.rb +1 -1
- data/lib/datadog_api_client/v1/model_base.rb +1 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +6 -4
- data/lib/datadog_api_client/v1/models/ip_prefixes_global.rb +94 -0
- data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
- data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule.rb +82 -0
- data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule_recurrence.rb +100 -0
- data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb +11 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +45 -5
- data/lib/datadog_api_client/v1/models/powerpack_template_variable_contents.rb +131 -0
- data/lib/datadog_api_client/v1/models/powerpack_template_variables.rb +94 -0
- data/lib/datadog_api_client/v1/models/powerpack_widget_definition.rb +169 -0
- data/lib/datadog_api_client/v1/models/powerpack_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/split_config.rb +181 -0
- data/lib/datadog_api_client/v1/models/split_config_sort_compute.rb +119 -0
- data/lib/datadog_api_client/v1/models/split_dimension.rb +98 -0
- data/lib/datadog_api_client/v1/models/split_graph_source_widget_definition.rb +70 -0
- data/lib/datadog_api_client/v1/models/split_graph_viz_size.rb +29 -0
- data/lib/datadog_api_client/v1/models/split_graph_widget_definition.rb +191 -0
- data/lib/datadog_api_client/v1/models/split_graph_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/split_sort.rb +108 -0
- data/lib/datadog_api_client/v1/models/split_vector_entry_item.rb +125 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +4 -4
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +8 -8
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb +2 -2
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +148 -8
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +148 -8
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +148 -8
- data/lib/datadog_api_client/v1/models/widget_definition.rb +8 -6
- data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +423 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +4 -10
- data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/container_images_api.rb +129 -0
- data/lib/datadog_api_client/v2/api/incidents_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/powerpack_api.rb +383 -0
- data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/model_base.rb +1 -0
- data/lib/datadog_api_client/v2/models/apm_retention_filter_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image.rb +100 -0
- data/lib/datadog_api_client/v2/models/container_image_attributes.rb +261 -0
- data/lib/datadog_api_client/v2/models/container_image_flavor.rb +120 -0
- data/lib/datadog_api_client/v2/models/container_image_group.rb +110 -0
- data/lib/datadog_api_client/v2/models/container_image_group_attributes.rb +100 -0
- data/lib/datadog_api_client/v2/models/container_image_group_images_relationships_link.rb +92 -0
- data/lib/datadog_api_client/v2/models/container_image_group_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_image_group_relationships_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_image_group_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image_item.rb +63 -0
- data/lib/datadog_api_client/v2/models/container_image_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_image_meta_page.rb +160 -0
- data/lib/datadog_api_client/v2/models/container_image_meta_page_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image_vulnerabilities.rb +140 -0
- data/lib/datadog_api_client/v2/models/container_images_response.rb +102 -0
- data/lib/datadog_api_client/v2/models/container_images_response_links.rb +130 -0
- data/lib/datadog_api_client/v2/models/data_scalar_column.rb +2 -2
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/group_scalar_column.rb +2 -2
- data/lib/datadog_api_client/v2/models/list_powerpacks_response.rb +114 -0
- data/lib/datadog_api_client/v2/models/powerpack.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpack_attributes.rb +164 -0
- data/lib/datadog_api_client/v2/models/powerpack_data.rb +110 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +108 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget_definition.rb +162 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget_layout.rb +177 -0
- data/lib/datadog_api_client/v2/models/powerpack_inner_widget_layout.rb +177 -0
- data/lib/datadog_api_client/v2/models/powerpack_inner_widgets.rb +108 -0
- data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpack_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/powerpack_response_links.rb +129 -0
- data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +110 -0
- data/lib/datadog_api_client/v2/models/powerpacks_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +150 -0
- data/lib/datadog_api_client/v2/models/reorder_retention_filters_request.rb +100 -0
- data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +1 -1
- data/lib/datadog_api_client/v2/models/retention_filter.rb +140 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all.rb +140 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb +181 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/retention_filter_attributes.rb +181 -0
- data/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb +183 -0
- data/lib/datadog_api_client/v2/models/retention_filter_create_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/retention_filter_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/retention_filter_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/retention_filter_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +140 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/retention_filter_without_attributes.rb +119 -0
- data/lib/datadog_api_client/v2/models/retention_filters_response.rb +100 -0
- data/lib/datadog_api_client/v2/models/scalar_column_type_group.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_column_type_number.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_meta.rb +8 -0
- data/lib/datadog_api_client/v2/models/service_definition_schema.rb +2 -1
- data/lib/datadog_api_client/v2/models/service_definition_schema_versions.rb +1 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +247 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_contact.rb +129 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_integrations.rb +90 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_link.rb +150 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie.rb +108 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie_region.rb +27 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_pagerduty.rb +80 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_type.rb +32 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_version.rb +26 -0
- data/lib/datadog_api_client/v2/models/service_definitions_create_request.rb +1 -0
- data/lib/datadog_api_client/v2/models/spans_filter.rb +80 -0
- data/lib/datadog_api_client/v2/models/spans_filter_create.rb +98 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/run-tests.sh +6 -5
- metadata +102 -9
- data/examples/v1/usage-metering/GetUsageCIApp_1064440884.rb +0 -8
- data/examples/v1/usage-metering/GetUsageCWS_736958514.rb +0 -8
- data/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.rb +0 -17
- data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey_992091161.rb +0 -11
- data/examples/v2/service-accounts/GetServiceAccountApplicationKey_819075131.rb +0 -11
- data/examples/v2/service-accounts/ListServiceAccountApplicationKeys_1268914341.rb +0 -8
- data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey_768415790.rb +0 -22
@@ -0,0 +1,131 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V1 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::V1
|
20
|
+
# Powerpack template variable contents.
|
21
|
+
class PowerpackTemplateVariableContents
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The name of the variable.
|
25
|
+
attr_reader :name
|
26
|
+
|
27
|
+
# The tag prefix associated with the variable.
|
28
|
+
attr_accessor :prefix
|
29
|
+
|
30
|
+
# One or many template variable values within the saved view, which will be unioned together using `OR` if more than one is specified.
|
31
|
+
attr_reader :values
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
# @!visibility private
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'name' => :'name',
|
38
|
+
:'prefix' => :'prefix',
|
39
|
+
:'values' => :'values'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
# @!visibility private
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'name' => :'String',
|
48
|
+
:'prefix' => :'String',
|
49
|
+
:'values' => :'Array<String>'
|
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::V1::PowerpackTemplateVariableContents` 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::V1::PowerpackTemplateVariableContents`. 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?(:'name')
|
70
|
+
self.name = attributes[:'name']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'prefix')
|
74
|
+
self.prefix = attributes[:'prefix']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'values')
|
78
|
+
if (value = attributes[:'values']).is_a?(Array)
|
79
|
+
self.values = value
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
# @!visibility private
|
87
|
+
def valid?
|
88
|
+
return false if @name.nil?
|
89
|
+
return false if @values.nil?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Custom attribute writer method with validation
|
94
|
+
# @param name [Object] Object to be assigned
|
95
|
+
# @!visibility private
|
96
|
+
def name=(name)
|
97
|
+
if name.nil?
|
98
|
+
fail ArgumentError, 'invalid value for "name", name cannot be nil.'
|
99
|
+
end
|
100
|
+
@name = name
|
101
|
+
end
|
102
|
+
|
103
|
+
# Custom attribute writer method with validation
|
104
|
+
# @param values [Object] Object to be assigned
|
105
|
+
# @!visibility private
|
106
|
+
def values=(values)
|
107
|
+
if values.nil?
|
108
|
+
fail ArgumentError, 'invalid value for "values", values cannot be nil.'
|
109
|
+
end
|
110
|
+
@values = values
|
111
|
+
end
|
112
|
+
|
113
|
+
# Checks equality by comparing each attribute.
|
114
|
+
# @param o [Object] Object to be compared
|
115
|
+
# @!visibility private
|
116
|
+
def ==(o)
|
117
|
+
return true if self.equal?(o)
|
118
|
+
self.class == o.class &&
|
119
|
+
name == o.name &&
|
120
|
+
prefix == o.prefix &&
|
121
|
+
values == o.values
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
# @!visibility private
|
127
|
+
def hash
|
128
|
+
[name, prefix, values].hash
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V1 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::V1
|
20
|
+
# Powerpack template variables.
|
21
|
+
class PowerpackTemplateVariables
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Template variables controlled at the powerpack level.
|
25
|
+
attr_accessor :controlled_by_powerpack
|
26
|
+
|
27
|
+
# Template variables controlled by the external resource, such as the dashboard this powerpack is on.
|
28
|
+
attr_accessor :controlled_externally
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
# @!visibility private
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'controlled_by_powerpack' => :'controlled_by_powerpack',
|
35
|
+
:'controlled_externally' => :'controlled_externally'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'controlled_by_powerpack' => :'Array<PowerpackTemplateVariableContents>',
|
44
|
+
:'controlled_externally' => :'Array<PowerpackTemplateVariableContents>'
|
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::V1::PowerpackTemplateVariables` 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::V1::PowerpackTemplateVariables`. 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?(:'controlled_by_powerpack')
|
65
|
+
if (value = attributes[:'controlled_by_powerpack']).is_a?(Array)
|
66
|
+
self.controlled_by_powerpack = value
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'controlled_externally')
|
71
|
+
if (value = attributes[:'controlled_externally']).is_a?(Array)
|
72
|
+
self.controlled_externally = value
|
73
|
+
end
|
74
|
+
end
|
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
|
+
controlled_by_powerpack == o.controlled_by_powerpack &&
|
84
|
+
controlled_externally == o.controlled_externally
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculates hash code according to all attributes.
|
88
|
+
# @return [Integer] Hash code
|
89
|
+
# @!visibility private
|
90
|
+
def hash
|
91
|
+
[controlled_by_powerpack, controlled_externally].hash
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,169 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V1 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::V1
|
20
|
+
# The powerpack widget allows you to keep similar graphs together on your timeboard. Each group has a custom header, can hold one to many graphs, and is collapsible.
|
21
|
+
class PowerpackWidgetDefinition
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Background color of the powerpack title.
|
25
|
+
attr_accessor :background_color
|
26
|
+
|
27
|
+
# URL of image to display as a banner for the powerpack.
|
28
|
+
attr_accessor :banner_img
|
29
|
+
|
30
|
+
# UUID of the associated powerpack.
|
31
|
+
attr_reader :powerpack_id
|
32
|
+
|
33
|
+
# Whether to show the title or not.
|
34
|
+
attr_accessor :show_title
|
35
|
+
|
36
|
+
# Powerpack template variables.
|
37
|
+
attr_accessor :template_variables
|
38
|
+
|
39
|
+
# Title of the widget.
|
40
|
+
attr_accessor :title
|
41
|
+
|
42
|
+
# Type of the powerpack widget.
|
43
|
+
attr_reader :type
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
# @!visibility private
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'background_color' => :'background_color',
|
50
|
+
:'banner_img' => :'banner_img',
|
51
|
+
:'powerpack_id' => :'powerpack_id',
|
52
|
+
:'show_title' => :'show_title',
|
53
|
+
:'template_variables' => :'template_variables',
|
54
|
+
:'title' => :'title',
|
55
|
+
:'type' => :'type'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
# @!visibility private
|
61
|
+
def self.openapi_types
|
62
|
+
{
|
63
|
+
:'background_color' => :'String',
|
64
|
+
:'banner_img' => :'String',
|
65
|
+
:'powerpack_id' => :'String',
|
66
|
+
:'show_title' => :'Boolean',
|
67
|
+
:'template_variables' => :'PowerpackTemplateVariables',
|
68
|
+
:'title' => :'String',
|
69
|
+
:'type' => :'PowerpackWidgetDefinitionType'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# Initializes the object
|
74
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
75
|
+
# @!visibility private
|
76
|
+
def initialize(attributes = {})
|
77
|
+
if (!attributes.is_a?(Hash))
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PowerpackWidgetDefinition` initialize method"
|
79
|
+
end
|
80
|
+
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
82
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
83
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::PowerpackWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
85
|
+
end
|
86
|
+
h[k.to_sym] = v
|
87
|
+
}
|
88
|
+
|
89
|
+
if attributes.key?(:'background_color')
|
90
|
+
self.background_color = attributes[:'background_color']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'banner_img')
|
94
|
+
self.banner_img = attributes[:'banner_img']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'powerpack_id')
|
98
|
+
self.powerpack_id = attributes[:'powerpack_id']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'show_title')
|
102
|
+
self.show_title = attributes[:'show_title']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'template_variables')
|
106
|
+
self.template_variables = attributes[:'template_variables']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'title')
|
110
|
+
self.title = attributes[:'title']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'type')
|
114
|
+
self.type = attributes[:'type']
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Check to see if the all the properties in the model are valid
|
119
|
+
# @return true if the model is valid
|
120
|
+
# @!visibility private
|
121
|
+
def valid?
|
122
|
+
return false if @powerpack_id.nil?
|
123
|
+
return false if @type.nil?
|
124
|
+
true
|
125
|
+
end
|
126
|
+
|
127
|
+
# Custom attribute writer method with validation
|
128
|
+
# @param powerpack_id [Object] Object to be assigned
|
129
|
+
# @!visibility private
|
130
|
+
def powerpack_id=(powerpack_id)
|
131
|
+
if powerpack_id.nil?
|
132
|
+
fail ArgumentError, 'invalid value for "powerpack_id", powerpack_id cannot be nil.'
|
133
|
+
end
|
134
|
+
@powerpack_id = powerpack_id
|
135
|
+
end
|
136
|
+
|
137
|
+
# Custom attribute writer method with validation
|
138
|
+
# @param type [Object] Object to be assigned
|
139
|
+
# @!visibility private
|
140
|
+
def type=(type)
|
141
|
+
if type.nil?
|
142
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
143
|
+
end
|
144
|
+
@type = type
|
145
|
+
end
|
146
|
+
|
147
|
+
# Checks equality by comparing each attribute.
|
148
|
+
# @param o [Object] Object to be compared
|
149
|
+
# @!visibility private
|
150
|
+
def ==(o)
|
151
|
+
return true if self.equal?(o)
|
152
|
+
self.class == o.class &&
|
153
|
+
background_color == o.background_color &&
|
154
|
+
banner_img == o.banner_img &&
|
155
|
+
powerpack_id == o.powerpack_id &&
|
156
|
+
show_title == o.show_title &&
|
157
|
+
template_variables == o.template_variables &&
|
158
|
+
title == o.title &&
|
159
|
+
type == o.type
|
160
|
+
end
|
161
|
+
|
162
|
+
# Calculates hash code according to all attributes.
|
163
|
+
# @return [Integer] Hash code
|
164
|
+
# @!visibility private
|
165
|
+
def hash
|
166
|
+
[background_color, banner_img, powerpack_id, show_title, template_variables, title, type].hash
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V1 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::V1
|
20
|
+
# Type of the powerpack widget.
|
21
|
+
class PowerpackWidgetDefinitionType
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
POWERPACK = "powerpack".freeze
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,181 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V1 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::V1
|
20
|
+
# Encapsulates all user choices about how to split a graph.
|
21
|
+
class SplitConfig
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Maximum number of graphs to display in the widget.
|
25
|
+
attr_reader :limit
|
26
|
+
|
27
|
+
# Controls the order in which graphs appear in the split.
|
28
|
+
attr_reader :sort
|
29
|
+
|
30
|
+
# The dimension(s) on which to split the graph
|
31
|
+
attr_reader :split_dimensions
|
32
|
+
|
33
|
+
# Manual selection of tags making split graph widget static
|
34
|
+
attr_reader :static_splits
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
# @!visibility private
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'limit' => :'limit',
|
41
|
+
:'sort' => :'sort',
|
42
|
+
:'split_dimensions' => :'split_dimensions',
|
43
|
+
:'static_splits' => :'static_splits'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
# @!visibility private
|
49
|
+
def self.openapi_types
|
50
|
+
{
|
51
|
+
:'limit' => :'Integer',
|
52
|
+
:'sort' => :'SplitSort',
|
53
|
+
:'split_dimensions' => :'Array<SplitDimension>',
|
54
|
+
:'static_splits' => :'Array<Array<SplitVectorEntryItem>>'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
60
|
+
# @!visibility private
|
61
|
+
def initialize(attributes = {})
|
62
|
+
if (!attributes.is_a?(Hash))
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SplitConfig` initialize method"
|
64
|
+
end
|
65
|
+
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SplitConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
|
+
end
|
71
|
+
h[k.to_sym] = v
|
72
|
+
}
|
73
|
+
|
74
|
+
if attributes.key?(:'limit')
|
75
|
+
self.limit = attributes[:'limit']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'sort')
|
79
|
+
self.sort = attributes[:'sort']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'split_dimensions')
|
83
|
+
if (value = attributes[:'split_dimensions']).is_a?(Array)
|
84
|
+
self.split_dimensions = value
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'static_splits')
|
89
|
+
if (value = attributes[:'static_splits']).is_a?(Array)
|
90
|
+
self.static_splits = value
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# Check to see if the all the properties in the model are valid
|
96
|
+
# @return true if the model is valid
|
97
|
+
# @!visibility private
|
98
|
+
def valid?
|
99
|
+
return false if @limit.nil?
|
100
|
+
return false if @limit > 100
|
101
|
+
return false if @limit < 1
|
102
|
+
return false if @sort.nil?
|
103
|
+
return false if @split_dimensions.nil?
|
104
|
+
return false if @split_dimensions.length > 1
|
105
|
+
return false if @split_dimensions.length < 1
|
106
|
+
return false if !@static_splits.nil? && @static_splits.length > 100
|
107
|
+
true
|
108
|
+
end
|
109
|
+
|
110
|
+
# Custom attribute writer method with validation
|
111
|
+
# @param limit [Object] Object to be assigned
|
112
|
+
# @!visibility private
|
113
|
+
def limit=(limit)
|
114
|
+
if limit.nil?
|
115
|
+
fail ArgumentError, 'invalid value for "limit", limit cannot be nil.'
|
116
|
+
end
|
117
|
+
if limit > 100
|
118
|
+
fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 100.'
|
119
|
+
end
|
120
|
+
if limit < 1
|
121
|
+
fail ArgumentError, 'invalid value for "limit", must be greater than or equal to 1.'
|
122
|
+
end
|
123
|
+
@limit = limit
|
124
|
+
end
|
125
|
+
|
126
|
+
# Custom attribute writer method with validation
|
127
|
+
# @param sort [Object] Object to be assigned
|
128
|
+
# @!visibility private
|
129
|
+
def sort=(sort)
|
130
|
+
if sort.nil?
|
131
|
+
fail ArgumentError, 'invalid value for "sort", sort cannot be nil.'
|
132
|
+
end
|
133
|
+
@sort = sort
|
134
|
+
end
|
135
|
+
|
136
|
+
# Custom attribute writer method with validation
|
137
|
+
# @param split_dimensions [Object] Object to be assigned
|
138
|
+
# @!visibility private
|
139
|
+
def split_dimensions=(split_dimensions)
|
140
|
+
if split_dimensions.nil?
|
141
|
+
fail ArgumentError, 'invalid value for "split_dimensions", split_dimensions cannot be nil.'
|
142
|
+
end
|
143
|
+
if split_dimensions.length > 1
|
144
|
+
fail ArgumentError, 'invalid value for "split_dimensions", number of items must be less than or equal to 1.'
|
145
|
+
end
|
146
|
+
if split_dimensions.length < 1
|
147
|
+
fail ArgumentError, 'invalid value for "split_dimensions", number of items must be greater than or equal to 1.'
|
148
|
+
end
|
149
|
+
@split_dimensions = split_dimensions
|
150
|
+
end
|
151
|
+
|
152
|
+
# Custom attribute writer method with validation
|
153
|
+
# @param static_splits [Object] Object to be assigned
|
154
|
+
# @!visibility private
|
155
|
+
def static_splits=(static_splits)
|
156
|
+
if !static_splits.nil? && static_splits.length > 100
|
157
|
+
fail ArgumentError, 'invalid value for "static_splits", number of items must be less than or equal to 100.'
|
158
|
+
end
|
159
|
+
@static_splits = static_splits
|
160
|
+
end
|
161
|
+
|
162
|
+
# Checks equality by comparing each attribute.
|
163
|
+
# @param o [Object] Object to be compared
|
164
|
+
# @!visibility private
|
165
|
+
def ==(o)
|
166
|
+
return true if self.equal?(o)
|
167
|
+
self.class == o.class &&
|
168
|
+
limit == o.limit &&
|
169
|
+
sort == o.sort &&
|
170
|
+
split_dimensions == o.split_dimensions &&
|
171
|
+
static_splits == o.static_splits
|
172
|
+
end
|
173
|
+
|
174
|
+
# Calculates hash code according to all attributes.
|
175
|
+
# @return [Integer] Hash code
|
176
|
+
# @!visibility private
|
177
|
+
def hash
|
178
|
+
[limit, sort, split_dimensions, static_splits].hash
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|