datadog_api_client 2.16.0 → 2.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +654 -11
- data/.generator/schemas/v2/openapi.yaml +1268 -206
- data/.generator/src/generator/formatter.py +4 -0
- data/.generator/src/generator/openapi.py +2 -0
- data/.generator/src/generator/templates/api_client.j2 +3 -0
- data/.generator/src/generator/templates/inflector.j2 +1 -1
- data/.generator/src/generator/templates/model_base.j2 +4 -0
- data/CHANGELOG.md +29 -0
- data/Gemfile +1 -0
- data/LICENSE-3rdparty.csv +1 -0
- data/datadog_api_client.gemspec +2 -0
- data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
- data/examples/v1/aws-integration/CreateAWSEventBridgeSource.rb +12 -0
- data/examples/v1/aws-integration/CreateAWSTagFilter.rb +1 -1
- data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -1
- data/examples/v1/aws-integration/DeleteAWSAccount.rb +1 -1
- data/examples/v1/aws-integration/DeleteAWSEventBridgeSource.rb +11 -0
- data/examples/v1/aws-integration/ListAWSEventBridgeSources.rb +5 -0
- data/examples/v1/azure-integration/CreateAzureIntegration.rb +1 -0
- data/examples/v1/azure-integration/DeleteAzureIntegration.rb +1 -0
- data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +1 -0
- data/examples/v1/azure-integration/UpdateAzureIntegration.rb +1 -0
- data/examples/v1/dashboards/CreateDashboard_1213075383.rb +7 -0
- data/examples/v1/monitors/CreateMonitor_1539578087.rb +0 -1
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +3 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +3 -0
- data/examples/v2/confluent-cloud/DeleteConfluentAccount.rb +4 -1
- data/examples/v2/confluent-cloud/DeleteConfluentResource.rb +5 -0
- data/examples/v2/containers/ListContainers.rb +8 -0
- data/examples/v2/containers/ListContainers_2175733917.rb +11 -0
- data/examples/v2/containers/ListContainers_931009654.rb +11 -0
- data/examples/v2/downtimes/ListMonitorDowntimes.rb +1 -1
- data/examples/v2/key-management/CreateCurrentUserApplicationKey.rb +2 -7
- data/examples/v2/key-management/DeleteApplicationKey.rb +4 -1
- data/examples/v2/key-management/DeleteCurrentUserApplicationKey.rb +4 -1
- data/examples/v2/powerpack/CreatePowerpack.rb +1 -0
- data/examples/v2/powerpack/UpdatePowerpack.rb +1 -0
- data/examples/v2/security-monitoring/MuteFindings.rb +29 -0
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +1 -1
- data/examples/v2/service-scorecards/CreateScorecardOutcomesBatch.rb +27 -0
- data/examples/v2/service-scorecards/CreateScorecardRule.rb +19 -0
- data/examples/v2/service-scorecards/DeleteScorecardRule.rb +11 -0
- data/examples/v2/service-scorecards/ListScorecardOutcomes.rb +8 -0
- data/examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.rb +13 -0
- data/examples/v2/service-scorecards/ListScorecardRules.rb +8 -0
- data/examples/v2/service-scorecards/ListScorecardRules_4057666343.rb +13 -0
- data/examples/v2/synthetics/SetOnDemandConcurrencyCap.rb +3 -1
- data/examples/v2/teams/ListTeams_3429963470.rb +12 -0
- data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.rb +4 -1
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +4 -1
- data/examples/v2/usage-metering/GetUsageObservabilityPipelines.rb +4 -1
- data/examples/v2/users/GetUser.rb +5 -2
- data/lib/datadog_api_client/api_client.rb +3 -0
- data/lib/datadog_api_client/configuration.rb +8 -1
- data/lib/datadog_api_client/inflector.rb +76 -9
- data/lib/datadog_api_client/v1/api/aws_integration_api.rb +194 -0
- data/lib/datadog_api_client/v1/api/monitors_api.rb +5 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v1/model_base.rb +4 -0
- data/lib/datadog_api_client/v1/models/aws_account.rb +2 -1
- data/lib/datadog_api_client/v1/models/aws_event_bridge_account_configuration.rb +105 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_create_request.rb +112 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_create_response.rb +110 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_create_status.rb +26 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_request.rb +100 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_response.rb +80 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_status.rb +26 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_list_response.rb +92 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_source.rb +90 -0
- data/lib/datadog_api_client/v1/models/azure_account.rb +12 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +21 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +42 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +421 -1
- data/lib/datadog_api_client/v1/models/toplist_widget_definition.rb +11 -1
- data/lib/datadog_api_client/v1/models/toplist_widget_display.rb +63 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_flat.rb +98 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_flat_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_legend.rb +28 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_scaling.rb +27 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb +119 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_stacked_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_style.rb +90 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +6 -0
- data/lib/datadog_api_client/v2/api/containers_api.rb +129 -0
- data/lib/datadog_api_client/v2/api/key_management_api.rb +8 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +6 -3
- data/lib/datadog_api_client/v2/api/roles_api.rb +2 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +66 -72
- data/lib/datadog_api_client/v2/api/service_scorecards_api.rb +457 -0
- data/lib/datadog_api_client/v2/api/teams_api.rb +2 -0
- data/lib/datadog_api_client/v2/model_base.rb +4 -0
- data/lib/datadog_api_client/v2/models/{mute_finding_request.rb → bulk_mute_findings_request.rb} +6 -6
- data/lib/datadog_api_client/v2/models/{mute_finding_request_attributes.rb → bulk_mute_findings_request_attributes.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{mute_finding_request_data.rb → bulk_mute_findings_request_data.rb} +28 -7
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta.rb +82 -0
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta_findings.rb +80 -0
- data/lib/datadog_api_client/v2/models/{mute_finding_request_properties.rb → bulk_mute_findings_request_properties.rb} +6 -6
- data/lib/datadog_api_client/v2/models/{mute_finding_response.rb → bulk_mute_findings_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/{mute_finding_response_data.rb → container.rb} +9 -9
- data/lib/datadog_api_client/v2/models/container_attributes.rb +183 -0
- data/lib/datadog_api_client/v2/models/container_group.rb +110 -0
- data/lib/datadog_api_client/v2/models/container_group_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/container_group_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_group_relationships_link.rb +92 -0
- data/lib/datadog_api_client/v2/models/container_group_relationships_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_group_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_item.rb +63 -0
- data/lib/datadog_api_client/v2/models/container_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_meta_page.rb +160 -0
- data/lib/datadog_api_client/v2/models/container_meta_page_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/containers_response.rb +102 -0
- data/lib/datadog_api_client/v2/models/containers_response_links.rb +130 -0
- data/lib/datadog_api_client/v2/models/create_rule_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/create_rule_request_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/create_rule_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/create_rule_response_data.rb +110 -0
- data/lib/datadog_api_client/v2/models/list_rules_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/list_rules_response_data_item.rb +110 -0
- data/lib/datadog_api_client/v2/models/list_rules_response_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/outcome_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_attributes.rb +82 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_request_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_request_item.rb +150 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_response.rb +121 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_response_attributes.rb +120 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_response_meta.rb +90 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/outcomes_response.rb +104 -0
- data/lib/datadog_api_client/v2/models/outcomes_response_data_item.rb +110 -0
- data/lib/datadog_api_client/v2/models/outcomes_response_included_item.rb +100 -0
- data/lib/datadog_api_client/v2/models/outcomes_response_included_rule_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/outcomes_response_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +14 -4
- data/lib/datadog_api_client/v2/models/relationship_to_outcome.rb +80 -0
- data/lib/datadog_api_client/v2/models/relationship_to_outcome_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/relationship_to_rule.rb +80 -0
- data/lib/datadog_api_client/v2/models/relationship_to_rule_data.rb +80 -0
- data/lib/datadog_api_client/v2/models/relationship_to_rule_data_object.rb +90 -0
- data/lib/datadog_api_client/v2/models/rule_attributes.rb +160 -0
- data/lib/datadog_api_client/v2/models/rule_outcome_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/scorecard_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb +7 -7
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +8 -8
- data/lib/datadog_api_client/v2/models/state.rb +28 -0
- data/lib/datadog_api_client/v2/models/teams_field.rb +40 -0
- data/lib/datadog_api_client/v2/models/user_team_permission_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/widget_live_span.rb +40 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +113 -25
- data/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.rb +0 -8
- data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +0 -5
- data/examples/v2/key-management/CreateCurrentUserApplicationKey_1999509896.rb +0 -14
- data/examples/v2/key-management/DeleteApplicationKey_771691550.rb +0 -8
- data/examples/v2/key-management/DeleteCurrentUserApplicationKey_1266687064.rb +0 -8
- data/examples/v2/key-management/GetCurrentUserApplicationKey_1060640890.rb +0 -8
- data/examples/v2/key-management/ListApplicationKeys_2237010090.rb +0 -5
- data/examples/v2/key-management/ListCurrentUserApplicationKeys_1503860964.rb +0 -5
- data/examples/v2/security-monitoring/UpdateFinding.rb +0 -23
- data/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.rb +0 -5
- data/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.rb +0 -9
- data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring_3959166796.rb +0 -8
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations_1436752065.rb +0 -8
- data/examples/v2/usage-metering/GetUsageObservabilityPipelines_970725512.rb +0 -8
- data/examples/v2/users/GetUser_3047557953.rb +0 -8
- data/lib/datadog_api_client/v2/models/mute_finding_response_attributes.rb +0 -191
- data/lib/datadog_api_client/v2/models/mute_finding_response_properties.rb +0 -114
@@ -1,8 +0,0 @@
|
|
1
|
-
# Get one Application key owned by current user returns "OK" response
|
2
|
-
|
3
|
-
require "datadog_api_client"
|
4
|
-
api_instance = DatadogAPIClient::V2::KeyManagementAPI.new
|
5
|
-
|
6
|
-
# there is a valid "application_key" in the system
|
7
|
-
APPLICATION_KEY_DATA_ID = ENV["APPLICATION_KEY_DATA_ID"]
|
8
|
-
p api_instance.get_current_user_application_key(APPLICATION_KEY_DATA_ID)
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Mute or unmute a finding returns "OK" response
|
2
|
-
|
3
|
-
require "datadog_api_client"
|
4
|
-
DatadogAPIClient.configure do |config|
|
5
|
-
config.unstable_operations["v2.update_finding".to_sym] = true
|
6
|
-
end
|
7
|
-
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
|
8
|
-
|
9
|
-
body = DatadogAPIClient::V2::MuteFindingRequest.new({
|
10
|
-
data: DatadogAPIClient::V2::MuteFindingRequestData.new({
|
11
|
-
attributes: DatadogAPIClient::V2::MuteFindingRequestAttributes.new({
|
12
|
-
mute: DatadogAPIClient::V2::MuteFindingRequestProperties.new({
|
13
|
-
description: "To be resolved later",
|
14
|
-
expiration_date: 1778721573794,
|
15
|
-
muted: true,
|
16
|
-
reason: DatadogAPIClient::V2::FindingMuteReason::ACCEPTED_RISK,
|
17
|
-
}),
|
18
|
-
}),
|
19
|
-
id: "AQAAAYbb1i0gijTHEQAAAABBWWJiMWkwZ0FBQ2FuNzBJVGZXZ3B3QUE",
|
20
|
-
type: DatadogAPIClient::V2::FindingType::FINDING,
|
21
|
-
}),
|
22
|
-
})
|
23
|
-
p api_instance.update_finding("AQAAAYbb1i0gijTHEQAAAABBWWJiMWkwZ0FBQ2FuNzBJVGZXZ3B3QUE", body)
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# Save on demand concurrency cap
|
2
|
-
|
3
|
-
require "datadog_api_client"
|
4
|
-
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
|
5
|
-
|
6
|
-
body = DatadogAPIClient::V2::OnDemandConcurrencyCapAttributes.new({
|
7
|
-
on_demand_concurrency_cap: 20,
|
8
|
-
})
|
9
|
-
p api_instance.set_on_demand_concurrency_cap(body)
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Get hourly usage for Application Security returns "OK" response
|
2
|
-
|
3
|
-
require "datadog_api_client"
|
4
|
-
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
|
5
|
-
opts = {
|
6
|
-
end_hr: (Time.now + -3 * 86400),
|
7
|
-
}
|
8
|
-
p api_instance.get_usage_application_security_monitoring((Time.now + -5 * 86400), opts)
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Get hourly usage for Lambda Traced Invocations returns "OK" response
|
2
|
-
|
3
|
-
require "datadog_api_client"
|
4
|
-
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
|
5
|
-
opts = {
|
6
|
-
end_hr: (Time.now + -3 * 86400),
|
7
|
-
}
|
8
|
-
p api_instance.get_usage_lambda_traced_invocations((Time.now + -5 * 86400), opts)
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Get hourly usage for Observability Pipelines returns "OK" response
|
2
|
-
|
3
|
-
require "datadog_api_client"
|
4
|
-
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
|
5
|
-
opts = {
|
6
|
-
end_hr: (Time.now + -3 * 86400),
|
7
|
-
}
|
8
|
-
p api_instance.get_usage_observability_pipelines((Time.now + -5 * 86400), opts)
|
@@ -1,191 +0,0 @@
|
|
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 JSON:API attributes of the finding.
|
21
|
-
class MuteFindingResponseAttributes
|
22
|
-
include BaseGenericModel
|
23
|
-
|
24
|
-
# The evaluation of the finding.
|
25
|
-
attr_accessor :evaluation
|
26
|
-
|
27
|
-
# The date on which the evaluation for this finding changed (Unix ms).
|
28
|
-
attr_reader :evaluation_changed_at
|
29
|
-
|
30
|
-
# Information about the mute status of this finding.
|
31
|
-
attr_accessor :mute
|
32
|
-
|
33
|
-
# The resource name of this finding.
|
34
|
-
attr_accessor :resource
|
35
|
-
|
36
|
-
# The date on which the resource was discovered (Unix ms).
|
37
|
-
attr_reader :resource_discovery_date
|
38
|
-
|
39
|
-
# The resource type of this finding.
|
40
|
-
attr_accessor :resource_type
|
41
|
-
|
42
|
-
# The rule that triggered this finding.
|
43
|
-
attr_accessor :rule
|
44
|
-
|
45
|
-
# The status of the finding.
|
46
|
-
attr_accessor :status
|
47
|
-
|
48
|
-
# The tags associated with this finding.
|
49
|
-
attr_accessor :tags
|
50
|
-
|
51
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
-
# @!visibility private
|
53
|
-
def self.attribute_map
|
54
|
-
{
|
55
|
-
:'evaluation' => :'evaluation',
|
56
|
-
:'evaluation_changed_at' => :'evaluation_changed_at',
|
57
|
-
:'mute' => :'mute',
|
58
|
-
:'resource' => :'resource',
|
59
|
-
:'resource_discovery_date' => :'resource_discovery_date',
|
60
|
-
:'resource_type' => :'resource_type',
|
61
|
-
:'rule' => :'rule',
|
62
|
-
:'status' => :'status',
|
63
|
-
:'tags' => :'tags'
|
64
|
-
}
|
65
|
-
end
|
66
|
-
|
67
|
-
# Attribute type mapping.
|
68
|
-
# @!visibility private
|
69
|
-
def self.openapi_types
|
70
|
-
{
|
71
|
-
:'evaluation' => :'FindingEvaluation',
|
72
|
-
:'evaluation_changed_at' => :'Integer',
|
73
|
-
:'mute' => :'MuteFindingResponseProperties',
|
74
|
-
:'resource' => :'String',
|
75
|
-
:'resource_discovery_date' => :'Integer',
|
76
|
-
:'resource_type' => :'String',
|
77
|
-
:'rule' => :'FindingRule',
|
78
|
-
:'status' => :'FindingStatus',
|
79
|
-
:'tags' => :'Array<String>'
|
80
|
-
}
|
81
|
-
end
|
82
|
-
|
83
|
-
# Initializes the object
|
84
|
-
# @param attributes [Hash] Model attributes in the form of hash
|
85
|
-
# @!visibility private
|
86
|
-
def initialize(attributes = {})
|
87
|
-
if (!attributes.is_a?(Hash))
|
88
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MuteFindingResponseAttributes` initialize method"
|
89
|
-
end
|
90
|
-
|
91
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
92
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
93
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
94
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MuteFindingResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
95
|
-
end
|
96
|
-
h[k.to_sym] = v
|
97
|
-
}
|
98
|
-
|
99
|
-
if attributes.key?(:'evaluation')
|
100
|
-
self.evaluation = attributes[:'evaluation']
|
101
|
-
end
|
102
|
-
|
103
|
-
if attributes.key?(:'evaluation_changed_at')
|
104
|
-
self.evaluation_changed_at = attributes[:'evaluation_changed_at']
|
105
|
-
end
|
106
|
-
|
107
|
-
if attributes.key?(:'mute')
|
108
|
-
self.mute = attributes[:'mute']
|
109
|
-
end
|
110
|
-
|
111
|
-
if attributes.key?(:'resource')
|
112
|
-
self.resource = attributes[:'resource']
|
113
|
-
end
|
114
|
-
|
115
|
-
if attributes.key?(:'resource_discovery_date')
|
116
|
-
self.resource_discovery_date = attributes[:'resource_discovery_date']
|
117
|
-
end
|
118
|
-
|
119
|
-
if attributes.key?(:'resource_type')
|
120
|
-
self.resource_type = attributes[:'resource_type']
|
121
|
-
end
|
122
|
-
|
123
|
-
if attributes.key?(:'rule')
|
124
|
-
self.rule = attributes[:'rule']
|
125
|
-
end
|
126
|
-
|
127
|
-
if attributes.key?(:'status')
|
128
|
-
self.status = attributes[:'status']
|
129
|
-
end
|
130
|
-
|
131
|
-
if attributes.key?(:'tags')
|
132
|
-
if (value = attributes[:'tags']).is_a?(Array)
|
133
|
-
self.tags = value
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
# Check to see if the all the properties in the model are valid
|
139
|
-
# @return true if the model is valid
|
140
|
-
# @!visibility private
|
141
|
-
def valid?
|
142
|
-
return false if !@evaluation_changed_at.nil? && @evaluation_changed_at < 1
|
143
|
-
return false if !@resource_discovery_date.nil? && @resource_discovery_date < 1
|
144
|
-
true
|
145
|
-
end
|
146
|
-
|
147
|
-
# Custom attribute writer method with validation
|
148
|
-
# @param evaluation_changed_at [Object] Object to be assigned
|
149
|
-
# @!visibility private
|
150
|
-
def evaluation_changed_at=(evaluation_changed_at)
|
151
|
-
if !evaluation_changed_at.nil? && evaluation_changed_at < 1
|
152
|
-
fail ArgumentError, 'invalid value for "evaluation_changed_at", must be greater than or equal to 1.'
|
153
|
-
end
|
154
|
-
@evaluation_changed_at = evaluation_changed_at
|
155
|
-
end
|
156
|
-
|
157
|
-
# Custom attribute writer method with validation
|
158
|
-
# @param resource_discovery_date [Object] Object to be assigned
|
159
|
-
# @!visibility private
|
160
|
-
def resource_discovery_date=(resource_discovery_date)
|
161
|
-
if !resource_discovery_date.nil? && resource_discovery_date < 1
|
162
|
-
fail ArgumentError, 'invalid value for "resource_discovery_date", must be greater than or equal to 1.'
|
163
|
-
end
|
164
|
-
@resource_discovery_date = resource_discovery_date
|
165
|
-
end
|
166
|
-
|
167
|
-
# Checks equality by comparing each attribute.
|
168
|
-
# @param o [Object] Object to be compared
|
169
|
-
# @!visibility private
|
170
|
-
def ==(o)
|
171
|
-
return true if self.equal?(o)
|
172
|
-
self.class == o.class &&
|
173
|
-
evaluation == o.evaluation &&
|
174
|
-
evaluation_changed_at == o.evaluation_changed_at &&
|
175
|
-
mute == o.mute &&
|
176
|
-
resource == o.resource &&
|
177
|
-
resource_discovery_date == o.resource_discovery_date &&
|
178
|
-
resource_type == o.resource_type &&
|
179
|
-
rule == o.rule &&
|
180
|
-
status == o.status &&
|
181
|
-
tags == o.tags
|
182
|
-
end
|
183
|
-
|
184
|
-
# Calculates hash code according to all attributes.
|
185
|
-
# @return [Integer] Hash code
|
186
|
-
# @!visibility private
|
187
|
-
def hash
|
188
|
-
[evaluation, evaluation_changed_at, mute, resource, resource_discovery_date, resource_type, rule, status, tags].hash
|
189
|
-
end
|
190
|
-
end
|
191
|
-
end
|
@@ -1,114 +0,0 @@
|
|
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
|
-
# Information about the mute status of this finding.
|
21
|
-
class MuteFindingResponseProperties
|
22
|
-
include BaseGenericModel
|
23
|
-
|
24
|
-
# Additional information about the reason why this finding is muted or unmuted.
|
25
|
-
# This attribute will not be included in the response if the description is not provided in the request body.
|
26
|
-
#
|
27
|
-
attr_accessor :description
|
28
|
-
|
29
|
-
# The expiration date of the mute or unmute action.
|
30
|
-
# If the expiration date is not provided in the request body, this attribute will not be included in the response and the finding will be muted or unmuted indefinitely.
|
31
|
-
#
|
32
|
-
attr_accessor :expiration_date
|
33
|
-
|
34
|
-
# Whether this finding is muted or unmuted.
|
35
|
-
attr_accessor :muted
|
36
|
-
|
37
|
-
# The reason why this finding is muted or unmuted.
|
38
|
-
attr_accessor :reason
|
39
|
-
|
40
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
-
# @!visibility private
|
42
|
-
def self.attribute_map
|
43
|
-
{
|
44
|
-
:'description' => :'description',
|
45
|
-
:'expiration_date' => :'expiration_date',
|
46
|
-
:'muted' => :'muted',
|
47
|
-
:'reason' => :'reason'
|
48
|
-
}
|
49
|
-
end
|
50
|
-
|
51
|
-
# Attribute type mapping.
|
52
|
-
# @!visibility private
|
53
|
-
def self.openapi_types
|
54
|
-
{
|
55
|
-
:'description' => :'String',
|
56
|
-
:'expiration_date' => :'Integer',
|
57
|
-
:'muted' => :'Boolean',
|
58
|
-
:'reason' => :'FindingMuteReason'
|
59
|
-
}
|
60
|
-
end
|
61
|
-
|
62
|
-
# Initializes the object
|
63
|
-
# @param attributes [Hash] Model attributes in the form of hash
|
64
|
-
# @!visibility private
|
65
|
-
def initialize(attributes = {})
|
66
|
-
if (!attributes.is_a?(Hash))
|
67
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MuteFindingResponseProperties` initialize method"
|
68
|
-
end
|
69
|
-
|
70
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
71
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
72
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MuteFindingResponseProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
74
|
-
end
|
75
|
-
h[k.to_sym] = v
|
76
|
-
}
|
77
|
-
|
78
|
-
if attributes.key?(:'description')
|
79
|
-
self.description = attributes[:'description']
|
80
|
-
end
|
81
|
-
|
82
|
-
if attributes.key?(:'expiration_date')
|
83
|
-
self.expiration_date = attributes[:'expiration_date']
|
84
|
-
end
|
85
|
-
|
86
|
-
if attributes.key?(:'muted')
|
87
|
-
self.muted = attributes[:'muted']
|
88
|
-
end
|
89
|
-
|
90
|
-
if attributes.key?(:'reason')
|
91
|
-
self.reason = attributes[:'reason']
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
# Checks equality by comparing each attribute.
|
96
|
-
# @param o [Object] Object to be compared
|
97
|
-
# @!visibility private
|
98
|
-
def ==(o)
|
99
|
-
return true if self.equal?(o)
|
100
|
-
self.class == o.class &&
|
101
|
-
description == o.description &&
|
102
|
-
expiration_date == o.expiration_date &&
|
103
|
-
muted == o.muted &&
|
104
|
-
reason == o.reason
|
105
|
-
end
|
106
|
-
|
107
|
-
# Calculates hash code according to all attributes.
|
108
|
-
# @return [Integer] Hash code
|
109
|
-
# @!visibility private
|
110
|
-
def hash
|
111
|
-
[description, expiration_date, muted, reason].hash
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|