datadog_api_client 2.31.1 → 2.32.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/.generator/schemas/v1/openapi.yaml +80 -4
- data/.generator/schemas/v2/openapi.yaml +2404 -55
- data/.generator/src/generator/cli.py +1 -1
- data/.generator/src/generator/formatter.py +3 -0
- data/.generator/src/generator/templates/api.j2 +1 -1
- data/.generator/src/generator/templates/inflector.j2 +1 -1
- data/CHANGELOG.md +27 -0
- data/examples/v1/slack-integration/CreateSlackIntegrationChannel.rb +1 -0
- data/examples/v1/slack-integration/UpdateSlackIntegrationChannel.rb +1 -0
- data/examples/v2/action-connection/CreateActionConnection.rb +1 -1
- data/examples/v2/action-connection/DeleteActionConnection.rb +4 -1
- data/examples/v2/apm-retention-filters/CreateApmRetentionFilter_3853850379.rb +21 -0
- data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter_3916044058.rb +25 -0
- data/examples/v2/cloud-network-monitoring/GetAggregatedConnections.rb +8 -0
- data/examples/v2/cloud-network-monitoring/GetAggregatedConnections_3059356111.rb +8 -0
- data/examples/v2/observability-pipelines/CreatePipeline.rb +44 -0
- data/examples/v2/observability-pipelines/DeletePipeline.rb +11 -0
- data/examples/v2/observability-pipelines/GetPipeline.rb +11 -0
- data/examples/v2/observability-pipelines/UpdatePipeline.rb +48 -0
- data/examples/v2/on-call/CreateOnCallSchedule.rb +61 -0
- data/examples/v2/on-call/DeleteOnCallSchedule.rb +8 -0
- data/examples/v2/on-call/GetOnCallSchedule.rb +8 -0
- data/examples/v2/on-call/UpdateOnCallSchedule.rb +68 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1965169892.rb +6 -0
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +1 -1
- data/examples/v2/software-catalog/UpsertCatalogEntity.rb +1 -0
- data/lib/datadog_api_client/configuration.rb +5 -0
- data/lib/datadog_api_client/inflector.rb +122 -1
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_step_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
- data/lib/datadog_api_client/v2/api/cloud_network_monitoring_api.rb +108 -0
- data/lib/datadog_api_client/v2/api/downtimes_api.rb +2 -0
- data/lib/datadog_api_client/v2/api/observability_pipelines_api.rb +319 -0
- data/lib/datadog_api_client/v2/api/on_call_api.rb +301 -0
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +7 -3
- data/lib/datadog_api_client/v2/models/api_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_tags_category.rb +1 -1
- data/lib/datadog_api_client/v2/models/case_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/entity_response_included_incident.rb +1 -1
- data/lib/datadog_api_client/v2/models/{service_definition_v2_dot2_type.rb → entity_response_included_incident_type.rb} +3 -9
- data/lib/datadog_api_client/v2/models/entity_response_included_oncall.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_oncall_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/entity_response_included_raw_schema.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_raw_schema_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/entity_response_included_related_entity.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_related_entity_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/entity_response_included_schema.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_schema_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/entity_v3_datastore_spec.rb +13 -1
- data/lib/datadog_api_client/v2/models/entity_v3_queue_spec.rb +13 -1
- data/lib/datadog_api_client/v2/models/entity_v3_service_spec.rb +13 -1
- data/lib/datadog_api_client/v2/models/github_webhook_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/historical_job_query.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/interface_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/layer.rb +135 -0
- data/lib/datadog_api_client/v2/models/layer_attributes.rb +157 -0
- data/lib/datadog_api_client/v2/models/layer_attributes_interval.rb +144 -0
- data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items.rb +136 -0
- data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items_end_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items_start_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/layer_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/layer_relationships_members.rb +107 -0
- data/lib/datadog_api_client/v2/models/layer_relationships_members_data_items.rb +116 -0
- data/lib/datadog_api_client/v2/models/layer_relationships_members_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/layer_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/logs_aggregate_request.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_list_request.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_query_options.rb +4 -1
- data/lib/datadog_api_client/v2/models/monitor_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline.rb +123 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +211 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_config.rb +171 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb +67 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_source_item.rb +63 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_create_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_data_attributes.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_agent_source.rb +154 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_agent_source_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_logs_destination.rb +167 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_logs_destination_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_field_value.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +188 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source.rb +220 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_librdkafka_option.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_sasl.rb +105 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +209 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_pipeline_kafka_source_sasl_mechanism.rb +28 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +285 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_limit.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_limit_enforce_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_override.rb +146 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +211 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +211 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor_field.rb +165 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_tls.rb +143 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb +16 -5
- data/lib/datadog_api_client/v2/models/retention_filter_attributes.rb +16 -5
- data/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb +16 -5
- data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +16 -5
- data/lib/datadog_api_client/v2/models/schedule.rb +117 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes.rb +179 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +231 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_interval.rb +144 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_members_items.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_members_items_user.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items.rb +136 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_end_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_start_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships_teams.rb +107 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships_teams_data_items.rb +116 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships_teams_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_data.rb +135 -0
- data/lib/datadog_api_client/v2/models/schedule_data_attributes.rb +127 -0
- data/lib/datadog_api_client/v2/models/schedule_data_included_item.rb +65 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_layers.rb +107 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_layers_data_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_layers_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_teams.rb +107 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_teams_data_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_teams_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_member.rb +125 -0
- data/lib/datadog_api_client/v2/models/schedule_member_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_member_relationships_user.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_member_relationships_user_data.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_member_relationships_user_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_member_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/schedule_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data.rb +175 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes.rb +179 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +180 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_interval.rb +144 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_members_items.rb +106 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_members_items_user.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items.rb +136 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_end_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_start_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships_teams.rb +107 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships_teams_data_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships_teams_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_user.rb +125 -0
- data/lib/datadog_api_client/v2/models/schedule_user_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_user_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_options.rb +13 -3
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_type.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_data_source.rb +31 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +1 -1
- data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_array.rb +107 -0
- data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_data_attributes.rb +215 -0
- data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/team_reference.rb +135 -0
- data/lib/datadog_api_client/v2/models/team_reference_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/team_reference_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_reference_relationships_oncall_users.rb +107 -0
- data/lib/datadog_api_client/v2/models/team_reference_relationships_oncall_users_data_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/team_reference_relationships_oncall_users_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_reference_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/trigger.rb +4 -0
- data/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +136 -4
- data/examples/v2/action-connection/DeleteActionConnection_2142905164.rb +0 -8
@@ -0,0 +1,117 @@
|
|
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
|
+
# Top-level container for a schedule object, including both the `data` payload and any related `included` resources (such as teams, layers, or members).
|
21
|
+
class Schedule
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Represents the primary data object for a schedule, linking attributes and relationships.
|
25
|
+
attr_accessor :data
|
26
|
+
|
27
|
+
# Any additional resources related to this schedule, such as teams and layers.
|
28
|
+
attr_accessor :included
|
29
|
+
|
30
|
+
attr_accessor :additional_properties
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
# @!visibility private
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'data' => :'data',
|
37
|
+
:'included' => :'included'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
# @!visibility private
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'data' => :'ScheduleData',
|
46
|
+
:'included' => :'Array<ScheduleDataIncludedItem>'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
52
|
+
# @!visibility private
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Schedule` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
self.additional_properties = {}
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
self.additional_properties[k.to_sym] = v
|
63
|
+
else
|
64
|
+
h[k.to_sym] = v
|
65
|
+
end
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'data')
|
69
|
+
self.data = attributes[:'data']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'included')
|
73
|
+
if (value = attributes[:'included']).is_a?(Array)
|
74
|
+
self.included = value
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
80
|
+
# @return [Hash] Returns the object in the form of hash
|
81
|
+
# @!visibility private
|
82
|
+
def to_hash
|
83
|
+
hash = {}
|
84
|
+
self.class.attribute_map.each_pair do |attr, param|
|
85
|
+
value = self.send(attr)
|
86
|
+
if value.nil?
|
87
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
88
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
89
|
+
end
|
90
|
+
|
91
|
+
hash[param] = _to_hash(value)
|
92
|
+
end
|
93
|
+
self.additional_properties.each_pair do |attr, value|
|
94
|
+
hash[attr] = value
|
95
|
+
end
|
96
|
+
hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Checks equality by comparing each attribute.
|
100
|
+
# @param o [Object] Object to be compared
|
101
|
+
# @!visibility private
|
102
|
+
def ==(o)
|
103
|
+
return true if self.equal?(o)
|
104
|
+
self.class == o.class &&
|
105
|
+
data == o.data &&
|
106
|
+
included == o.included &&
|
107
|
+
additional_properties == o.additional_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Integer] Hash code
|
112
|
+
# @!visibility private
|
113
|
+
def hash
|
114
|
+
[data, included, additional_properties].hash
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -0,0 +1,123 @@
|
|
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 top-level request body for schedule creation, wrapping a `data` object.
|
21
|
+
class ScheduleCreateRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The core data wrapper for creating a schedule, encompassing attributes, relationships, and the resource type.
|
25
|
+
attr_reader :data
|
26
|
+
|
27
|
+
attr_accessor :additional_properties
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
# @!visibility private
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'data' => :'data'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
# @!visibility private
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'data' => :'ScheduleCreateRequestData'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
47
|
+
# @!visibility private
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScheduleCreateRequest` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
self.additional_properties = {}
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
self.additional_properties[k.to_sym] = v
|
58
|
+
else
|
59
|
+
h[k.to_sym] = v
|
60
|
+
end
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'data')
|
64
|
+
self.data = attributes[:'data']
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
# @!visibility private
|
71
|
+
def valid?
|
72
|
+
return false if @data.nil?
|
73
|
+
true
|
74
|
+
end
|
75
|
+
|
76
|
+
# Custom attribute writer method with validation
|
77
|
+
# @param data [Object] Object to be assigned
|
78
|
+
# @!visibility private
|
79
|
+
def data=(data)
|
80
|
+
if data.nil?
|
81
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
82
|
+
end
|
83
|
+
@data = data
|
84
|
+
end
|
85
|
+
|
86
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
87
|
+
# @return [Hash] Returns the object in the form of hash
|
88
|
+
# @!visibility private
|
89
|
+
def to_hash
|
90
|
+
hash = {}
|
91
|
+
self.class.attribute_map.each_pair do |attr, param|
|
92
|
+
value = self.send(attr)
|
93
|
+
if value.nil?
|
94
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
95
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
96
|
+
end
|
97
|
+
|
98
|
+
hash[param] = _to_hash(value)
|
99
|
+
end
|
100
|
+
self.additional_properties.each_pair do |attr, value|
|
101
|
+
hash[attr] = value
|
102
|
+
end
|
103
|
+
hash
|
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
|
+
data == o.data &&
|
113
|
+
additional_properties == o.additional_properties
|
114
|
+
end
|
115
|
+
|
116
|
+
# Calculates hash code according to all attributes.
|
117
|
+
# @return [Integer] Hash code
|
118
|
+
# @!visibility private
|
119
|
+
def hash
|
120
|
+
[data, additional_properties].hash
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,154 @@
|
|
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 core data wrapper for creating a schedule, encompassing attributes, relationships, and the resource type.
|
21
|
+
class ScheduleCreateRequestData
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Describes the main attributes for creating a new schedule, including name, layers, time zone, and tags.
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# Gathers relationship objects for the schedule creation request, including the teams to associate.
|
28
|
+
attr_accessor :relationships
|
29
|
+
|
30
|
+
# Schedules resource type.
|
31
|
+
attr_reader :type
|
32
|
+
|
33
|
+
attr_accessor :additional_properties
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
# @!visibility private
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'attributes' => :'attributes',
|
40
|
+
:'relationships' => :'relationships',
|
41
|
+
:'type' => :'type'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
# @!visibility private
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'attributes' => :'ScheduleCreateRequestDataAttributes',
|
50
|
+
:'relationships' => :'ScheduleCreateRequestDataRelationships',
|
51
|
+
:'type' => :'ScheduleCreateRequestDataType'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
57
|
+
# @!visibility private
|
58
|
+
def initialize(attributes = {})
|
59
|
+
if (!attributes.is_a?(Hash))
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScheduleCreateRequestData` initialize method"
|
61
|
+
end
|
62
|
+
|
63
|
+
self.additional_properties = {}
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
self.additional_properties[k.to_sym] = v
|
68
|
+
else
|
69
|
+
h[k.to_sym] = v
|
70
|
+
end
|
71
|
+
}
|
72
|
+
|
73
|
+
if attributes.key?(:'attributes')
|
74
|
+
self.attributes = attributes[:'attributes']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'relationships')
|
78
|
+
self.relationships = attributes[:'relationships']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'type')
|
82
|
+
self.type = attributes[:'type']
|
83
|
+
end
|
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
|
+
# @!visibility private
|
89
|
+
def valid?
|
90
|
+
return false if @attributes.nil?
|
91
|
+
return false if @type.nil?
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Custom attribute writer method with validation
|
96
|
+
# @param attributes [Object] Object to be assigned
|
97
|
+
# @!visibility private
|
98
|
+
def attributes=(attributes)
|
99
|
+
if attributes.nil?
|
100
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
101
|
+
end
|
102
|
+
@attributes = attributes
|
103
|
+
end
|
104
|
+
|
105
|
+
# Custom attribute writer method with validation
|
106
|
+
# @param type [Object] Object to be assigned
|
107
|
+
# @!visibility private
|
108
|
+
def type=(type)
|
109
|
+
if type.nil?
|
110
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
111
|
+
end
|
112
|
+
@type = type
|
113
|
+
end
|
114
|
+
|
115
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
116
|
+
# @return [Hash] Returns the object in the form of hash
|
117
|
+
# @!visibility private
|
118
|
+
def to_hash
|
119
|
+
hash = {}
|
120
|
+
self.class.attribute_map.each_pair do |attr, param|
|
121
|
+
value = self.send(attr)
|
122
|
+
if value.nil?
|
123
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
124
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
125
|
+
end
|
126
|
+
|
127
|
+
hash[param] = _to_hash(value)
|
128
|
+
end
|
129
|
+
self.additional_properties.each_pair do |attr, value|
|
130
|
+
hash[attr] = value
|
131
|
+
end
|
132
|
+
hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Checks equality by comparing each attribute.
|
136
|
+
# @param o [Object] Object to be compared
|
137
|
+
# @!visibility private
|
138
|
+
def ==(o)
|
139
|
+
return true if self.equal?(o)
|
140
|
+
self.class == o.class &&
|
141
|
+
attributes == o.attributes &&
|
142
|
+
relationships == o.relationships &&
|
143
|
+
type == o.type &&
|
144
|
+
additional_properties == o.additional_properties
|
145
|
+
end
|
146
|
+
|
147
|
+
# Calculates hash code according to all attributes.
|
148
|
+
# @return [Integer] Hash code
|
149
|
+
# @!visibility private
|
150
|
+
def hash
|
151
|
+
[attributes, relationships, type, additional_properties].hash
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -0,0 +1,179 @@
|
|
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
|
+
# Describes the main attributes for creating a new schedule, including name, layers, time zone, and tags.
|
21
|
+
class ScheduleCreateRequestDataAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The layers of on-call coverage that define rotation intervals and restrictions.
|
25
|
+
attr_reader :layers
|
26
|
+
|
27
|
+
# A human-readable name for the new schedule.
|
28
|
+
attr_reader :name
|
29
|
+
|
30
|
+
# A list of tags for categorizing or filtering the schedule.
|
31
|
+
attr_accessor :tags
|
32
|
+
|
33
|
+
# The time zone in which the schedule is defined.
|
34
|
+
attr_reader :time_zone
|
35
|
+
|
36
|
+
attr_accessor :additional_properties
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
# @!visibility private
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'layers' => :'layers',
|
43
|
+
:'name' => :'name',
|
44
|
+
:'tags' => :'tags',
|
45
|
+
:'time_zone' => :'time_zone'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
# @!visibility private
|
51
|
+
def self.openapi_types
|
52
|
+
{
|
53
|
+
:'layers' => :'Array<ScheduleCreateRequestDataAttributesLayersItems>',
|
54
|
+
:'name' => :'String',
|
55
|
+
:'tags' => :'Array<String>',
|
56
|
+
:'time_zone' => :'String'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
62
|
+
# @!visibility private
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScheduleCreateRequestDataAttributes` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
self.additional_properties = {}
|
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
|
+
self.additional_properties[k.to_sym] = v
|
73
|
+
else
|
74
|
+
h[k.to_sym] = v
|
75
|
+
end
|
76
|
+
}
|
77
|
+
|
78
|
+
if attributes.key?(:'layers')
|
79
|
+
if (value = attributes[:'layers']).is_a?(Array)
|
80
|
+
self.layers = value
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'name')
|
85
|
+
self.name = attributes[:'name']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'tags')
|
89
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
90
|
+
self.tags = value
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'time_zone')
|
95
|
+
self.time_zone = attributes[:'time_zone']
|
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
|
+
return false if @layers.nil?
|
104
|
+
return false if @name.nil?
|
105
|
+
return false if @time_zone.nil?
|
106
|
+
true
|
107
|
+
end
|
108
|
+
|
109
|
+
# Custom attribute writer method with validation
|
110
|
+
# @param layers [Object] Object to be assigned
|
111
|
+
# @!visibility private
|
112
|
+
def layers=(layers)
|
113
|
+
if layers.nil?
|
114
|
+
fail ArgumentError, 'invalid value for "layers", layers cannot be nil.'
|
115
|
+
end
|
116
|
+
@layers = layers
|
117
|
+
end
|
118
|
+
|
119
|
+
# Custom attribute writer method with validation
|
120
|
+
# @param name [Object] Object to be assigned
|
121
|
+
# @!visibility private
|
122
|
+
def name=(name)
|
123
|
+
if name.nil?
|
124
|
+
fail ArgumentError, 'invalid value for "name", name cannot be nil.'
|
125
|
+
end
|
126
|
+
@name = name
|
127
|
+
end
|
128
|
+
|
129
|
+
# Custom attribute writer method with validation
|
130
|
+
# @param time_zone [Object] Object to be assigned
|
131
|
+
# @!visibility private
|
132
|
+
def time_zone=(time_zone)
|
133
|
+
if time_zone.nil?
|
134
|
+
fail ArgumentError, 'invalid value for "time_zone", time_zone cannot be nil.'
|
135
|
+
end
|
136
|
+
@time_zone = time_zone
|
137
|
+
end
|
138
|
+
|
139
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
140
|
+
# @return [Hash] Returns the object in the form of hash
|
141
|
+
# @!visibility private
|
142
|
+
def to_hash
|
143
|
+
hash = {}
|
144
|
+
self.class.attribute_map.each_pair do |attr, param|
|
145
|
+
value = self.send(attr)
|
146
|
+
if value.nil?
|
147
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
148
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
149
|
+
end
|
150
|
+
|
151
|
+
hash[param] = _to_hash(value)
|
152
|
+
end
|
153
|
+
self.additional_properties.each_pair do |attr, value|
|
154
|
+
hash[attr] = value
|
155
|
+
end
|
156
|
+
hash
|
157
|
+
end
|
158
|
+
|
159
|
+
# Checks equality by comparing each attribute.
|
160
|
+
# @param o [Object] Object to be compared
|
161
|
+
# @!visibility private
|
162
|
+
def ==(o)
|
163
|
+
return true if self.equal?(o)
|
164
|
+
self.class == o.class &&
|
165
|
+
layers == o.layers &&
|
166
|
+
name == o.name &&
|
167
|
+
tags == o.tags &&
|
168
|
+
time_zone == o.time_zone &&
|
169
|
+
additional_properties == o.additional_properties
|
170
|
+
end
|
171
|
+
|
172
|
+
# Calculates hash code according to all attributes.
|
173
|
+
# @return [Integer] Hash code
|
174
|
+
# @!visibility private
|
175
|
+
def hash
|
176
|
+
[layers, name, tags, time_zone, additional_properties].hash
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|