datadog_api_client 1.0.0.beta.3 → 1.0.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 +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,253 @@
|
|
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
|
+
# Object containing indexed logs usage grouped by retention period and summed.
|
21
|
+
class LogsRetentionSumUsage
|
22
|
+
# Total indexed logs for this retention period.
|
23
|
+
attr_accessor :logs_indexed_logs_usage_sum
|
24
|
+
|
25
|
+
# Live indexed logs for this retention period.
|
26
|
+
attr_accessor :logs_live_indexed_logs_usage_sum
|
27
|
+
|
28
|
+
# Rehydrated indexed logs for this retention period.
|
29
|
+
attr_accessor :logs_rehydrated_indexed_logs_usage_sum
|
30
|
+
|
31
|
+
# The retention period in days or \"custom\" for all custom retention periods.
|
32
|
+
attr_accessor :retention
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'logs_indexed_logs_usage_sum' => :'logs_indexed_logs_usage_sum',
|
38
|
+
:'logs_live_indexed_logs_usage_sum' => :'logs_live_indexed_logs_usage_sum',
|
39
|
+
:'logs_rehydrated_indexed_logs_usage_sum' => :'logs_rehydrated_indexed_logs_usage_sum',
|
40
|
+
:'retention' => :'retention'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Returns all the JSON keys this model knows about
|
45
|
+
def self.acceptable_attributes
|
46
|
+
attribute_map.values
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.openapi_types
|
51
|
+
{
|
52
|
+
:'logs_indexed_logs_usage_sum' => :'Integer',
|
53
|
+
:'logs_live_indexed_logs_usage_sum' => :'Integer',
|
54
|
+
:'logs_rehydrated_indexed_logs_usage_sum' => :'Integer',
|
55
|
+
:'retention' => :'String'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# List of attributes with nullable: true
|
60
|
+
def self.openapi_nullable
|
61
|
+
Set.new([
|
62
|
+
])
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
if (!attributes.is_a?(Hash))
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsRetentionSumUsage` initialize method"
|
70
|
+
end
|
71
|
+
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
74
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsRetentionSumUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
76
|
+
end
|
77
|
+
h[k.to_sym] = v
|
78
|
+
}
|
79
|
+
|
80
|
+
if attributes.key?(:'logs_indexed_logs_usage_sum')
|
81
|
+
self.logs_indexed_logs_usage_sum = attributes[:'logs_indexed_logs_usage_sum']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'logs_live_indexed_logs_usage_sum')
|
85
|
+
self.logs_live_indexed_logs_usage_sum = attributes[:'logs_live_indexed_logs_usage_sum']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'logs_rehydrated_indexed_logs_usage_sum')
|
89
|
+
self.logs_rehydrated_indexed_logs_usage_sum = attributes[:'logs_rehydrated_indexed_logs_usage_sum']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'retention')
|
93
|
+
self.retention = attributes[:'retention']
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
98
|
+
# @return Array for valid properties with the reasons
|
99
|
+
def list_invalid_properties
|
100
|
+
invalid_properties = Array.new
|
101
|
+
invalid_properties
|
102
|
+
end
|
103
|
+
|
104
|
+
# Check to see if the all the properties in the model are valid
|
105
|
+
# @return true if the model is valid
|
106
|
+
def valid?
|
107
|
+
true
|
108
|
+
end
|
109
|
+
|
110
|
+
# Checks equality by comparing each attribute.
|
111
|
+
# @param [Object] Object to be compared
|
112
|
+
def ==(o)
|
113
|
+
return true if self.equal?(o)
|
114
|
+
self.class == o.class &&
|
115
|
+
logs_indexed_logs_usage_sum == o.logs_indexed_logs_usage_sum &&
|
116
|
+
logs_live_indexed_logs_usage_sum == o.logs_live_indexed_logs_usage_sum &&
|
117
|
+
logs_rehydrated_indexed_logs_usage_sum == o.logs_rehydrated_indexed_logs_usage_sum &&
|
118
|
+
retention == o.retention
|
119
|
+
end
|
120
|
+
|
121
|
+
# @see the `==` method
|
122
|
+
# @param [Object] Object to be compared
|
123
|
+
def eql?(o)
|
124
|
+
self == o
|
125
|
+
end
|
126
|
+
|
127
|
+
# Calculates hash code according to all attributes.
|
128
|
+
# @return [Integer] Hash code
|
129
|
+
def hash
|
130
|
+
[logs_indexed_logs_usage_sum, logs_live_indexed_logs_usage_sum, logs_rehydrated_indexed_logs_usage_sum, retention].hash
|
131
|
+
end
|
132
|
+
|
133
|
+
# Builds the object from hash
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
135
|
+
# @return [Object] Returns the model itself
|
136
|
+
def self.build_from_hash(attributes)
|
137
|
+
new.build_from_hash(attributes)
|
138
|
+
end
|
139
|
+
|
140
|
+
# Builds the object from hash
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
+
# @return [Object] Returns the model itself
|
143
|
+
def build_from_hash(attributes)
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
145
|
+
self.class.openapi_types.each_pair do |key, type|
|
146
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
147
|
+
self.send("#{key}=", nil)
|
148
|
+
elsif type =~ /\AArray<(.*)>/i
|
149
|
+
# check to ensure the input is an array given that the attribute
|
150
|
+
# is documented as an array but the input is not
|
151
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
152
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
153
|
+
end
|
154
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
155
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
self
|
160
|
+
end
|
161
|
+
|
162
|
+
# Deserializes the data based on type
|
163
|
+
# @param string type Data type
|
164
|
+
# @param string value Value to be deserialized
|
165
|
+
# @return [Object] Deserialized data
|
166
|
+
def _deserialize(type, value)
|
167
|
+
case type.to_sym
|
168
|
+
when :Time
|
169
|
+
Time.parse(value)
|
170
|
+
when :Date
|
171
|
+
Date.parse(value)
|
172
|
+
when :String
|
173
|
+
value.to_s
|
174
|
+
when :Integer
|
175
|
+
value.to_i
|
176
|
+
when :Float
|
177
|
+
value.to_f
|
178
|
+
when :Boolean
|
179
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
180
|
+
true
|
181
|
+
else
|
182
|
+
false
|
183
|
+
end
|
184
|
+
when :Object
|
185
|
+
# generic object (usually a Hash), return directly
|
186
|
+
value
|
187
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
188
|
+
inner_type = Regexp.last_match[:inner_type]
|
189
|
+
value.map { |v| _deserialize(inner_type, v) }
|
190
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
191
|
+
k_type = Regexp.last_match[:k_type]
|
192
|
+
v_type = Regexp.last_match[:v_type]
|
193
|
+
{}.tap do |hash|
|
194
|
+
value.each do |k, v|
|
195
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
else # model
|
199
|
+
# models (e.g. Pet) or oneOf
|
200
|
+
klass = DatadogAPIClient::V1.const_get(type)
|
201
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the string representation of the object
|
206
|
+
# @return [String] String presentation of the object
|
207
|
+
def to_s
|
208
|
+
to_hash.to_s
|
209
|
+
end
|
210
|
+
|
211
|
+
# to_body is an alias to to_hash (backward compatibility)
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
213
|
+
def to_body
|
214
|
+
to_hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the object in the form of hash
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_hash
|
220
|
+
hash = {}
|
221
|
+
self.class.attribute_map.each_pair do |attr, param|
|
222
|
+
value = self.send(attr)
|
223
|
+
if value.nil?
|
224
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
225
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
226
|
+
end
|
227
|
+
|
228
|
+
hash[param] = _to_hash(value)
|
229
|
+
end
|
230
|
+
hash
|
231
|
+
end
|
232
|
+
|
233
|
+
# Outputs non-array value in the form of hash
|
234
|
+
# For object, use to_hash. Otherwise, just return the value
|
235
|
+
# @param [Object] value Any valid value
|
236
|
+
# @return [Hash] Returns the value in the form of hash
|
237
|
+
def _to_hash(value)
|
238
|
+
if value.is_a?(Array)
|
239
|
+
value.compact.map { |v| _to_hash(v) }
|
240
|
+
elsif value.is_a?(Hash)
|
241
|
+
{}.tap do |hash|
|
242
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
243
|
+
end
|
244
|
+
elsif value.respond_to? :to_hash
|
245
|
+
value.to_hash
|
246
|
+
else
|
247
|
+
value
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
end
|
252
|
+
|
253
|
+
end
|
@@ -28,6 +28,9 @@ module DatadogAPIClient::V1
|
|
28
28
|
# Size of the text.
|
29
29
|
attr_accessor :font_size
|
30
30
|
|
31
|
+
# Whether to add padding or not.
|
32
|
+
attr_accessor :has_padding
|
33
|
+
|
31
34
|
# Whether to show a tick or not.
|
32
35
|
attr_accessor :show_tick
|
33
36
|
|
@@ -40,17 +43,21 @@ module DatadogAPIClient::V1
|
|
40
43
|
|
41
44
|
attr_accessor :type
|
42
45
|
|
46
|
+
attr_accessor :vertical_align
|
47
|
+
|
43
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
44
49
|
def self.attribute_map
|
45
50
|
{
|
46
51
|
:'background_color' => :'background_color',
|
47
52
|
:'content' => :'content',
|
48
53
|
:'font_size' => :'font_size',
|
54
|
+
:'has_padding' => :'has_padding',
|
49
55
|
:'show_tick' => :'show_tick',
|
50
56
|
:'text_align' => :'text_align',
|
51
57
|
:'tick_edge' => :'tick_edge',
|
52
58
|
:'tick_pos' => :'tick_pos',
|
53
|
-
:'type' => :'type'
|
59
|
+
:'type' => :'type',
|
60
|
+
:'vertical_align' => :'vertical_align'
|
54
61
|
}
|
55
62
|
end
|
56
63
|
|
@@ -65,11 +72,13 @@ module DatadogAPIClient::V1
|
|
65
72
|
:'background_color' => :'String',
|
66
73
|
:'content' => :'String',
|
67
74
|
:'font_size' => :'String',
|
75
|
+
:'has_padding' => :'Boolean',
|
68
76
|
:'show_tick' => :'Boolean',
|
69
77
|
:'text_align' => :'WidgetTextAlign',
|
70
78
|
:'tick_edge' => :'WidgetTickEdge',
|
71
79
|
:'tick_pos' => :'String',
|
72
|
-
:'type' => :'NoteWidgetDefinitionType'
|
80
|
+
:'type' => :'NoteWidgetDefinitionType',
|
81
|
+
:'vertical_align' => :'WidgetVerticalAlign'
|
73
82
|
}
|
74
83
|
end
|
75
84
|
|
@@ -106,6 +115,12 @@ module DatadogAPIClient::V1
|
|
106
115
|
self.font_size = attributes[:'font_size']
|
107
116
|
end
|
108
117
|
|
118
|
+
if attributes.key?(:'has_padding')
|
119
|
+
self.has_padding = attributes[:'has_padding']
|
120
|
+
else
|
121
|
+
self.has_padding = true
|
122
|
+
end
|
123
|
+
|
109
124
|
if attributes.key?(:'show_tick')
|
110
125
|
self.show_tick = attributes[:'show_tick']
|
111
126
|
end
|
@@ -127,6 +142,10 @@ module DatadogAPIClient::V1
|
|
127
142
|
else
|
128
143
|
self.type = 'note'
|
129
144
|
end
|
145
|
+
|
146
|
+
if attributes.key?(:'vertical_align')
|
147
|
+
self.vertical_align = attributes[:'vertical_align']
|
148
|
+
end
|
130
149
|
end
|
131
150
|
|
132
151
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -160,11 +179,13 @@ module DatadogAPIClient::V1
|
|
160
179
|
background_color == o.background_color &&
|
161
180
|
content == o.content &&
|
162
181
|
font_size == o.font_size &&
|
182
|
+
has_padding == o.has_padding &&
|
163
183
|
show_tick == o.show_tick &&
|
164
184
|
text_align == o.text_align &&
|
165
185
|
tick_edge == o.tick_edge &&
|
166
186
|
tick_pos == o.tick_pos &&
|
167
|
-
type == o.type
|
187
|
+
type == o.type &&
|
188
|
+
vertical_align == o.vertical_align
|
168
189
|
end
|
169
190
|
|
170
191
|
# @see the `==` method
|
@@ -176,7 +197,7 @@ module DatadogAPIClient::V1
|
|
176
197
|
# Calculates hash code according to all attributes.
|
177
198
|
# @return [Integer] Hash code
|
178
199
|
def hash
|
179
|
-
[background_color, content, font_size, show_tick, text_align, tick_edge, tick_pos, type].hash
|
200
|
+
[background_color, content, font_size, has_padding, show_tick, text_align, tick_edge, tick_pos, type, vertical_align].hash
|
180
201
|
end
|
181
202
|
|
182
203
|
# Builds the object from hash
|
@@ -0,0 +1,253 @@
|
|
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
|
+
# Absolute timeframe.
|
21
|
+
class NotebookAbsoluteTime
|
22
|
+
# The end time.
|
23
|
+
attr_accessor :_end
|
24
|
+
|
25
|
+
# Indicates whether the timeframe should be shifted to end at the current time.
|
26
|
+
attr_accessor :live
|
27
|
+
|
28
|
+
# The start time.
|
29
|
+
attr_accessor :start
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'_end' => :'end',
|
35
|
+
:'live' => :'live',
|
36
|
+
:'start' => :'start'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'_end' => :'Time',
|
49
|
+
:'live' => :'Boolean',
|
50
|
+
:'start' => :'Time'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# List of attributes with nullable: true
|
55
|
+
def self.openapi_nullable
|
56
|
+
Set.new([
|
57
|
+
])
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
def initialize(attributes = {})
|
63
|
+
if (!attributes.is_a?(Hash))
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookAbsoluteTime` initialize method"
|
65
|
+
end
|
66
|
+
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
69
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookAbsoluteTime`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
71
|
+
end
|
72
|
+
h[k.to_sym] = v
|
73
|
+
}
|
74
|
+
|
75
|
+
if attributes.key?(:'_end')
|
76
|
+
self._end = attributes[:'_end']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'live')
|
80
|
+
self.live = attributes[:'live']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'start')
|
84
|
+
self.start = attributes[:'start']
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
89
|
+
# @return Array for valid properties with the reasons
|
90
|
+
def list_invalid_properties
|
91
|
+
invalid_properties = Array.new
|
92
|
+
if @_end.nil?
|
93
|
+
invalid_properties.push('invalid value for "_end", _end cannot be nil.')
|
94
|
+
end
|
95
|
+
|
96
|
+
if @start.nil?
|
97
|
+
invalid_properties.push('invalid value for "start", start cannot be nil.')
|
98
|
+
end
|
99
|
+
|
100
|
+
invalid_properties
|
101
|
+
end
|
102
|
+
|
103
|
+
# Check to see if the all the properties in the model are valid
|
104
|
+
# @return true if the model is valid
|
105
|
+
def valid?
|
106
|
+
return false if @_end.nil?
|
107
|
+
return false if @start.nil?
|
108
|
+
true
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
_end == o._end &&
|
117
|
+
live == o.live &&
|
118
|
+
start == o.start
|
119
|
+
end
|
120
|
+
|
121
|
+
# @see the `==` method
|
122
|
+
# @param [Object] Object to be compared
|
123
|
+
def eql?(o)
|
124
|
+
self == o
|
125
|
+
end
|
126
|
+
|
127
|
+
# Calculates hash code according to all attributes.
|
128
|
+
# @return [Integer] Hash code
|
129
|
+
def hash
|
130
|
+
[_end, live, start].hash
|
131
|
+
end
|
132
|
+
|
133
|
+
# Builds the object from hash
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
135
|
+
# @return [Object] Returns the model itself
|
136
|
+
def self.build_from_hash(attributes)
|
137
|
+
new.build_from_hash(attributes)
|
138
|
+
end
|
139
|
+
|
140
|
+
# Builds the object from hash
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
+
# @return [Object] Returns the model itself
|
143
|
+
def build_from_hash(attributes)
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
145
|
+
self.class.openapi_types.each_pair do |key, type|
|
146
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
147
|
+
self.send("#{key}=", nil)
|
148
|
+
elsif type =~ /\AArray<(.*)>/i
|
149
|
+
# check to ensure the input is an array given that the attribute
|
150
|
+
# is documented as an array but the input is not
|
151
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
152
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
153
|
+
end
|
154
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
155
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
self
|
160
|
+
end
|
161
|
+
|
162
|
+
# Deserializes the data based on type
|
163
|
+
# @param string type Data type
|
164
|
+
# @param string value Value to be deserialized
|
165
|
+
# @return [Object] Deserialized data
|
166
|
+
def _deserialize(type, value)
|
167
|
+
case type.to_sym
|
168
|
+
when :Time
|
169
|
+
Time.parse(value)
|
170
|
+
when :Date
|
171
|
+
Date.parse(value)
|
172
|
+
when :String
|
173
|
+
value.to_s
|
174
|
+
when :Integer
|
175
|
+
value.to_i
|
176
|
+
when :Float
|
177
|
+
value.to_f
|
178
|
+
when :Boolean
|
179
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
180
|
+
true
|
181
|
+
else
|
182
|
+
false
|
183
|
+
end
|
184
|
+
when :Object
|
185
|
+
# generic object (usually a Hash), return directly
|
186
|
+
value
|
187
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
188
|
+
inner_type = Regexp.last_match[:inner_type]
|
189
|
+
value.map { |v| _deserialize(inner_type, v) }
|
190
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
191
|
+
k_type = Regexp.last_match[:k_type]
|
192
|
+
v_type = Regexp.last_match[:v_type]
|
193
|
+
{}.tap do |hash|
|
194
|
+
value.each do |k, v|
|
195
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
else # model
|
199
|
+
# models (e.g. Pet) or oneOf
|
200
|
+
klass = DatadogAPIClient::V1.const_get(type)
|
201
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the string representation of the object
|
206
|
+
# @return [String] String presentation of the object
|
207
|
+
def to_s
|
208
|
+
to_hash.to_s
|
209
|
+
end
|
210
|
+
|
211
|
+
# to_body is an alias to to_hash (backward compatibility)
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
213
|
+
def to_body
|
214
|
+
to_hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the object in the form of hash
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_hash
|
220
|
+
hash = {}
|
221
|
+
self.class.attribute_map.each_pair do |attr, param|
|
222
|
+
value = self.send(attr)
|
223
|
+
if value.nil?
|
224
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
225
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
226
|
+
end
|
227
|
+
|
228
|
+
hash[param] = _to_hash(value)
|
229
|
+
end
|
230
|
+
hash
|
231
|
+
end
|
232
|
+
|
233
|
+
# Outputs non-array value in the form of hash
|
234
|
+
# For object, use to_hash. Otherwise, just return the value
|
235
|
+
# @param [Object] value Any valid value
|
236
|
+
# @return [Hash] Returns the value in the form of hash
|
237
|
+
def _to_hash(value)
|
238
|
+
if value.is_a?(Array)
|
239
|
+
value.compact.map { |v| _to_hash(v) }
|
240
|
+
elsif value.is_a?(Hash)
|
241
|
+
{}.tap do |hash|
|
242
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
243
|
+
end
|
244
|
+
elsif value.respond_to? :to_hash
|
245
|
+
value.to_hash
|
246
|
+
else
|
247
|
+
value
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
end
|
252
|
+
|
253
|
+
end
|