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,209 @@
|
|
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 `parse_json` processor extracts JSON from a specified field and flattens it into the event. This is useful when logs contain embedded JSON as a string.
|
21
|
+
class ObservabilityPipelineParseJSONProcessor
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The name of the log field that contains a JSON string.
|
25
|
+
attr_reader :field
|
26
|
+
|
27
|
+
# A unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream components).
|
28
|
+
attr_reader :id
|
29
|
+
|
30
|
+
# A Datadog search query used to determine which logs this processor targets.
|
31
|
+
attr_reader :include
|
32
|
+
|
33
|
+
# A list of component IDs whose output is used as the `input` for this component.
|
34
|
+
attr_reader :inputs
|
35
|
+
|
36
|
+
# The processor type. The value should always be `parse_json`.
|
37
|
+
attr_reader :type
|
38
|
+
|
39
|
+
attr_accessor :additional_properties
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
# @!visibility private
|
43
|
+
def self.attribute_map
|
44
|
+
{
|
45
|
+
:'field' => :'field',
|
46
|
+
:'id' => :'id',
|
47
|
+
:'include' => :'include',
|
48
|
+
:'inputs' => :'inputs',
|
49
|
+
:'type' => :'type'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
# @!visibility private
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'field' => :'String',
|
58
|
+
:'id' => :'String',
|
59
|
+
:'include' => :'String',
|
60
|
+
:'inputs' => :'Array<String>',
|
61
|
+
:'type' => :'ObservabilityPipelineParseJSONProcessorType'
|
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::ObservabilityPipelineParseJSONProcessor` initialize method"
|
71
|
+
end
|
72
|
+
|
73
|
+
self.additional_properties = {}
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
77
|
+
self.additional_properties[k.to_sym] = v
|
78
|
+
else
|
79
|
+
h[k.to_sym] = v
|
80
|
+
end
|
81
|
+
}
|
82
|
+
|
83
|
+
if attributes.key?(:'field')
|
84
|
+
self.field = attributes[:'field']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.key?(:'id')
|
88
|
+
self.id = attributes[:'id']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.key?(:'include')
|
92
|
+
self.include = attributes[:'include']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'inputs')
|
96
|
+
if (value = attributes[:'inputs']).is_a?(Array)
|
97
|
+
self.inputs = value
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'type')
|
102
|
+
self.type = attributes[:'type']
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Check to see if the all the properties in the model are valid
|
107
|
+
# @return true if the model is valid
|
108
|
+
# @!visibility private
|
109
|
+
def valid?
|
110
|
+
return false if @field.nil?
|
111
|
+
return false if @id.nil?
|
112
|
+
return false if @include.nil?
|
113
|
+
return false if @inputs.nil?
|
114
|
+
return false if @type.nil?
|
115
|
+
true
|
116
|
+
end
|
117
|
+
|
118
|
+
# Custom attribute writer method with validation
|
119
|
+
# @param field [Object] Object to be assigned
|
120
|
+
# @!visibility private
|
121
|
+
def field=(field)
|
122
|
+
if field.nil?
|
123
|
+
fail ArgumentError, 'invalid value for "field", field cannot be nil.'
|
124
|
+
end
|
125
|
+
@field = field
|
126
|
+
end
|
127
|
+
|
128
|
+
# Custom attribute writer method with validation
|
129
|
+
# @param id [Object] Object to be assigned
|
130
|
+
# @!visibility private
|
131
|
+
def id=(id)
|
132
|
+
if id.nil?
|
133
|
+
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
|
134
|
+
end
|
135
|
+
@id = id
|
136
|
+
end
|
137
|
+
|
138
|
+
# Custom attribute writer method with validation
|
139
|
+
# @param include [Object] Object to be assigned
|
140
|
+
# @!visibility private
|
141
|
+
def include=(include)
|
142
|
+
if include.nil?
|
143
|
+
fail ArgumentError, 'invalid value for "include", include cannot be nil.'
|
144
|
+
end
|
145
|
+
@include = include
|
146
|
+
end
|
147
|
+
|
148
|
+
# Custom attribute writer method with validation
|
149
|
+
# @param inputs [Object] Object to be assigned
|
150
|
+
# @!visibility private
|
151
|
+
def inputs=(inputs)
|
152
|
+
if inputs.nil?
|
153
|
+
fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.'
|
154
|
+
end
|
155
|
+
@inputs = inputs
|
156
|
+
end
|
157
|
+
|
158
|
+
# Custom attribute writer method with validation
|
159
|
+
# @param type [Object] Object to be assigned
|
160
|
+
# @!visibility private
|
161
|
+
def type=(type)
|
162
|
+
if type.nil?
|
163
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
164
|
+
end
|
165
|
+
@type = type
|
166
|
+
end
|
167
|
+
|
168
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
# @!visibility private
|
171
|
+
def to_hash
|
172
|
+
hash = {}
|
173
|
+
self.class.attribute_map.each_pair do |attr, param|
|
174
|
+
value = self.send(attr)
|
175
|
+
if value.nil?
|
176
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
177
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
178
|
+
end
|
179
|
+
|
180
|
+
hash[param] = _to_hash(value)
|
181
|
+
end
|
182
|
+
self.additional_properties.each_pair do |attr, value|
|
183
|
+
hash[attr] = value
|
184
|
+
end
|
185
|
+
hash
|
186
|
+
end
|
187
|
+
|
188
|
+
# Checks equality by comparing each attribute.
|
189
|
+
# @param o [Object] Object to be compared
|
190
|
+
# @!visibility private
|
191
|
+
def ==(o)
|
192
|
+
return true if self.equal?(o)
|
193
|
+
self.class == o.class &&
|
194
|
+
field == o.field &&
|
195
|
+
id == o.id &&
|
196
|
+
include == o.include &&
|
197
|
+
inputs == o.inputs &&
|
198
|
+
type == o.type &&
|
199
|
+
additional_properties == o.additional_properties
|
200
|
+
end
|
201
|
+
|
202
|
+
# Calculates hash code according to all attributes.
|
203
|
+
# @return [Integer] Hash code
|
204
|
+
# @!visibility private
|
205
|
+
def hash
|
206
|
+
[field, id, include, inputs, type, additional_properties].hash
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
@@ -0,0 +1,26 @@
|
|
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 processor type. The value should always be `parse_json`.
|
21
|
+
class ObservabilityPipelineParseJSONProcessorType
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
PARSE_JSON = "parse_json".freeze
|
25
|
+
end
|
26
|
+
end
|
data/lib/datadog_api_client/v2/models/observability_pipeline_pipeline_kafka_source_sasl_mechanism.rb
ADDED
@@ -0,0 +1,28 @@
|
|
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
|
+
# SASL mechanism used for Kafka authentication.
|
21
|
+
class ObservabilityPipelinePipelineKafkaSourceSaslMechanism
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
PLAIN = "PLAIN".freeze
|
25
|
+
SCRAMNOT_SHANOT_256 = "SCRAM-SHA-256".freeze
|
26
|
+
SCRAMNOT_SHANOT_512 = "SCRAM-SHA-512".freeze
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,285 @@
|
|
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 Quota Processor measures logging traffic for logs that match a specified filter. When the configured daily quota is met, the processor can drop or alert.
|
21
|
+
class ObservabilityPipelineQuotaProcessor
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# If set to `true`, logs that matched the quota filter and sent after the quota has been met are dropped; only logs that did not match the filter query continue through the pipeline.
|
25
|
+
attr_reader :drop_events
|
26
|
+
|
27
|
+
# The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components).
|
28
|
+
attr_reader :id
|
29
|
+
|
30
|
+
# If `true`, the processor skips quota checks when partition fields are missing from the logs.
|
31
|
+
attr_accessor :ignore_when_missing_partitions
|
32
|
+
|
33
|
+
# A Datadog search query used to determine which logs this processor targets.
|
34
|
+
attr_reader :include
|
35
|
+
|
36
|
+
# A list of component IDs whose output is used as the `input` for this component.
|
37
|
+
attr_reader :inputs
|
38
|
+
|
39
|
+
# The maximum amount of data or number of events allowed before the quota is enforced. Can be specified in bytes or events.
|
40
|
+
attr_reader :limit
|
41
|
+
|
42
|
+
# Name for identifying the processor.
|
43
|
+
attr_reader :name
|
44
|
+
|
45
|
+
# A list of alternate quota rules that apply to specific sets of events, identified by matching field values. Each override can define a custom limit.
|
46
|
+
attr_accessor :overrides
|
47
|
+
|
48
|
+
# A list of fields used to segment log traffic for quota enforcement. Quotas are tracked independently by unique combinations of these field values.
|
49
|
+
attr_accessor :partition_fields
|
50
|
+
|
51
|
+
# The processor type. The value should always be `quota`.
|
52
|
+
attr_reader :type
|
53
|
+
|
54
|
+
attr_accessor :additional_properties
|
55
|
+
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
57
|
+
# @!visibility private
|
58
|
+
def self.attribute_map
|
59
|
+
{
|
60
|
+
:'drop_events' => :'drop_events',
|
61
|
+
:'id' => :'id',
|
62
|
+
:'ignore_when_missing_partitions' => :'ignore_when_missing_partitions',
|
63
|
+
:'include' => :'include',
|
64
|
+
:'inputs' => :'inputs',
|
65
|
+
:'limit' => :'limit',
|
66
|
+
:'name' => :'name',
|
67
|
+
:'overrides' => :'overrides',
|
68
|
+
:'partition_fields' => :'partition_fields',
|
69
|
+
:'type' => :'type'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# Attribute type mapping.
|
74
|
+
# @!visibility private
|
75
|
+
def self.openapi_types
|
76
|
+
{
|
77
|
+
:'drop_events' => :'Boolean',
|
78
|
+
:'id' => :'String',
|
79
|
+
:'ignore_when_missing_partitions' => :'Boolean',
|
80
|
+
:'include' => :'String',
|
81
|
+
:'inputs' => :'Array<String>',
|
82
|
+
:'limit' => :'ObservabilityPipelineQuotaProcessorLimit',
|
83
|
+
:'name' => :'String',
|
84
|
+
:'overrides' => :'Array<ObservabilityPipelineQuotaProcessorOverride>',
|
85
|
+
:'partition_fields' => :'Array<String>',
|
86
|
+
:'type' => :'ObservabilityPipelineQuotaProcessorType'
|
87
|
+
}
|
88
|
+
end
|
89
|
+
|
90
|
+
# Initializes the object
|
91
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
92
|
+
# @!visibility private
|
93
|
+
def initialize(attributes = {})
|
94
|
+
if (!attributes.is_a?(Hash))
|
95
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineQuotaProcessor` initialize method"
|
96
|
+
end
|
97
|
+
|
98
|
+
self.additional_properties = {}
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
101
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
102
|
+
self.additional_properties[k.to_sym] = v
|
103
|
+
else
|
104
|
+
h[k.to_sym] = v
|
105
|
+
end
|
106
|
+
}
|
107
|
+
|
108
|
+
if attributes.key?(:'drop_events')
|
109
|
+
self.drop_events = attributes[:'drop_events']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'id')
|
113
|
+
self.id = attributes[:'id']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'ignore_when_missing_partitions')
|
117
|
+
self.ignore_when_missing_partitions = attributes[:'ignore_when_missing_partitions']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'include')
|
121
|
+
self.include = attributes[:'include']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'inputs')
|
125
|
+
if (value = attributes[:'inputs']).is_a?(Array)
|
126
|
+
self.inputs = value
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'limit')
|
131
|
+
self.limit = attributes[:'limit']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'name')
|
135
|
+
self.name = attributes[:'name']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'overrides')
|
139
|
+
if (value = attributes[:'overrides']).is_a?(Array)
|
140
|
+
self.overrides = value
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'partition_fields')
|
145
|
+
if (value = attributes[:'partition_fields']).is_a?(Array)
|
146
|
+
self.partition_fields = value
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'type')
|
151
|
+
self.type = attributes[:'type']
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Check to see if the all the properties in the model are valid
|
156
|
+
# @return true if the model is valid
|
157
|
+
# @!visibility private
|
158
|
+
def valid?
|
159
|
+
return false if @drop_events.nil?
|
160
|
+
return false if @id.nil?
|
161
|
+
return false if @include.nil?
|
162
|
+
return false if @inputs.nil?
|
163
|
+
return false if @limit.nil?
|
164
|
+
return false if @name.nil?
|
165
|
+
return false if @type.nil?
|
166
|
+
true
|
167
|
+
end
|
168
|
+
|
169
|
+
# Custom attribute writer method with validation
|
170
|
+
# @param drop_events [Object] Object to be assigned
|
171
|
+
# @!visibility private
|
172
|
+
def drop_events=(drop_events)
|
173
|
+
if drop_events.nil?
|
174
|
+
fail ArgumentError, 'invalid value for "drop_events", drop_events cannot be nil.'
|
175
|
+
end
|
176
|
+
@drop_events = drop_events
|
177
|
+
end
|
178
|
+
|
179
|
+
# Custom attribute writer method with validation
|
180
|
+
# @param id [Object] Object to be assigned
|
181
|
+
# @!visibility private
|
182
|
+
def id=(id)
|
183
|
+
if id.nil?
|
184
|
+
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
|
185
|
+
end
|
186
|
+
@id = id
|
187
|
+
end
|
188
|
+
|
189
|
+
# Custom attribute writer method with validation
|
190
|
+
# @param include [Object] Object to be assigned
|
191
|
+
# @!visibility private
|
192
|
+
def include=(include)
|
193
|
+
if include.nil?
|
194
|
+
fail ArgumentError, 'invalid value for "include", include cannot be nil.'
|
195
|
+
end
|
196
|
+
@include = include
|
197
|
+
end
|
198
|
+
|
199
|
+
# Custom attribute writer method with validation
|
200
|
+
# @param inputs [Object] Object to be assigned
|
201
|
+
# @!visibility private
|
202
|
+
def inputs=(inputs)
|
203
|
+
if inputs.nil?
|
204
|
+
fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.'
|
205
|
+
end
|
206
|
+
@inputs = inputs
|
207
|
+
end
|
208
|
+
|
209
|
+
# Custom attribute writer method with validation
|
210
|
+
# @param limit [Object] Object to be assigned
|
211
|
+
# @!visibility private
|
212
|
+
def limit=(limit)
|
213
|
+
if limit.nil?
|
214
|
+
fail ArgumentError, 'invalid value for "limit", limit cannot be nil.'
|
215
|
+
end
|
216
|
+
@limit = limit
|
217
|
+
end
|
218
|
+
|
219
|
+
# Custom attribute writer method with validation
|
220
|
+
# @param name [Object] Object to be assigned
|
221
|
+
# @!visibility private
|
222
|
+
def name=(name)
|
223
|
+
if name.nil?
|
224
|
+
fail ArgumentError, 'invalid value for "name", name cannot be nil.'
|
225
|
+
end
|
226
|
+
@name = name
|
227
|
+
end
|
228
|
+
|
229
|
+
# Custom attribute writer method with validation
|
230
|
+
# @param type [Object] Object to be assigned
|
231
|
+
# @!visibility private
|
232
|
+
def type=(type)
|
233
|
+
if type.nil?
|
234
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
235
|
+
end
|
236
|
+
@type = type
|
237
|
+
end
|
238
|
+
|
239
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
240
|
+
# @return [Hash] Returns the object in the form of hash
|
241
|
+
# @!visibility private
|
242
|
+
def to_hash
|
243
|
+
hash = {}
|
244
|
+
self.class.attribute_map.each_pair do |attr, param|
|
245
|
+
value = self.send(attr)
|
246
|
+
if value.nil?
|
247
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
248
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
249
|
+
end
|
250
|
+
|
251
|
+
hash[param] = _to_hash(value)
|
252
|
+
end
|
253
|
+
self.additional_properties.each_pair do |attr, value|
|
254
|
+
hash[attr] = value
|
255
|
+
end
|
256
|
+
hash
|
257
|
+
end
|
258
|
+
|
259
|
+
# Checks equality by comparing each attribute.
|
260
|
+
# @param o [Object] Object to be compared
|
261
|
+
# @!visibility private
|
262
|
+
def ==(o)
|
263
|
+
return true if self.equal?(o)
|
264
|
+
self.class == o.class &&
|
265
|
+
drop_events == o.drop_events &&
|
266
|
+
id == o.id &&
|
267
|
+
ignore_when_missing_partitions == o.ignore_when_missing_partitions &&
|
268
|
+
include == o.include &&
|
269
|
+
inputs == o.inputs &&
|
270
|
+
limit == o.limit &&
|
271
|
+
name == o.name &&
|
272
|
+
overrides == o.overrides &&
|
273
|
+
partition_fields == o.partition_fields &&
|
274
|
+
type == o.type &&
|
275
|
+
additional_properties == o.additional_properties
|
276
|
+
end
|
277
|
+
|
278
|
+
# Calculates hash code according to all attributes.
|
279
|
+
# @return [Integer] Hash code
|
280
|
+
# @!visibility private
|
281
|
+
def hash
|
282
|
+
[drop_events, id, ignore_when_missing_partitions, include, inputs, limit, name, overrides, partition_fields, type, additional_properties].hash
|
283
|
+
end
|
284
|
+
end
|
285
|
+
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 maximum amount of data or number of events allowed before the quota is enforced. Can be specified in bytes or events.
|
21
|
+
class ObservabilityPipelineQuotaProcessorLimit
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Unit for quota enforcement in bytes for data size or events for count.
|
25
|
+
attr_reader :enforce
|
26
|
+
|
27
|
+
# The limit for quota enforcement.
|
28
|
+
attr_reader :limit
|
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
|
+
:'enforce' => :'enforce',
|
37
|
+
:'limit' => :'limit'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
# @!visibility private
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'enforce' => :'ObservabilityPipelineQuotaProcessorLimitEnforceType',
|
46
|
+
:'limit' => :'Integer'
|
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::ObservabilityPipelineQuotaProcessorLimit` 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?(:'enforce')
|
69
|
+
self.enforce = attributes[:'enforce']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'limit')
|
73
|
+
self.limit = attributes[:'limit']
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Check to see if the all the properties in the model are valid
|
78
|
+
# @return true if the model is valid
|
79
|
+
# @!visibility private
|
80
|
+
def valid?
|
81
|
+
return false if @enforce.nil?
|
82
|
+
return false if @limit.nil?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Custom attribute writer method with validation
|
87
|
+
# @param enforce [Object] Object to be assigned
|
88
|
+
# @!visibility private
|
89
|
+
def enforce=(enforce)
|
90
|
+
if enforce.nil?
|
91
|
+
fail ArgumentError, 'invalid value for "enforce", enforce cannot be nil.'
|
92
|
+
end
|
93
|
+
@enforce = enforce
|
94
|
+
end
|
95
|
+
|
96
|
+
# Custom attribute writer method with validation
|
97
|
+
# @param limit [Object] Object to be assigned
|
98
|
+
# @!visibility private
|
99
|
+
def limit=(limit)
|
100
|
+
if limit.nil?
|
101
|
+
fail ArgumentError, 'invalid value for "limit", limit cannot be nil.'
|
102
|
+
end
|
103
|
+
@limit = limit
|
104
|
+
end
|
105
|
+
|
106
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
107
|
+
# @return [Hash] Returns the object in the form of hash
|
108
|
+
# @!visibility private
|
109
|
+
def to_hash
|
110
|
+
hash = {}
|
111
|
+
self.class.attribute_map.each_pair do |attr, param|
|
112
|
+
value = self.send(attr)
|
113
|
+
if value.nil?
|
114
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
115
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
116
|
+
end
|
117
|
+
|
118
|
+
hash[param] = _to_hash(value)
|
119
|
+
end
|
120
|
+
self.additional_properties.each_pair do |attr, value|
|
121
|
+
hash[attr] = value
|
122
|
+
end
|
123
|
+
hash
|
124
|
+
end
|
125
|
+
|
126
|
+
# Checks equality by comparing each attribute.
|
127
|
+
# @param o [Object] Object to be compared
|
128
|
+
# @!visibility private
|
129
|
+
def ==(o)
|
130
|
+
return true if self.equal?(o)
|
131
|
+
self.class == o.class &&
|
132
|
+
enforce == o.enforce &&
|
133
|
+
limit == o.limit &&
|
134
|
+
additional_properties == o.additional_properties
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Integer] Hash code
|
139
|
+
# @!visibility private
|
140
|
+
def hash
|
141
|
+
[enforce, limit, additional_properties].hash
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|