datadog_api_client 1.0.0.beta.3 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.azure-pipelines/all.yml +0 -1
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +23 -0
- data/Gemfile +1 -1
- data/LICENSE-3rdparty.csv +0 -1
- data/check-examples.sh +7 -2
- data/data/v1/openapi.yaml +1963 -245
- data/data/v2/openapi.yaml +67 -13
- data/docs/v1/DashboardsAPI.md +10 -5
- data/docs/v1/DistributionWidgetDefinition.md +9 -3
- data/docs/v1/DistributionWidgetXAxis.md +24 -0
- data/docs/v1/DistributionWidgetYAxis.md +26 -0
- data/docs/v1/EventsAPI.md +7 -3
- data/docs/v1/GroupWidgetDefinition.md +8 -0
- data/docs/v1/ImageWidgetDefinition.md +11 -1
- data/docs/v1/LogsByRetention.md +22 -0
- data/docs/v1/LogsByRetentionMonthlyUsage.md +20 -0
- data/docs/v1/LogsByRetentionOrgUsage.md +18 -0
- data/docs/v1/LogsByRetentionOrgs.md +18 -0
- data/docs/v1/LogsRetentionAggSumUsage.md +24 -0
- data/docs/v1/LogsRetentionSumUsage.md +24 -0
- data/docs/v1/MonitorsAPI.md +1 -1
- data/docs/v1/NoteWidgetDefinition.md +5 -1
- data/docs/v1/NotebookAbsoluteTime.md +22 -0
- data/docs/v1/NotebookAuthor.md +34 -0
- data/docs/v1/NotebookCellCreateRequest.md +20 -0
- data/docs/v1/NotebookCellCreateRequestAttributes.md +57 -0
- data/docs/v1/NotebookCellResourceType.md +15 -0
- data/docs/v1/NotebookCellResponse.md +22 -0
- data/docs/v1/NotebookCellResponseAttributes.md +57 -0
- data/docs/v1/NotebookCellTime.md +49 -0
- data/docs/v1/NotebookCellUpdateRequest.md +22 -0
- data/docs/v1/NotebookCellUpdateRequestAttributes.md +57 -0
- data/docs/v1/NotebookCreateData.md +20 -0
- data/docs/v1/NotebookCreateDataAttributes.md +24 -0
- data/docs/v1/NotebookCreateRequest.md +18 -0
- data/docs/v1/NotebookDistributionCellAttributes.md +24 -0
- data/docs/v1/NotebookGlobalTime.md +49 -0
- data/docs/v1/NotebookGraphSize.md +15 -0
- data/docs/v1/NotebookHeatMapCellAttributes.md +24 -0
- data/docs/v1/NotebookLogStreamCellAttributes.md +22 -0
- data/docs/v1/NotebookMarkdownCellAttributes.md +18 -0
- data/docs/v1/NotebookMarkdownCellDefinition.md +21 -0
- data/docs/v1/NotebookMarkdownCellDefinitionType.md +15 -0
- data/docs/v1/NotebookRelativeTime.md +18 -0
- data/docs/v1/NotebookResourceType.md +15 -0
- data/docs/v1/NotebookResponse.md +18 -0
- data/docs/v1/NotebookResponseData.md +22 -0
- data/docs/v1/NotebookResponseDataAttributes.md +30 -0
- data/docs/v1/NotebookSplitBy.md +20 -0
- data/docs/v1/NotebookStatus.md +15 -0
- data/docs/v1/NotebookTimeseriesCellAttributes.md +24 -0
- data/docs/v1/NotebookToplistCellAttributes.md +24 -0
- data/docs/v1/NotebookUpdateCell.md +49 -0
- data/docs/v1/NotebookUpdateData.md +20 -0
- data/docs/v1/NotebookUpdateDataAttributes.md +24 -0
- data/docs/v1/NotebookUpdateRequest.md +18 -0
- data/docs/v1/NotebooksAPI.md +339 -0
- data/docs/v1/NotebooksResponse.md +20 -0
- data/docs/v1/NotebooksResponseMeta.md +18 -0
- data/docs/v1/NotebooksResponsePage.md +20 -0
- data/docs/v1/README.md +66 -9
- data/docs/v1/SLOListResponse.md +3 -1
- data/docs/v1/SLOListResponseMetadata.md +18 -0
- data/docs/v1/SLOListResponseMetadataPage.md +20 -0
- data/docs/v1/SLOResponse.md +1 -1
- data/docs/v1/SLOResponseData.md +44 -0
- data/docs/v1/ServiceLevelObjectivesAPI.md +8 -4
- data/docs/v1/SyntheticsAPI.md +28 -156
- data/docs/v1/SyntheticsAPIStep.md +4 -0
- data/docs/v1/SyntheticsBrowserTestConfig.md +2 -0
- data/docs/v1/SyntheticsTestConfig.md +1 -1
- data/docs/v1/SyntheticsTestOptions.md +1 -1
- data/docs/v1/SyntheticsTestRequest.md +6 -0
- data/docs/v1/UsageAttributionSupportedMetrics.md +15 -0
- data/docs/v1/UsageAttributionValues.md +8 -0
- data/docs/v1/UsageHostHour.md +3 -1
- data/docs/v1/UsageIoTHour.md +1 -1
- data/docs/v1/UsageLogsByRetentionHour.md +24 -0
- data/docs/v1/UsageLogsByRetentionResponse.md +18 -0
- data/docs/v1/UsageMeteringAPI.md +69 -2
- data/docs/v1/UsageSummaryDate.md +11 -9
- data/docs/v1/UsageSummaryDateOrg.md +3 -1
- data/docs/v1/UsageSummaryResponse.md +5 -1
- data/docs/v1/WidgetHorizontalAlign.md +15 -0
- data/docs/v1/WidgetLayout.md +2 -0
- data/docs/v1/WidgetMarker.md +1 -1
- data/docs/v1/WidgetVerticalAlign.md +15 -0
- data/docs/v2/IncidentServiceUpdateData.md +1 -1
- data/docs/v2/IncidentServicesAPI.md +1 -1
- data/docs/v2/IncidentTeamUpdateData.md +1 -1
- data/docs/v2/IncidentTeamsAPI.md +1 -1
- data/docs/v2/MetricsAPI.md +1 -11
- data/extract-code-blocks.sh +6 -2
- data/lib/datadog_api_client/v1.rb +54 -0
- data/lib/datadog_api_client/v1/api/dashboards_api.rb +3 -0
- data/lib/datadog_api_client/v1/api/events_api.rb +14 -4
- data/lib/datadog_api_client/v1/api/monitors_api.rb +2 -2
- data/lib/datadog_api_client/v1/api/notebooks_api.rb +418 -0
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -0
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +14 -170
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +79 -2
- data/lib/datadog_api_client/v1/models/distribution_widget_definition.rb +36 -6
- data/lib/datadog_api_client/v1/models/distribution_widget_x_axis.rb +259 -0
- data/lib/datadog_api_client/v1/models/distribution_widget_y_axis.rb +269 -0
- data/lib/datadog_api_client/v1/models/group_widget_definition.rb +42 -1
- data/lib/datadog_api_client/v1/models/image_widget_definition.rb +56 -4
- data/lib/datadog_api_client/v1/models/logs_by_retention.rb +243 -0
- data/lib/datadog_api_client/v1/models/logs_by_retention_monthly_usage.rb +235 -0
- data/lib/datadog_api_client/v1/models/logs_by_retention_org_usage.rb +225 -0
- data/lib/datadog_api_client/v1/models/logs_by_retention_orgs.rb +225 -0
- data/lib/datadog_api_client/v1/models/logs_retention_agg_sum_usage.rb +253 -0
- data/lib/datadog_api_client/v1/models/logs_retention_sum_usage.rb +253 -0
- data/lib/datadog_api_client/v1/models/note_widget_definition.rb +25 -4
- data/lib/datadog_api_client/v1/models/notebook_absolute_time.rb +253 -0
- data/lib/datadog_api_client/v1/models/notebook_author.rb +303 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request.rb +243 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request_attributes.rb +113 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_resource_type.rb +39 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_response.rb +258 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_response_attributes.rb +113 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_time.rb +109 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_update_request.rb +258 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_update_request_attributes.rb +113 -0
- data/lib/datadog_api_client/v1/models/notebook_create_data.rb +243 -0
- data/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb +298 -0
- data/lib/datadog_api_client/v1/models/notebook_create_request.rb +227 -0
- data/lib/datadog_api_client/v1/models/notebook_distribution_cell_attributes.rb +255 -0
- data/lib/datadog_api_client/v1/models/notebook_global_time.rb +109 -0
- data/lib/datadog_api_client/v1/models/notebook_graph_size.rb +43 -0
- data/lib/datadog_api_client/v1/models/notebook_heat_map_cell_attributes.rb +255 -0
- data/lib/datadog_api_client/v1/models/notebook_log_stream_cell_attributes.rb +246 -0
- data/lib/datadog_api_client/v1/models/notebook_markdown_cell_attributes.rb +227 -0
- data/lib/datadog_api_client/v1/models/notebook_markdown_cell_definition.rb +244 -0
- data/lib/datadog_api_client/v1/models/notebook_markdown_cell_definition_type.rb +39 -0
- data/lib/datadog_api_client/v1/models/notebook_relative_time.rb +227 -0
- data/lib/datadog_api_client/v1/models/notebook_resource_type.rb +39 -0
- data/lib/datadog_api_client/v1/models/notebook_response.rb +222 -0
- data/lib/datadog_api_client/v1/models/notebook_response_data.rb +258 -0
- data/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb +327 -0
- data/lib/datadog_api_client/v1/models/notebook_split_by.rb +247 -0
- data/lib/datadog_api_client/v1/models/notebook_status.rb +39 -0
- data/lib/datadog_api_client/v1/models/notebook_timeseries_cell_attributes.rb +255 -0
- data/lib/datadog_api_client/v1/models/notebook_toplist_cell_attributes.rb +255 -0
- data/lib/datadog_api_client/v1/models/notebook_update_cell.rb +109 -0
- data/lib/datadog_api_client/v1/models/notebook_update_data.rb +243 -0
- data/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb +298 -0
- data/lib/datadog_api_client/v1/models/notebook_update_request.rb +227 -0
- data/lib/datadog_api_client/v1/models/notebooks_response.rb +234 -0
- data/lib/datadog_api_client/v1/models/notebooks_response_meta.rb +222 -0
- data/lib/datadog_api_client/v1/models/notebooks_response_page.rb +233 -0
- data/lib/datadog_api_client/v1/models/slo_list_response.rb +13 -4
- data/lib/datadog_api_client/v1/models/slo_list_response_metadata.rb +222 -0
- data/lib/datadog_api_client/v1/models/slo_list_response_metadata_page.rb +233 -0
- data/lib/datadog_api_client/v1/models/slo_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_response_data.rb +363 -0
- data/lib/datadog_api_client/v1/models/synthetics_api_step.rb +21 -1
- data/lib/datadog_api_client/v1/models/synthetics_assertion_type.rb +4 -0
- data/lib/datadog_api_client/v1/models/synthetics_browser_test_config.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_config.rb +0 -5
- data/lib/datadog_api_client/v1/models/synthetics_test_details_sub_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +79 -1
- data/lib/datadog_api_client/v1/models/synthetics_tick_interval.rb +1 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +67 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_host_hour.rb +14 -4
- data/lib/datadog_api_client/v1/models/usage_io_t_hour.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_logs_by_retention_hour.rb +253 -0
- data/lib/datadog_api_client/v1/models/usage_logs_by_retention_response.rb +225 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +38 -28
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +14 -4
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +23 -4
- data/lib/datadog_api_client/v1/models/widget.rb +1 -1
- data/lib/datadog_api_client/v1/models/widget_horizontal_align.rb +41 -0
- data/lib/datadog_api_client/v1/models/widget_image_sizing.rb +5 -0
- data/lib/datadog_api_client/v1/models/widget_layout.rb +12 -2
- data/lib/datadog_api_client/v1/models/widget_margin.rb +3 -0
- data/lib/datadog_api_client/v1/models/widget_marker.rb +1 -1
- data/lib/datadog_api_client/v1/models/widget_vertical_align.rb +41 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +2 -2
- data/lib/datadog_api_client/v2/configuration.rb +0 -2
- data/lib/datadog_api_client/v2/models/incident_service_update_data.rb +0 -5
- data/lib/datadog_api_client/v2/models/incident_team_update_data.rb +0 -5
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_metric_types.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/run-tests.sh +0 -6
- data/spec/v1/api/notebooks_api_spec.rb +106 -0
- data/spec/v1/models/distribution_widget_x_axis_spec.rb +55 -0
- data/spec/v1/models/distribution_widget_y_axis_spec.rb +61 -0
- data/spec/v1/models/logs_by_retention_monthly_usage_spec.rb +43 -0
- data/spec/v1/models/logs_by_retention_org_usage_spec.rb +37 -0
- data/spec/v1/models/logs_by_retention_orgs_spec.rb +37 -0
- data/spec/v1/models/logs_by_retention_spec.rb +49 -0
- data/spec/v1/models/logs_retention_agg_sum_usage_spec.rb +55 -0
- data/spec/v1/models/logs_retention_sum_usage_spec.rb +55 -0
- data/spec/v1/models/notebook_absolute_time_spec.rb +49 -0
- data/spec/v1/models/notebook_author_spec.rb +85 -0
- data/spec/v1/models/notebook_cell_create_request_attributes_spec.rb +34 -0
- data/spec/v1/models/notebook_cell_create_request_spec.rb +43 -0
- data/spec/v1/models/notebook_cell_resource_type_spec.rb +31 -0
- data/spec/v1/models/notebook_cell_response_attributes_spec.rb +34 -0
- data/spec/v1/models/notebook_cell_response_spec.rb +49 -0
- data/spec/v1/models/notebook_cell_time_spec.rb +34 -0
- data/spec/v1/models/notebook_cell_update_request_attributes_spec.rb +34 -0
- data/spec/v1/models/notebook_cell_update_request_spec.rb +49 -0
- data/spec/v1/models/notebook_create_data_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_create_data_spec.rb +43 -0
- data/spec/v1/models/notebook_create_request_spec.rb +37 -0
- data/spec/v1/models/notebook_distribution_cell_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_global_time_spec.rb +34 -0
- data/spec/v1/models/notebook_graph_size_spec.rb +31 -0
- data/spec/v1/models/notebook_heat_map_cell_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_log_stream_cell_attributes_spec.rb +49 -0
- data/spec/v1/models/notebook_markdown_cell_attributes_spec.rb +37 -0
- data/spec/v1/models/notebook_markdown_cell_definition_spec.rb +43 -0
- data/spec/v1/models/notebook_markdown_cell_definition_type_spec.rb +31 -0
- data/spec/v1/models/notebook_relative_time_spec.rb +37 -0
- data/spec/v1/models/notebook_resource_type_spec.rb +31 -0
- data/spec/v1/models/notebook_response_data_attributes_spec.rb +73 -0
- data/spec/v1/models/notebook_response_data_spec.rb +49 -0
- data/spec/v1/models/notebook_response_spec.rb +37 -0
- data/spec/v1/models/notebook_split_by_spec.rb +43 -0
- data/spec/v1/models/notebook_status_spec.rb +31 -0
- data/spec/v1/models/notebook_timeseries_cell_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_toplist_cell_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_update_cell_spec.rb +34 -0
- data/spec/v1/models/notebook_update_data_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_update_data_spec.rb +43 -0
- data/spec/v1/models/notebook_update_request_spec.rb +37 -0
- data/spec/v1/models/notebooks_response_meta_spec.rb +37 -0
- data/spec/v1/models/notebooks_response_page_spec.rb +43 -0
- data/spec/v1/models/notebooks_response_spec.rb +43 -0
- data/spec/v1/models/slo_list_response_metadata_page_spec.rb +43 -0
- data/spec/v1/models/slo_list_response_metadata_spec.rb +37 -0
- data/spec/v1/models/slo_response_data_spec.rb +115 -0
- data/spec/v1/models/usage_attribution_supported_metrics_spec.rb +31 -0
- data/spec/v1/models/usage_logs_by_retention_hour_spec.rb +55 -0
- data/spec/v1/models/usage_logs_by_retention_response_spec.rb +37 -0
- data/spec/v1/models/widget_horizontal_align_spec.rb +31 -0
- data/spec/v1/models/widget_vertical_align_spec.rb +31 -0
- metadata +220 -4
|
@@ -0,0 +1,233 @@
|
|
|
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://openapi-generator.tech
|
|
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 object containing information about the pages of the list of SLOs.
|
|
21
|
+
class SLOListResponseMetadataPage
|
|
22
|
+
# The total number of resources that could be retrieved ignoring the parameters and filters in the request.
|
|
23
|
+
attr_accessor :total_count
|
|
24
|
+
|
|
25
|
+
# The total number of resources that match the parameters and filters in the request. This attribute can be used by a client to determine the total number of pages.
|
|
26
|
+
attr_accessor :total_filtered_count
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'total_count' => :'total_count',
|
|
32
|
+
:'total_filtered_count' => :'total_filtered_count'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'total_count' => :'Integer',
|
|
45
|
+
:'total_filtered_count' => :'Integer'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOListResponseMetadataPage` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOListResponseMetadataPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'total_count')
|
|
71
|
+
self.total_count = attributes[:'total_count']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'total_filtered_count')
|
|
75
|
+
self.total_filtered_count = attributes[:'total_filtered_count']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
invalid_properties = Array.new
|
|
83
|
+
invalid_properties
|
|
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
|
+
def valid?
|
|
89
|
+
true
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Checks equality by comparing each attribute.
|
|
93
|
+
# @param [Object] Object to be compared
|
|
94
|
+
def ==(o)
|
|
95
|
+
return true if self.equal?(o)
|
|
96
|
+
self.class == o.class &&
|
|
97
|
+
total_count == o.total_count &&
|
|
98
|
+
total_filtered_count == o.total_filtered_count
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# @see the `==` method
|
|
102
|
+
# @param [Object] Object to be compared
|
|
103
|
+
def eql?(o)
|
|
104
|
+
self == o
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Calculates hash code according to all attributes.
|
|
108
|
+
# @return [Integer] Hash code
|
|
109
|
+
def hash
|
|
110
|
+
[total_count, total_filtered_count].hash
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Builds the object from hash
|
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
115
|
+
# @return [Object] Returns the model itself
|
|
116
|
+
def self.build_from_hash(attributes)
|
|
117
|
+
new.build_from_hash(attributes)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Builds the object from hash
|
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
122
|
+
# @return [Object] Returns the model itself
|
|
123
|
+
def build_from_hash(attributes)
|
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
|
125
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
126
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
127
|
+
self.send("#{key}=", nil)
|
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
129
|
+
# check to ensure the input is an array given that the attribute
|
|
130
|
+
# is documented as an array but the input is not
|
|
131
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
132
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
133
|
+
end
|
|
134
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
135
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
self
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Deserializes the data based on type
|
|
143
|
+
# @param string type Data type
|
|
144
|
+
# @param string value Value to be deserialized
|
|
145
|
+
# @return [Object] Deserialized data
|
|
146
|
+
def _deserialize(type, value)
|
|
147
|
+
case type.to_sym
|
|
148
|
+
when :Time
|
|
149
|
+
Time.parse(value)
|
|
150
|
+
when :Date
|
|
151
|
+
Date.parse(value)
|
|
152
|
+
when :String
|
|
153
|
+
value.to_s
|
|
154
|
+
when :Integer
|
|
155
|
+
value.to_i
|
|
156
|
+
when :Float
|
|
157
|
+
value.to_f
|
|
158
|
+
when :Boolean
|
|
159
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
160
|
+
true
|
|
161
|
+
else
|
|
162
|
+
false
|
|
163
|
+
end
|
|
164
|
+
when :Object
|
|
165
|
+
# generic object (usually a Hash), return directly
|
|
166
|
+
value
|
|
167
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
168
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
169
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
170
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
171
|
+
k_type = Regexp.last_match[:k_type]
|
|
172
|
+
v_type = Regexp.last_match[:v_type]
|
|
173
|
+
{}.tap do |hash|
|
|
174
|
+
value.each do |k, v|
|
|
175
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
else # model
|
|
179
|
+
# models (e.g. Pet) or oneOf
|
|
180
|
+
klass = DatadogAPIClient::V1.const_get(type)
|
|
181
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Returns the string representation of the object
|
|
186
|
+
# @return [String] String presentation of the object
|
|
187
|
+
def to_s
|
|
188
|
+
to_hash.to_s
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
|
193
|
+
def to_body
|
|
194
|
+
to_hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Returns the object in the form of hash
|
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
|
199
|
+
def to_hash
|
|
200
|
+
hash = {}
|
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
202
|
+
value = self.send(attr)
|
|
203
|
+
if value.nil?
|
|
204
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
205
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
hash[param] = _to_hash(value)
|
|
209
|
+
end
|
|
210
|
+
hash
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Outputs non-array value in the form of hash
|
|
214
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
215
|
+
# @param [Object] value Any valid value
|
|
216
|
+
# @return [Hash] Returns the value in the form of hash
|
|
217
|
+
def _to_hash(value)
|
|
218
|
+
if value.is_a?(Array)
|
|
219
|
+
value.compact.map { |v| _to_hash(v) }
|
|
220
|
+
elsif value.is_a?(Hash)
|
|
221
|
+
{}.tap do |hash|
|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
223
|
+
end
|
|
224
|
+
elsif value.respond_to? :to_hash
|
|
225
|
+
value.to_hash
|
|
226
|
+
else
|
|
227
|
+
value
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
end
|
|
@@ -0,0 +1,363 @@
|
|
|
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://openapi-generator.tech
|
|
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
|
+
# A service level objective object includes a service level indicator, thresholds for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.).
|
|
21
|
+
class SLOResponseData
|
|
22
|
+
# A list of SLO monitors IDs that reference this SLO. This field is returned only when `with_configured_alert_ids` parameter is true in query.
|
|
23
|
+
attr_accessor :configured_alert_ids
|
|
24
|
+
|
|
25
|
+
# Creation timestamp (UNIX time in seconds) Always included in service level objective responses.
|
|
26
|
+
attr_accessor :created_at
|
|
27
|
+
|
|
28
|
+
attr_accessor :creator
|
|
29
|
+
|
|
30
|
+
# A user-defined description of the service level objective. Always included in service level objective responses (but may be `null`). Optional in create/update requests.
|
|
31
|
+
attr_accessor :description
|
|
32
|
+
|
|
33
|
+
# A list of (up to 20) monitor groups that narrow the scope of a monitor service level objective. Included in service level objective responses if it is not empty. Optional in create/update requests for monitor service level objectives, but may only be used when then length of the `monitor_ids` field is one.
|
|
34
|
+
attr_accessor :groups
|
|
35
|
+
|
|
36
|
+
# A unique identifier for the service level objective object. Always included in service level objective responses.
|
|
37
|
+
attr_accessor :id
|
|
38
|
+
|
|
39
|
+
# Modification timestamp (UNIX time in seconds) Always included in service level objective responses.
|
|
40
|
+
attr_accessor :modified_at
|
|
41
|
+
|
|
42
|
+
# A list of monitor ids that defines the scope of a monitor service level objective. **Required if type is `monitor`**.
|
|
43
|
+
attr_accessor :monitor_ids
|
|
44
|
+
|
|
45
|
+
# The union of monitor tags for all monitors referenced by the `monitor_ids` field. Always included in service level objective responses for monitor service level objectives (but may be empty). Ignored in create/update requests. Does not affect which monitors are included in the service level objective (that is determined entirely by the `monitor_ids` field).
|
|
46
|
+
attr_accessor :monitor_tags
|
|
47
|
+
|
|
48
|
+
# The name of the service level objective object.
|
|
49
|
+
attr_accessor :name
|
|
50
|
+
|
|
51
|
+
attr_accessor :query
|
|
52
|
+
|
|
53
|
+
# A list of tags associated with this service level objective. Always included in service level objective responses (but may be empty). Optional in create/update requests.
|
|
54
|
+
attr_accessor :tags
|
|
55
|
+
|
|
56
|
+
# The thresholds (timeframes and associated targets) for this service level objective object.
|
|
57
|
+
attr_accessor :thresholds
|
|
58
|
+
|
|
59
|
+
attr_accessor :type
|
|
60
|
+
|
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
62
|
+
def self.attribute_map
|
|
63
|
+
{
|
|
64
|
+
:'configured_alert_ids' => :'configured_alert_ids',
|
|
65
|
+
:'created_at' => :'created_at',
|
|
66
|
+
:'creator' => :'creator',
|
|
67
|
+
:'description' => :'description',
|
|
68
|
+
:'groups' => :'groups',
|
|
69
|
+
:'id' => :'id',
|
|
70
|
+
:'modified_at' => :'modified_at',
|
|
71
|
+
:'monitor_ids' => :'monitor_ids',
|
|
72
|
+
:'monitor_tags' => :'monitor_tags',
|
|
73
|
+
:'name' => :'name',
|
|
74
|
+
:'query' => :'query',
|
|
75
|
+
:'tags' => :'tags',
|
|
76
|
+
:'thresholds' => :'thresholds',
|
|
77
|
+
:'type' => :'type'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Returns all the JSON keys this model knows about
|
|
82
|
+
def self.acceptable_attributes
|
|
83
|
+
attribute_map.values
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Attribute type mapping.
|
|
87
|
+
def self.openapi_types
|
|
88
|
+
{
|
|
89
|
+
:'configured_alert_ids' => :'Array<Integer>',
|
|
90
|
+
:'created_at' => :'Integer',
|
|
91
|
+
:'creator' => :'Creator',
|
|
92
|
+
:'description' => :'String',
|
|
93
|
+
:'groups' => :'Array<String>',
|
|
94
|
+
:'id' => :'String',
|
|
95
|
+
:'modified_at' => :'Integer',
|
|
96
|
+
:'monitor_ids' => :'Array<Integer>',
|
|
97
|
+
:'monitor_tags' => :'Array<String>',
|
|
98
|
+
:'name' => :'String',
|
|
99
|
+
:'query' => :'ServiceLevelObjectiveQuery',
|
|
100
|
+
:'tags' => :'Array<String>',
|
|
101
|
+
:'thresholds' => :'Array<SLOThreshold>',
|
|
102
|
+
:'type' => :'SLOType'
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# List of attributes with nullable: true
|
|
107
|
+
def self.openapi_nullable
|
|
108
|
+
Set.new([
|
|
109
|
+
:'description',
|
|
110
|
+
])
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Initializes the object
|
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
115
|
+
def initialize(attributes = {})
|
|
116
|
+
if (!attributes.is_a?(Hash))
|
|
117
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOResponseData` initialize method"
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
121
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
122
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
123
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
124
|
+
end
|
|
125
|
+
h[k.to_sym] = v
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'configured_alert_ids')
|
|
129
|
+
if (value = attributes[:'configured_alert_ids']).is_a?(Array)
|
|
130
|
+
self.configured_alert_ids = value
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'created_at')
|
|
135
|
+
self.created_at = attributes[:'created_at']
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'creator')
|
|
139
|
+
self.creator = attributes[:'creator']
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'description')
|
|
143
|
+
self.description = attributes[:'description']
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'groups')
|
|
147
|
+
if (value = attributes[:'groups']).is_a?(Array)
|
|
148
|
+
self.groups = value
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'id')
|
|
153
|
+
self.id = attributes[:'id']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'modified_at')
|
|
157
|
+
self.modified_at = attributes[:'modified_at']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'monitor_ids')
|
|
161
|
+
if (value = attributes[:'monitor_ids']).is_a?(Array)
|
|
162
|
+
self.monitor_ids = value
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'monitor_tags')
|
|
167
|
+
if (value = attributes[:'monitor_tags']).is_a?(Array)
|
|
168
|
+
self.monitor_tags = value
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'name')
|
|
173
|
+
self.name = attributes[:'name']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'query')
|
|
177
|
+
self.query = attributes[:'query']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'tags')
|
|
181
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
|
182
|
+
self.tags = value
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'thresholds')
|
|
187
|
+
if (value = attributes[:'thresholds']).is_a?(Array)
|
|
188
|
+
self.thresholds = value
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'type')
|
|
193
|
+
self.type = attributes[:'type']
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
198
|
+
# @return Array for valid properties with the reasons
|
|
199
|
+
def list_invalid_properties
|
|
200
|
+
invalid_properties = Array.new
|
|
201
|
+
invalid_properties
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Check to see if the all the properties in the model are valid
|
|
205
|
+
# @return true if the model is valid
|
|
206
|
+
def valid?
|
|
207
|
+
true
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Checks equality by comparing each attribute.
|
|
211
|
+
# @param [Object] Object to be compared
|
|
212
|
+
def ==(o)
|
|
213
|
+
return true if self.equal?(o)
|
|
214
|
+
self.class == o.class &&
|
|
215
|
+
configured_alert_ids == o.configured_alert_ids &&
|
|
216
|
+
created_at == o.created_at &&
|
|
217
|
+
creator == o.creator &&
|
|
218
|
+
description == o.description &&
|
|
219
|
+
groups == o.groups &&
|
|
220
|
+
id == o.id &&
|
|
221
|
+
modified_at == o.modified_at &&
|
|
222
|
+
monitor_ids == o.monitor_ids &&
|
|
223
|
+
monitor_tags == o.monitor_tags &&
|
|
224
|
+
name == o.name &&
|
|
225
|
+
query == o.query &&
|
|
226
|
+
tags == o.tags &&
|
|
227
|
+
thresholds == o.thresholds &&
|
|
228
|
+
type == o.type
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# @see the `==` method
|
|
232
|
+
# @param [Object] Object to be compared
|
|
233
|
+
def eql?(o)
|
|
234
|
+
self == o
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Calculates hash code according to all attributes.
|
|
238
|
+
# @return [Integer] Hash code
|
|
239
|
+
def hash
|
|
240
|
+
[configured_alert_ids, created_at, creator, description, groups, id, modified_at, monitor_ids, monitor_tags, name, query, tags, thresholds, type].hash
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Builds the object from hash
|
|
244
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
245
|
+
# @return [Object] Returns the model itself
|
|
246
|
+
def self.build_from_hash(attributes)
|
|
247
|
+
new.build_from_hash(attributes)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Builds the object from hash
|
|
251
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
252
|
+
# @return [Object] Returns the model itself
|
|
253
|
+
def build_from_hash(attributes)
|
|
254
|
+
return nil unless attributes.is_a?(Hash)
|
|
255
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
256
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
257
|
+
self.send("#{key}=", nil)
|
|
258
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
259
|
+
# check to ensure the input is an array given that the attribute
|
|
260
|
+
# is documented as an array but the input is not
|
|
261
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
262
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
263
|
+
end
|
|
264
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
265
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
self
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Deserializes the data based on type
|
|
273
|
+
# @param string type Data type
|
|
274
|
+
# @param string value Value to be deserialized
|
|
275
|
+
# @return [Object] Deserialized data
|
|
276
|
+
def _deserialize(type, value)
|
|
277
|
+
case type.to_sym
|
|
278
|
+
when :Time
|
|
279
|
+
Time.parse(value)
|
|
280
|
+
when :Date
|
|
281
|
+
Date.parse(value)
|
|
282
|
+
when :String
|
|
283
|
+
value.to_s
|
|
284
|
+
when :Integer
|
|
285
|
+
value.to_i
|
|
286
|
+
when :Float
|
|
287
|
+
value.to_f
|
|
288
|
+
when :Boolean
|
|
289
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
290
|
+
true
|
|
291
|
+
else
|
|
292
|
+
false
|
|
293
|
+
end
|
|
294
|
+
when :Object
|
|
295
|
+
# generic object (usually a Hash), return directly
|
|
296
|
+
value
|
|
297
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
298
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
299
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
300
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
301
|
+
k_type = Regexp.last_match[:k_type]
|
|
302
|
+
v_type = Regexp.last_match[:v_type]
|
|
303
|
+
{}.tap do |hash|
|
|
304
|
+
value.each do |k, v|
|
|
305
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
306
|
+
end
|
|
307
|
+
end
|
|
308
|
+
else # model
|
|
309
|
+
# models (e.g. Pet) or oneOf
|
|
310
|
+
klass = DatadogAPIClient::V1.const_get(type)
|
|
311
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
312
|
+
end
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Returns the string representation of the object
|
|
316
|
+
# @return [String] String presentation of the object
|
|
317
|
+
def to_s
|
|
318
|
+
to_hash.to_s
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
322
|
+
# @return [Hash] Returns the object in the form of hash
|
|
323
|
+
def to_body
|
|
324
|
+
to_hash
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Returns the object in the form of hash
|
|
328
|
+
# @return [Hash] Returns the object in the form of hash
|
|
329
|
+
def to_hash
|
|
330
|
+
hash = {}
|
|
331
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
332
|
+
value = self.send(attr)
|
|
333
|
+
if value.nil?
|
|
334
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
335
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
hash[param] = _to_hash(value)
|
|
339
|
+
end
|
|
340
|
+
hash
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Outputs non-array value in the form of hash
|
|
344
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
345
|
+
# @param [Object] value Any valid value
|
|
346
|
+
# @return [Hash] Returns the value in the form of hash
|
|
347
|
+
def _to_hash(value)
|
|
348
|
+
if value.is_a?(Array)
|
|
349
|
+
value.compact.map { |v| _to_hash(v) }
|
|
350
|
+
elsif value.is_a?(Hash)
|
|
351
|
+
{}.tap do |hash|
|
|
352
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
353
|
+
end
|
|
354
|
+
elsif value.respond_to? :to_hash
|
|
355
|
+
value.to_hash
|
|
356
|
+
else
|
|
357
|
+
value
|
|
358
|
+
end
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
end
|