datadog_api_client 1.11.0 → 2.0.2
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/.generator/conftest.py +2 -1
- data/.generator/schemas/v1/openapi.yaml +293 -116
- data/.generator/schemas/v2/openapi.yaml +1156 -41
- data/.generator/src/generator/cli.py +57 -40
- data/.generator/src/generator/openapi.py +12 -6
- data/.generator/src/generator/templates/api.j2 +14 -13
- data/.generator/src/generator/templates/api_client.j2 +63 -11
- data/.generator/src/generator/templates/configuration.j2 +12 -8
- data/.generator/src/generator/templates/example.j2 +6 -1
- data/.generator/src/generator/templates/inflector.j2 +28 -0
- data/.generator/src/generator/templates/model_base.j2 +2 -2
- data/.generator/src/generator/templates/model_oneof.j2 +1 -1
- data/.generator/src/generator/templates/package.j2 +7 -12
- data/.github/workflows/approved_status.yml +0 -2
- data/.github/workflows/codeql-analysis.yml +49 -0
- data/.github/workflows/docs.yml +1 -1
- data/.github/workflows/prepare_release.yml +1 -1
- data/.github/workflows/publish.yml +1 -1
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/test.yml +4 -6
- data/.github/workflows/test_integration.yml +1 -1
- data/.pre-commit-config.yaml +3 -12
- data/CHANGELOG.md +44 -0
- data/Gemfile +1 -0
- data/Makefile +1 -2
- data/README.md +13 -13
- data/datadog_api_client.gemspec +2 -0
- data/examples/v1/downtimes/CreateDowntime_1393233946.rb +3 -0
- data/examples/v1/downtimes/CreateDowntime_2908359488.rb +3 -0
- data/examples/v1/downtimes/CreateDowntime_3059354445.rb +3 -0
- data/examples/v1/events/ListEvents.rb +1 -1
- data/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.rb +2 -2
- data/examples/v1/service-level-objectives/GetSLOHistory.rb +1 -1
- data/examples/v1/service-level-objectives/SearchSLO.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +1 -1
- data/examples/v1/synthetics/GetAPITestLatestResults.rb +1 -1
- data/examples/v1/synthetics/GetAPITestResult.rb +1 -1
- data/examples/v1/synthetics/GetBrowserTestLatestResults.rb +1 -1
- data/examples/v1/synthetics/GetBrowserTestResult.rb +1 -1
- data/examples/v1/usage-metering/GetDailyCustomReports.rb +1 -1
- data/examples/v1/usage-metering/GetHourlyUsageAttribution.rb +0 -3
- data/examples/v1/usage-metering/GetMonthlyCustomReports.rb +1 -1
- data/examples/v1/usage-metering/GetMonthlyUsageAttribution.rb +0 -3
- data/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb +1 -1
- data/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb +1 -1
- data/examples/v1/usage-metering/GetUsageAttribution.rb +1 -1
- data/examples/v1/usage-metering/GetUsageCIApp.rb +2 -5
- data/examples/v1/usage-metering/GetUsageCIApp_1064440884.rb +8 -0
- data/examples/v1/usage-metering/GetUsageCWS.rb +2 -5
- data/examples/v1/usage-metering/GetUsageCWS_736958514.rb +8 -0
- data/examples/v1/usage-metering/GetUsageDBM.rb +2 -5
- data/examples/v1/usage-metering/GetUsageDBM_3446806203.rb +8 -0
- data/examples/v1/usage-metering/GetUsageLambda.rb +2 -5
- data/examples/v1/usage-metering/GetUsageLambda_3132428705.rb +8 -0
- data/examples/v1/usage-metering/GetUsageLogs.rb +2 -5
- data/examples/v1/usage-metering/GetUsageLogsByIndex.rb +2 -5
- data/examples/v1/usage-metering/GetUsageLogsByIndex_1025184776.rb +8 -0
- data/examples/v1/usage-metering/GetUsageLogs_2562396405.rb +8 -0
- data/examples/v1/usage-metering/GetUsageNetworkFlows.rb +2 -5
- data/examples/v1/usage-metering/GetUsageNetworkFlows_1239422069.rb +8 -0
- data/examples/v1/usage-metering/GetUsageNetworkHosts.rb +2 -5
- data/examples/v1/usage-metering/GetUsageNetworkHosts_1249907835.rb +8 -0
- data/examples/v1/usage-metering/GetUsageOnlineArchive.rb +2 -5
- data/examples/v1/usage-metering/GetUsageOnlineArchive_1501172903.rb +8 -0
- data/examples/v1/usage-metering/GetUsageRumSessions.rb +2 -5
- data/examples/v1/usage-metering/GetUsageRumSessions_714937291.rb +8 -0
- data/examples/v1/usage-metering/GetUsageRumUnits.rb +2 -5
- data/examples/v1/usage-metering/GetUsageRumUnits_3959755399.rb +8 -0
- data/examples/v1/usage-metering/GetUsageSDS.rb +2 -5
- data/examples/v1/usage-metering/GetUsageSDS_271128478.rb +8 -0
- data/examples/v1/usage-metering/GetUsageSynthetics.rb +1 -1
- data/examples/v1/usage-metering/GetUsageSyntheticsAPI.rb +2 -5
- data/examples/v1/usage-metering/GetUsageSyntheticsAPI_4048033529.rb +8 -0
- data/examples/v1/usage-metering/GetUsageSyntheticsBrowser.rb +2 -5
- data/examples/v1/usage-metering/GetUsageSyntheticsBrowser_1704663299.rb +8 -0
- data/examples/v2/audit/ListAuditLogs_1275402458.rb +8 -0
- data/examples/v2/audit/SearchAuditLogs_3215529662.rb +22 -0
- data/examples/v2/events/ListEvents.rb +8 -0
- data/examples/v2/events/ListEvents_1527584014.rb +13 -0
- data/examples/v2/events/ListEvents_2663715109.rb +14 -0
- data/examples/v2/events/SearchEvents.rb +23 -0
- data/examples/v2/events/SearchEvents_3856995058.rb +25 -0
- data/examples/v2/incident-services/CreateIncidentService.rb +1 -1
- data/examples/v2/incident-services/DeleteIncidentService.rb +1 -1
- data/examples/v2/incident-services/GetIncidentService.rb +1 -1
- data/examples/v2/incident-services/ListIncidentServices.rb +1 -1
- data/examples/v2/incident-services/UpdateIncidentService.rb +1 -1
- data/examples/v2/incident-teams/CreateIncidentTeam.rb +1 -1
- data/examples/v2/incident-teams/DeleteIncidentTeam.rb +1 -1
- data/examples/v2/incident-teams/GetIncidentTeam.rb +1 -1
- data/examples/v2/incident-teams/ListIncidentTeams.rb +1 -1
- data/examples/v2/incident-teams/UpdateIncidentTeam.rb +1 -1
- data/examples/v2/incidents/CreateIncident.rb +1 -1
- data/examples/v2/incidents/DeleteIncident.rb +1 -1
- data/examples/v2/incidents/GetIncident.rb +1 -1
- data/examples/v2/incidents/ListIncidents.rb +1 -1
- data/examples/v2/incidents/ListIncidents_2665616954.rb +11 -0
- data/examples/v2/incidents/UpdateIncident.rb +1 -1
- data/examples/v2/incidents/UpdateIncident_1009194038.rb +1 -1
- data/examples/v2/incidents/UpdateIncident_3369341440.rb +1 -1
- data/examples/v2/logs/ListLogsGet_738202670.rb +8 -0
- data/examples/v2/logs/ListLogs_3138392594.rb +25 -0
- data/examples/v2/metrics/SubmitMetrics.rb +6 -0
- data/examples/v2/processes/ListProcesses_797840471.rb +8 -0
- data/examples/v2/rum/ListRUMEvents_2680821282.rb +8 -0
- data/examples/v2/rum/SearchRUMEvents_574690310.rb +21 -0
- data/examples/v2/security-monitoring/EditSecurityMonitoringSignalAssignee.rb +15 -0
- data/examples/v2/security-monitoring/EditSecurityMonitoringSignalIncidents.rb +15 -0
- data/examples/v2/security-monitoring/EditSecurityMonitoringSignalState.rb +14 -0
- data/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.rb +8 -0
- data/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.rb +20 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +1 -0
- data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +5 -2
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +11 -0
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +11 -0
- data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.rb +2 -5
- data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring_3959166796.rb +8 -0
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +2 -5
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations_1436752065.rb +8 -0
- data/examples/v2/usage-metering/GetUsageObservabilityPipelines.rb +2 -5
- data/examples/v2/usage-metering/GetUsageObservabilityPipelines_970725512.rb +8 -0
- data/lib/datadog_api_client/{v2/api_client.rb → api_client.rb} +63 -11
- data/lib/datadog_api_client/api_key_configuration.rb +1 -18
- data/lib/datadog_api_client/{v1/configuration.rb → configuration.rb} +84 -31
- data/lib/datadog_api_client/inflector.rb +1293 -0
- data/lib/datadog_api_client/models.rb +66 -0
- data/lib/datadog_api_client/v1/api/authentication_api.rb +3 -11
- data/lib/datadog_api_client/v1/api/aws_integration_api.rb +19 -91
- data/lib/datadog_api_client/v1/api/aws_logs_integration_api.rb +15 -71
- data/lib/datadog_api_client/v1/api/azure_integration_api.rb +11 -51
- data/lib/datadog_api_client/v1/api/dashboard_lists_api.rb +11 -51
- data/lib/datadog_api_client/v1/api/dashboards_api.rb +15 -71
- data/lib/datadog_api_client/v1/api/downtimes_api.rb +15 -71
- data/lib/datadog_api_client/v1/api/events_api.rb +9 -33
- data/lib/datadog_api_client/v1/api/gcp_integration_api.rb +9 -41
- data/lib/datadog_api_client/v1/api/hosts_api.rb +9 -41
- data/lib/datadog_api_client/v1/api/ip_ranges_api.rb +3 -11
- data/lib/datadog_api_client/v1/api/key_management_api.rb +21 -101
- data/lib/datadog_api_client/v1/api/logs_api.rb +5 -21
- data/lib/datadog_api_client/v1/api/logs_indexes_api.rb +13 -61
- data/lib/datadog_api_client/v1/api/logs_pipelines_api.rb +15 -71
- data/lib/datadog_api_client/v1/api/metrics_api.rb +15 -71
- data/lib/datadog_api_client/v1/api/monitors_api.rb +21 -101
- data/lib/datadog_api_client/v1/api/notebooks_api.rb +11 -51
- data/lib/datadog_api_client/v1/api/organizations_api.rb +13 -61
- data/lib/datadog_api_client/v1/api/pager_duty_integration_api.rb +9 -41
- data/lib/datadog_api_client/v1/api/security_monitoring_api.rb +8 -32
- data/lib/datadog_api_client/v1/api/service_checks_api.rb +3 -11
- data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +11 -51
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +31 -99
- data/lib/datadog_api_client/v1/api/slack_integration_api.rb +11 -51
- data/lib/datadog_api_client/v1/api/snapshots_api.rb +3 -11
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +55 -271
- data/lib/datadog_api_client/v1/api/tags_api.rb +11 -51
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +171 -418
- data/lib/datadog_api_client/v1/api/users_api.rb +11 -51
- data/lib/datadog_api_client/v1/api/webhooks_integration_api.rb +17 -81
- data/lib/datadog_api_client/v1/model_base.rb +2 -2
- data/lib/datadog_api_client/v1/models/distribution_point_item.rb +1 -1
- data/lib/datadog_api_client/v1/models/distribution_widget_histogram_request_query.rb +1 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb +1 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb +5 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +7 -0
- data/lib/datadog_api_client/v1/models/logs_processor.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_query_definition.rb +1 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb +6 -2
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +14 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_cell_response_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_cell_time.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_cell_update_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_global_time.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_update_cell.rb +1 -1
- data/lib/datadog_api_client/v1/models/sunburst_widget_legend.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_assertion.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth.rb +1 -1
- data/lib/datadog_api_client/v1/models/tree_map_color_by.rb +1 -1
- data/lib/datadog_api_client/v1/models/tree_map_group_by.rb +1 -1
- data/lib/datadog_api_client/v1/models/tree_map_size_by.rb +1 -1
- data/lib/datadog_api_client/v1/models/tree_map_widget_definition.rb +28 -6
- data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +6 -2
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +22 -2
- data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -1
- data/lib/datadog_api_client/v2/api/audit_api.rb +11 -25
- data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +11 -51
- data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +13 -61
- data/lib/datadog_api_client/v2/api/dashboard_lists_api.rb +9 -41
- data/lib/datadog_api_client/v2/api/events_api.rb +228 -0
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +36 -46
- data/lib/datadog_api_client/v2/api/incident_teams_api.rb +36 -46
- data/lib/datadog_api_client/v2/api/incidents_api.rb +39 -48
- data/lib/datadog_api_client/v2/api/key_management_api.rb +29 -141
- data/lib/datadog_api_client/v2/api/logs_api.rb +15 -45
- data/lib/datadog_api_client/v2/api/logs_archives_api.rb +21 -101
- data/lib/datadog_api_client/v2/api/logs_metrics_api.rb +11 -51
- data/lib/datadog_api_client/v2/api/metrics_api.rb +26 -112
- data/lib/datadog_api_client/v2/api/opsgenie_integration_api.rb +11 -51
- data/lib/datadog_api_client/v2/api/organizations_api.rb +3 -11
- data/lib/datadog_api_client/v2/api/processes_api.rb +6 -13
- data/lib/datadog_api_client/v2/api/roles_api.rb +27 -131
- data/lib/datadog_api_client/v2/api/rum_api.rb +13 -35
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +247 -125
- data/lib/datadog_api_client/v2/api/service_accounts_api.rb +11 -51
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +132 -68
- data/lib/datadog_api_client/v2/api/users_api.rb +21 -101
- data/lib/datadog_api_client/v2/model_base.rb +2 -2
- data/lib/datadog_api_client/v2/models/api_key_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/application_key_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_included.rb +1 -1
- data/lib/datadog_api_client/v2/models/event.rb +141 -0
- data/lib/datadog_api_client/v2/models/event_attributes.rb +305 -0
- data/lib/datadog_api_client/v2/models/event_priority.rb +27 -0
- data/lib/datadog_api_client/v2/models/event_response.rb +133 -0
- data/lib/datadog_api_client/v2/models/event_response_attributes.rb +133 -0
- data/lib/datadog_api_client/v2/models/event_status_type.rb +35 -0
- data/lib/datadog_api_client/v2/models/event_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/events_list_request.rb +142 -0
- data/lib/datadog_api_client/v2/models/events_list_response.rb +133 -0
- data/lib/datadog_api_client/v2/models/events_list_response_links.rb +112 -0
- data/lib/datadog_api_client/v2/models/events_query_filter.rb +137 -0
- data/lib/datadog_api_client/v2/models/events_query_options.rb +124 -0
- data/lib/datadog_api_client/v2/models/events_request_page.rb +134 -0
- data/lib/datadog_api_client/v2/models/events_response_metadata.rb +144 -0
- data/lib/datadog_api_client/v2/models/events_response_metadata_page.rb +112 -0
- data/lib/datadog_api_client/v2/models/events_sort.rb +27 -0
- data/lib/datadog_api_client/v2/models/events_warning.rb +131 -0
- data/lib/datadog_api_client/v2/models/hourly_usage.rb +133 -0
- data/lib/datadog_api_client/v2/models/hourly_usage_attributes.rb +163 -0
- data/lib/datadog_api_client/v2/models/hourly_usage_measurement.rb +122 -0
- data/lib/datadog_api_client/v2/models/hourly_usage_metadata.rb +111 -0
- data/lib/datadog_api_client/v2/models/hourly_usage_pagination.rb +112 -0
- data/lib/datadog_api_client/v2/models/hourly_usage_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/incident_field_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_service_included_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_team_included_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_timeline_cell_create_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_aggregate_bucket_value.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_archive_create_request_destination.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_archive_destination.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_group_by_missing.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_group_by_total.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_intake_type.rb +1 -2
- data/lib/datadog_api_client/v2/models/metric_resource.rb +2 -2
- data/lib/datadog_api_client/v2/models/metric_series.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_volumes.rb +1 -1
- data/lib/datadog_api_client/v2/models/metrics_and_metric_tag_configurations.rb +1 -1
- data/lib/datadog_api_client/v2/models/monitor_type.rb +215 -0
- data/lib/datadog_api_client/v2/models/rum_aggregate_bucket_value.rb +1 -1
- data/lib/datadog_api_client/v2/models/rum_group_by_missing.rb +1 -1
- data/lib/datadog_api_client/v2/models/rum_group_by_total.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_create.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_archive_reason.rb +29 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_attributes.rb +132 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_data.rb +122 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_attributes.rb +134 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_data.rb +122 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_state.rb +28 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_attributes.rb +152 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_data.rb +122 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_attributes.rb +248 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_data.rb +111 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_response.rb +122 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_triage_user.rb +152 -0
- data/lib/datadog_api_client/v2/models/user_response_included_item.rb +1 -1
- data/lib/datadog_api_client/version.rb +1 -1
- data/lib/datadog_api_client.rb +13 -5
- data/spec/{v1/api_client_spec.rb → api_client_spec.rb} +29 -29
- data/spec/{v1/configuration_spec.rb → configuration_spec.rb} +3 -3
- data/spec/spec_helper.rb +1 -3
- metadata +109 -22
- data/.dockerignore +0 -1
- data/.generator/src/generator/templates/api_error.j2 +0 -49
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_1171921972.rb +0 -9
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_627383212.rb +0 -9
- data/lib/datadog_api_client/v1/api_client.rb +0 -453
- data/lib/datadog_api_client/v1/api_error.rb +0 -60
- data/lib/datadog_api_client/v1.rb +0 -813
- data/lib/datadog_api_client/v2/api_error.rb +0 -60
- data/lib/datadog_api_client/v2/configuration.rb +0 -420
- data/lib/datadog_api_client/v2.rb +0 -555
- data/spec/v2/api_client_spec.rb +0 -210
- data/spec/v2/configuration_spec.rb +0 -45
@@ -0,0 +1,134 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Pagination settings.
|
21
|
+
class EventsRequestPage
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# The returned paging point to use to get the next results.
|
29
|
+
attr_accessor :cursor
|
30
|
+
|
31
|
+
# The maximum number of logs in the response.
|
32
|
+
attr_accessor :limit
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
# @!visibility private
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'cursor' => :'cursor',
|
39
|
+
:'limit' => :'limit'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Returns all the JSON keys this model knows about
|
44
|
+
# @!visibility private
|
45
|
+
def self.acceptable_attributes
|
46
|
+
attribute_map.values
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
# @!visibility private
|
51
|
+
def self.openapi_types
|
52
|
+
{
|
53
|
+
:'cursor' => :'String',
|
54
|
+
:'limit' => :'Integer'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# List of attributes with nullable: true
|
59
|
+
# @!visibility private
|
60
|
+
def self.openapi_nullable
|
61
|
+
Set.new([
|
62
|
+
])
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
67
|
+
# @!visibility private
|
68
|
+
def initialize(attributes = {})
|
69
|
+
if (!attributes.is_a?(Hash))
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsRequestPage` initialize method"
|
71
|
+
end
|
72
|
+
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsRequestPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
|
+
end
|
78
|
+
h[k.to_sym] = v
|
79
|
+
}
|
80
|
+
|
81
|
+
if attributes.key?(:'cursor')
|
82
|
+
self.cursor = attributes[:'cursor']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'limit')
|
86
|
+
self.limit = attributes[:'limit']
|
87
|
+
else
|
88
|
+
self.limit = 10
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
# @!visibility private
|
95
|
+
def valid?
|
96
|
+
return false if !@limit.nil? && @limit > 1000
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
# Custom attribute writer method with validation
|
101
|
+
# @param limit [Object] Object to be assigned
|
102
|
+
# @!visibility private
|
103
|
+
def limit=(limit)
|
104
|
+
if !limit.nil? && limit > 1000
|
105
|
+
fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 1000.'
|
106
|
+
end
|
107
|
+
@limit = limit
|
108
|
+
end
|
109
|
+
|
110
|
+
# Checks equality by comparing each attribute.
|
111
|
+
# @param o [Object] Object to be compared
|
112
|
+
# @!visibility private
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
cursor == o.cursor &&
|
117
|
+
limit == o.limit
|
118
|
+
end
|
119
|
+
|
120
|
+
# @see the `==` method
|
121
|
+
# @param o [Object] Object to be compared
|
122
|
+
# @!visibility private
|
123
|
+
def eql?(o)
|
124
|
+
self == o
|
125
|
+
end
|
126
|
+
|
127
|
+
# Calculates hash code according to all attributes.
|
128
|
+
# @return [Integer] Hash code
|
129
|
+
# @!visibility private
|
130
|
+
def hash
|
131
|
+
[cursor, limit].hash
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# The metadata associated with a request.
|
21
|
+
class EventsResponseMetadata
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# The time elapsed in milliseconds.
|
29
|
+
attr_accessor :elapsed
|
30
|
+
|
31
|
+
# Pagination attributes.
|
32
|
+
attr_accessor :page
|
33
|
+
|
34
|
+
# The identifier of the request.
|
35
|
+
attr_accessor :request_id
|
36
|
+
|
37
|
+
# A list of warnings (non-fatal errors) encountered. Partial results might be returned if
|
38
|
+
# warnings are present in the response.
|
39
|
+
attr_accessor :warnings
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
# @!visibility private
|
43
|
+
def self.attribute_map
|
44
|
+
{
|
45
|
+
:'elapsed' => :'elapsed',
|
46
|
+
:'page' => :'page',
|
47
|
+
:'request_id' => :'request_id',
|
48
|
+
:'warnings' => :'warnings'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
# @!visibility private
|
54
|
+
def self.acceptable_attributes
|
55
|
+
attribute_map.values
|
56
|
+
end
|
57
|
+
|
58
|
+
# Attribute type mapping.
|
59
|
+
# @!visibility private
|
60
|
+
def self.openapi_types
|
61
|
+
{
|
62
|
+
:'elapsed' => :'Integer',
|
63
|
+
:'page' => :'EventsResponseMetadataPage',
|
64
|
+
:'request_id' => :'String',
|
65
|
+
:'warnings' => :'Array<EventsWarning>'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# List of attributes with nullable: true
|
70
|
+
# @!visibility private
|
71
|
+
def self.openapi_nullable
|
72
|
+
Set.new([
|
73
|
+
])
|
74
|
+
end
|
75
|
+
|
76
|
+
# Initializes the object
|
77
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
78
|
+
# @!visibility private
|
79
|
+
def initialize(attributes = {})
|
80
|
+
if (!attributes.is_a?(Hash))
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsResponseMetadata` initialize method"
|
82
|
+
end
|
83
|
+
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
86
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
|
+
end
|
89
|
+
h[k.to_sym] = v
|
90
|
+
}
|
91
|
+
|
92
|
+
if attributes.key?(:'elapsed')
|
93
|
+
self.elapsed = attributes[:'elapsed']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'page')
|
97
|
+
self.page = attributes[:'page']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.key?(:'request_id')
|
101
|
+
self.request_id = attributes[:'request_id']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'warnings')
|
105
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
106
|
+
self.warnings = value
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# Check to see if the all the properties in the model are valid
|
112
|
+
# @return true if the model is valid
|
113
|
+
# @!visibility private
|
114
|
+
def valid?
|
115
|
+
true
|
116
|
+
end
|
117
|
+
|
118
|
+
# Checks equality by comparing each attribute.
|
119
|
+
# @param o [Object] Object to be compared
|
120
|
+
# @!visibility private
|
121
|
+
def ==(o)
|
122
|
+
return true if self.equal?(o)
|
123
|
+
self.class == o.class &&
|
124
|
+
elapsed == o.elapsed &&
|
125
|
+
page == o.page &&
|
126
|
+
request_id == o.request_id &&
|
127
|
+
warnings == o.warnings
|
128
|
+
end
|
129
|
+
|
130
|
+
# @see the `==` method
|
131
|
+
# @param o [Object] Object to be compared
|
132
|
+
# @!visibility private
|
133
|
+
def eql?(o)
|
134
|
+
self == o
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Integer] Hash code
|
139
|
+
# @!visibility private
|
140
|
+
def hash
|
141
|
+
[elapsed, page, request_id, warnings].hash
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Pagination attributes.
|
21
|
+
class EventsResponseMetadataPage
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# The cursor to use to get the next results, if any. To make the next request, use the same
|
29
|
+
# parameters with the addition of the `page[cursor]`.
|
30
|
+
attr_accessor :after
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
# @!visibility private
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'after' => :'after'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
# @!visibility private
|
42
|
+
def self.acceptable_attributes
|
43
|
+
attribute_map.values
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
# @!visibility private
|
48
|
+
def self.openapi_types
|
49
|
+
{
|
50
|
+
:'after' => :'String'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# List of attributes with nullable: true
|
55
|
+
# @!visibility private
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
63
|
+
# @!visibility private
|
64
|
+
def initialize(attributes = {})
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsResponseMetadataPage` initialize method"
|
67
|
+
end
|
68
|
+
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsResponseMetadataPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'after')
|
78
|
+
self.after = attributes[:'after']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
# @!visibility private
|
85
|
+
def valid?
|
86
|
+
true
|
87
|
+
end
|
88
|
+
|
89
|
+
# Checks equality by comparing each attribute.
|
90
|
+
# @param o [Object] Object to be compared
|
91
|
+
# @!visibility private
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
after == o.after
|
96
|
+
end
|
97
|
+
|
98
|
+
# @see the `==` method
|
99
|
+
# @param o [Object] Object to be compared
|
100
|
+
# @!visibility private
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Integer] Hash code
|
107
|
+
# @!visibility private
|
108
|
+
def hash
|
109
|
+
[after].hash
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# The sort parameters when querying events.
|
21
|
+
class EventsSort
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
TIMESTAMP_ASCENDING = "timestamp".freeze
|
25
|
+
TIMESTAMP_DESCENDING = "-timestamp".freeze
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# A warning message indicating something is wrong with the query.
|
21
|
+
class EventsWarning
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# A unique code for this type of warning.
|
29
|
+
attr_accessor :code
|
30
|
+
|
31
|
+
# A detailed explanation of this specific warning.
|
32
|
+
attr_accessor :detail
|
33
|
+
|
34
|
+
# A short human-readable summary of the warning.
|
35
|
+
attr_accessor :title
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
# @!visibility private
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'code' => :'code',
|
42
|
+
:'detail' => :'detail',
|
43
|
+
:'title' => :'title'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
# @!visibility private
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
# @!visibility private
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'code' => :'String',
|
58
|
+
:'detail' => :'String',
|
59
|
+
:'title' => :'String'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# List of attributes with nullable: true
|
64
|
+
# @!visibility private
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
])
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
72
|
+
# @!visibility private
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsWarning` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsWarning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
83
|
+
h[k.to_sym] = v
|
84
|
+
}
|
85
|
+
|
86
|
+
if attributes.key?(:'code')
|
87
|
+
self.code = attributes[:'code']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'detail')
|
91
|
+
self.detail = attributes[:'detail']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'title')
|
95
|
+
self.title = attributes[:'title']
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# Check to see if the all the properties in the model are valid
|
100
|
+
# @return true if the model is valid
|
101
|
+
# @!visibility private
|
102
|
+
def valid?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param o [Object] Object to be compared
|
108
|
+
# @!visibility private
|
109
|
+
def ==(o)
|
110
|
+
return true if self.equal?(o)
|
111
|
+
self.class == o.class &&
|
112
|
+
code == o.code &&
|
113
|
+
detail == o.detail &&
|
114
|
+
title == o.title
|
115
|
+
end
|
116
|
+
|
117
|
+
# @see the `==` method
|
118
|
+
# @param o [Object] Object to be compared
|
119
|
+
# @!visibility private
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
# @!visibility private
|
127
|
+
def hash
|
128
|
+
[code, detail, title].hash
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,133 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Hourly usage for a product family for an org.
|
21
|
+
class HourlyUsage
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# Attributes of hourly usage for a product family for an org for a time period.
|
29
|
+
attr_accessor :attributes
|
30
|
+
|
31
|
+
# Unique ID of the response.
|
32
|
+
attr_accessor :id
|
33
|
+
|
34
|
+
# Type of usage data.
|
35
|
+
attr_accessor :type
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
# @!visibility private
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'attributes' => :'attributes',
|
42
|
+
:'id' => :'id',
|
43
|
+
:'type' => :'type'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
# @!visibility private
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
# @!visibility private
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'attributes' => :'HourlyUsageAttributes',
|
58
|
+
:'id' => :'String',
|
59
|
+
:'type' => :'UsageTimeSeriesType'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# List of attributes with nullable: true
|
64
|
+
# @!visibility private
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
])
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
72
|
+
# @!visibility private
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HourlyUsage` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HourlyUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
83
|
+
h[k.to_sym] = v
|
84
|
+
}
|
85
|
+
|
86
|
+
if attributes.key?(:'attributes')
|
87
|
+
self.attributes = attributes[:'attributes']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'id')
|
91
|
+
self.id = attributes[:'id']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'type')
|
95
|
+
self.type = attributes[:'type']
|
96
|
+
else
|
97
|
+
self.type = 'usage_timeseries'
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# Check to see if the all the properties in the model are valid
|
102
|
+
# @return true if the model is valid
|
103
|
+
# @!visibility private
|
104
|
+
def valid?
|
105
|
+
true
|
106
|
+
end
|
107
|
+
|
108
|
+
# Checks equality by comparing each attribute.
|
109
|
+
# @param o [Object] Object to be compared
|
110
|
+
# @!visibility private
|
111
|
+
def ==(o)
|
112
|
+
return true if self.equal?(o)
|
113
|
+
self.class == o.class &&
|
114
|
+
attributes == o.attributes &&
|
115
|
+
id == o.id &&
|
116
|
+
type == o.type
|
117
|
+
end
|
118
|
+
|
119
|
+
# @see the `==` method
|
120
|
+
# @param o [Object] Object to be compared
|
121
|
+
# @!visibility private
|
122
|
+
def eql?(o)
|
123
|
+
self == o
|
124
|
+
end
|
125
|
+
|
126
|
+
# Calculates hash code according to all attributes.
|
127
|
+
# @return [Integer] Hash code
|
128
|
+
# @!visibility private
|
129
|
+
def hash
|
130
|
+
[attributes, id, type].hash
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|