datadog_api_client 2.17.0 → 2.19.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/conftest.py +1 -1
- data/.generator/poetry.lock +69 -69
- data/.generator/schemas/v1/openapi.yaml +334 -16
- data/.generator/schemas/v2/openapi.yaml +2864 -470
- data/.generator/src/generator/cli.py +5 -0
- data/.generator/src/generator/templates/datadog_api_client.j2 +19 -0
- data/.generator/src/generator/templates/model_generic.j2 +2 -2
- data/.pre-commit-config.yaml +1 -1
- data/CHANGELOG.md +43 -0
- data/examples/v1/aws-integration/CreateAWSAccount.rb +2 -2
- data/examples/v1/aws-integration/DeleteAWSAccount.rb +1 -1
- data/examples/v1/aws-integration/UpdateAWSAccount.rb +6 -6
- data/examples/v1/azure-integration/CreateAzureIntegration.rb +5 -4
- data/examples/v1/azure-integration/DeleteAzureIntegration.rb +2 -14
- data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +1 -0
- data/examples/v1/azure-integration/UpdateAzureIntegration.rb +5 -4
- data/examples/v1/dashboards/CreateDashboard_1284514532.rb +3 -0
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +4 -5
- data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +2 -14
- data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +4 -5
- data/examples/v1/service-level-objectives/CreateSLO_3765703239.rb +46 -0
- data/examples/v1/synthetics/PatchTest.rb +22 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -3
- data/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.rb +18 -0
- data/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +29 -0
- data/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/GetCloudCostActivity.rb +5 -0
- data/examples/v2/cloud-cost-management/ListAWSRelatedAccounts.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostAWSCURConfigs.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostAzureUCConfigs.rb +5 -0
- data/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.rb +14 -0
- data/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.rb +14 -0
- data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +1 -1
- data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +4 -1
- data/examples/v2/container-images/ListContainerImages.rb +0 -3
- data/examples/v2/container-images/ListContainerImages_3088586393.rb +0 -3
- data/examples/v2/container-images/ListContainerImages_3974828736.rb +0 -3
- data/examples/v2/containers/ListContainers.rb +0 -3
- data/examples/v2/containers/ListContainers_2175733917.rb +0 -3
- data/examples/v2/containers/ListContainers_931009654.rb +0 -3
- data/examples/v2/dora-metrics/CreateDORADeployment.rb +23 -0
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +25 -0
- data/examples/v2/downtimes/ListMonitorDowntimes_3316718253.rb +5 -0
- data/examples/v2/events/ListEvents.rb +0 -3
- data/examples/v2/events/ListEvents_1527584014.rb +0 -3
- data/examples/v2/events/ListEvents_2663715109.rb +0 -3
- data/examples/v2/events/SearchEvents.rb +0 -3
- data/examples/v2/events/SearchEvents_3856995058.rb +0 -3
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +16 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +16 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +17 -0
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +19 -0
- data/examples/v2/okta-integration/CreateOktaAccount.rb +19 -0
- data/examples/v2/okta-integration/DeleteOktaAccount.rb +5 -0
- data/examples/v2/okta-integration/GetOktaAccount.rb +8 -0
- data/examples/v2/okta-integration/ListOktaAccounts.rb +5 -0
- data/examples/v2/okta-integration/UpdateOktaAccount.rb +20 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_3367706049.rb +46 -0
- data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +7 -0
- data/examples/v2/sensitive-data-scanner/UpdateScanningRule.rb +7 -10
- data/examples/v2/teams/CreateTeamMembership.rb +6 -0
- data/examples/v2/usage-metering/GetActiveBillingDimensions.rb +8 -0
- data/examples/v2/usage-metering/GetMonthlyCostAttribution.rb +8 -0
- data/examples/v2/usage-metering/GetProjectedCost.rb +8 -0
- data/lib/datadog_api_client/configuration.rb +4 -5
- data/lib/datadog_api_client/inflector.rb +113 -0
- data/lib/datadog_api_client/v1/api/downtimes_api.rb +28 -7
- data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +73 -1
- data/lib/datadog_api_client/v1/models/azure_account.rb +13 -2
- data/lib/datadog_api_client/v1/models/gcp_account.rb +22 -2
- data/lib/datadog_api_client/v1/models/organization.rb +1 -1
- data/lib/datadog_api_client/v1/models/service_level_objective.rb +11 -1
- data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +11 -1
- data/lib/datadog_api_client/v1/models/slo_data_source_query_definition.rb +62 -0
- data/lib/datadog_api_client/v1/models/slo_formula.rb +98 -0
- data/lib/datadog_api_client/v1/models/slo_response_data.rb +11 -1
- data/lib/datadog_api_client/v1/models/slo_sli_spec.rb +62 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_comparator.rb +29 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +141 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_query.rb +131 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +99 -0
- data/lib/datadog_api_client/v1/models/slo_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/slo_type_numeric.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_patch_test_body.rb +82 -0
- data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation.rb +100 -0
- data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation_name.rb +31 -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 +31 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +31 -1
- data/lib/datadog_api_client/v1/models/widget_live_span.rb +2 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +680 -0
- data/lib/datadog_api_client/v2/api/container_images_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/containers_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +181 -0
- data/lib/datadog_api_client/v2/api/downtimes_api.rb +25 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +0 -12
- data/lib/datadog_api_client/v2/api/metrics_api.rb +3 -2
- data/lib/datadog_api_client/v2/api/okta_integration_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +241 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_attributes.rb +92 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_body.rb +100 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/api_keys_response.rb +14 -4
- data/lib/datadog_api_client/v2/models/api_keys_response_meta.rb +90 -0
- data/lib/datadog_api_client/v2/models/api_keys_response_meta_page.rb +80 -0
- data/lib/datadog_api_client/v2/models/application_key_response_meta.rb +90 -0
- data/lib/datadog_api_client/v2/models/application_key_response_meta_page.rb +80 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config.rb +129 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +305 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb +202 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/aws_related_account.rb +129 -0
- data/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/aws_related_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config.rb +378 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb +129 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb +110 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pair_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +192 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/bill_config.rb +161 -0
- data/lib/datadog_api_client/v2/models/ci_app_git_info.rb +2 -2
- data/lib/datadog_api_client/v2/models/cloud_cost_activity.rb +119 -0
- data/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/cloud_cost_activity_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +28 -4
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +28 -4
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +28 -4
- data/lib/datadog_api_client/v2/models/cost_attribution_aggregates_body.rb +100 -0
- data/lib/datadog_api_client/v2/models/cost_attribution_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +170 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_data.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_response.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_response_data.rb +108 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/dora_git_info.rb +125 -0
- data/lib/datadog_api_client/v2/models/dora_incident_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +179 -0
- data/lib/datadog_api_client/v2/models/dora_incident_request_data.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_incident_response.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_incident_response_data.rb +108 -0
- data/lib/datadog_api_client/v2/models/dora_incident_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/full_api_key_attributes.rb +24 -4
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +25 -5
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +14 -4
- data/lib/datadog_api_client/v2/models/incident_create_relationships.rb +9 -19
- data/lib/datadog_api_client/v2/models/incident_impacts_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_integration_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/incident_non_datadog_creator.rb +90 -0
- data/lib/datadog_api_client/v2/models/incident_responders_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +69 -4
- data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +42 -4
- data/lib/datadog_api_client/v2/models/incident_severity.rb +31 -0
- data/lib/datadog_api_client/v2/models/incident_todo_attributes.rb +24 -4
- data/lib/datadog_api_client/v2/models/incident_todo_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/incident_todo_response_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_update_relationships.rb +8 -0
- data/lib/datadog_api_client/v2/models/incident_user_defined_field_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/list_application_keys_response.rb +14 -4
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_attributes.rb +151 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_body.rb +100 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_meta.rb +92 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_pagination.rb +88 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/okta_account.rb +129 -0
- data/lib/datadog_api_client/v2/models/okta_account_attributes.rb +170 -0
- data/lib/datadog_api_client/v2/models/okta_account_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/okta_account_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/okta_account_response_data.rb +140 -0
- data/lib/datadog_api_client/v2/models/okta_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/okta_account_update_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/okta_account_update_request_attributes.rb +149 -0
- data/lib/datadog_api_client/v2/models/okta_account_update_request_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/okta_accounts_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb +24 -4
- data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +2 -2
- data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +8 -0
- data/lib/datadog_api_client/v2/models/projected_cost.rb +100 -0
- data/lib/datadog_api_client/v2/models/projected_cost_attributes.rb +132 -0
- data/lib/datadog_api_client/v2/models/projected_cost_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/projected_cost_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_impact_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_impacts.rb +100 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_responder_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_responders.rb +100 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_field_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_fields.rb +100 -0
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb +98 -0
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +14 -4
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb +114 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb +92 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +112 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb +130 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +134 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +46 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +45 -1
- data/lib/datadog_api_client/v2/models/sort_direction.rb +27 -0
- data/lib/datadog_api_client/v2/models/user_team_attributes.rb +24 -1
- data/lib/datadog_api_client/v2/models/user_team_relationships.rb +11 -1
- data/lib/datadog_api_client/v2/models/user_team_team_type.rb +26 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/lib/datadog_api_client.rb +16 -1
- metadata +144 -2
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# A query to be combined with the third party case query.
|
|
21
|
+
class SecurityMonitoringThirdPartyRootQuery
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Fields to group by.
|
|
25
|
+
attr_accessor :group_by_fields
|
|
26
|
+
|
|
27
|
+
# Query to run on logs.
|
|
28
|
+
attr_accessor :query
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
# @!visibility private
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'group_by_fields' => :'groupByFields',
|
|
35
|
+
:'query' => :'query'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
# @!visibility private
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'group_by_fields' => :'Array<String>',
|
|
44
|
+
:'query' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Initializes the object
|
|
49
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
50
|
+
# @!visibility private
|
|
51
|
+
def initialize(attributes = {})
|
|
52
|
+
if (!attributes.is_a?(Hash))
|
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRootQuery` initialize method"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRootQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
60
|
+
end
|
|
61
|
+
h[k.to_sym] = v
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if attributes.key?(:'group_by_fields')
|
|
65
|
+
if (value = attributes[:'group_by_fields']).is_a?(Array)
|
|
66
|
+
self.group_by_fields = value
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'query')
|
|
71
|
+
self.query = attributes[:'query']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Checks equality by comparing each attribute.
|
|
76
|
+
# @param o [Object] Object to be compared
|
|
77
|
+
# @!visibility private
|
|
78
|
+
def ==(o)
|
|
79
|
+
return true if self.equal?(o)
|
|
80
|
+
self.class == o.class &&
|
|
81
|
+
group_by_fields == o.group_by_fields &&
|
|
82
|
+
query == o.query
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Calculates hash code according to all attributes.
|
|
86
|
+
# @return [Integer] Hash code
|
|
87
|
+
# @!visibility private
|
|
88
|
+
def hash
|
|
89
|
+
[group_by_fields, query].hash
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# Case when signal is generated by a third party rule.
|
|
21
|
+
class SecurityMonitoringThirdPartyRuleCase
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Name of the case.
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# Notification targets for each rule case.
|
|
28
|
+
attr_accessor :notifications
|
|
29
|
+
|
|
30
|
+
# A query to map a third party event to this case.
|
|
31
|
+
attr_accessor :query
|
|
32
|
+
|
|
33
|
+
# Severity of the Security Signal.
|
|
34
|
+
attr_accessor :status
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
# @!visibility private
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'name' => :'name',
|
|
41
|
+
:'notifications' => :'notifications',
|
|
42
|
+
:'query' => :'query',
|
|
43
|
+
:'status' => :'status'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
# @!visibility private
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'name' => :'String',
|
|
52
|
+
:'notifications' => :'Array<String>',
|
|
53
|
+
:'query' => :'String',
|
|
54
|
+
:'status' => :'SecurityMonitoringRuleSeverity'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
60
|
+
# @!visibility private
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRuleCase` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRuleCase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
70
|
+
end
|
|
71
|
+
h[k.to_sym] = v
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'name')
|
|
75
|
+
self.name = attributes[:'name']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'notifications')
|
|
79
|
+
if (value = attributes[:'notifications']).is_a?(Array)
|
|
80
|
+
self.notifications = value
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'query')
|
|
85
|
+
self.query = attributes[:'query']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'status')
|
|
89
|
+
self.status = attributes[:'status']
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Checks equality by comparing each attribute.
|
|
94
|
+
# @param o [Object] Object to be compared
|
|
95
|
+
# @!visibility private
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
name == o.name &&
|
|
100
|
+
notifications == o.notifications &&
|
|
101
|
+
query == o.query &&
|
|
102
|
+
status == o.status
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Calculates hash code according to all attributes.
|
|
106
|
+
# @return [Integer] Hash code
|
|
107
|
+
# @!visibility private
|
|
108
|
+
def hash
|
|
109
|
+
[name, notifications, query, status].hash
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
# Case when a signal is generated by a third party rule.
|
|
21
|
+
class SecurityMonitoringThirdPartyRuleCaseCreate
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Name of the case.
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# Notification targets for each rule case.
|
|
28
|
+
attr_accessor :notifications
|
|
29
|
+
|
|
30
|
+
# A query to map a third party event to this case.
|
|
31
|
+
attr_accessor :query
|
|
32
|
+
|
|
33
|
+
# Severity of the Security Signal.
|
|
34
|
+
attr_reader :status
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
# @!visibility private
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'name' => :'name',
|
|
41
|
+
:'notifications' => :'notifications',
|
|
42
|
+
:'query' => :'query',
|
|
43
|
+
:'status' => :'status'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
# @!visibility private
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'name' => :'String',
|
|
52
|
+
:'notifications' => :'Array<String>',
|
|
53
|
+
:'query' => :'String',
|
|
54
|
+
:'status' => :'SecurityMonitoringRuleSeverity'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
60
|
+
# @!visibility private
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRuleCaseCreate` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRuleCaseCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
70
|
+
end
|
|
71
|
+
h[k.to_sym] = v
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'name')
|
|
75
|
+
self.name = attributes[:'name']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'notifications')
|
|
79
|
+
if (value = attributes[:'notifications']).is_a?(Array)
|
|
80
|
+
self.notifications = value
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'query')
|
|
85
|
+
self.query = attributes[:'query']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'status')
|
|
89
|
+
self.status = attributes[:'status']
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Check to see if the all the properties in the model are valid
|
|
94
|
+
# @return true if the model is valid
|
|
95
|
+
# @!visibility private
|
|
96
|
+
def valid?
|
|
97
|
+
return false if @status.nil?
|
|
98
|
+
true
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Custom attribute writer method with validation
|
|
102
|
+
# @param status [Object] Object to be assigned
|
|
103
|
+
# @!visibility private
|
|
104
|
+
def status=(status)
|
|
105
|
+
if status.nil?
|
|
106
|
+
fail ArgumentError, 'invalid value for "status", status cannot be nil.'
|
|
107
|
+
end
|
|
108
|
+
@status = status
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Checks equality by comparing each attribute.
|
|
112
|
+
# @param o [Object] Object to be compared
|
|
113
|
+
# @!visibility private
|
|
114
|
+
def ==(o)
|
|
115
|
+
return true if self.equal?(o)
|
|
116
|
+
self.class == o.class &&
|
|
117
|
+
name == o.name &&
|
|
118
|
+
notifications == o.notifications &&
|
|
119
|
+
query == o.query &&
|
|
120
|
+
status == o.status
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Calculates hash code according to all attributes.
|
|
124
|
+
# @return [Integer] Hash code
|
|
125
|
+
# @!visibility private
|
|
126
|
+
def hash
|
|
127
|
+
[name, notifications, query, status].hash
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# Object defining a set of keywords and a number of characters that help reduce noise.
|
|
21
|
+
# You can provide a list of keywords you would like to check within a defined proximity of the matching pattern.
|
|
22
|
+
# If any of the keywords are found within the proximity check, the match is kept.
|
|
23
|
+
# If none are found, the match is discarded.
|
|
24
|
+
class SensitiveDataScannerIncludedKeywordConfiguration
|
|
25
|
+
include BaseGenericModel
|
|
26
|
+
|
|
27
|
+
# The number of characters behind a match detected by Sensitive Data Scanner to look for the keywords defined.
|
|
28
|
+
# `character_count` should be greater than the maximum length of a keyword defined for a rule.
|
|
29
|
+
attr_reader :character_count
|
|
30
|
+
|
|
31
|
+
# Keyword list that will be checked during scanning in order to validate a match.
|
|
32
|
+
# The number of keywords in the list must be less than or equal to 20.
|
|
33
|
+
attr_reader :keywords
|
|
34
|
+
|
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
|
+
# @!visibility private
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'character_count' => :'character_count',
|
|
40
|
+
:'keywords' => :'keywords'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
# @!visibility private
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'character_count' => :'Integer',
|
|
49
|
+
:'keywords' => :'Array<String>'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Initializes the object
|
|
54
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
55
|
+
# @!visibility private
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerIncludedKeywordConfiguration` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerIncludedKeywordConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
65
|
+
end
|
|
66
|
+
h[k.to_sym] = v
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if attributes.key?(:'character_count')
|
|
70
|
+
self.character_count = attributes[:'character_count']
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'keywords')
|
|
74
|
+
if (value = attributes[:'keywords']).is_a?(Array)
|
|
75
|
+
self.keywords = value
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Check to see if the all the properties in the model are valid
|
|
81
|
+
# @return true if the model is valid
|
|
82
|
+
# @!visibility private
|
|
83
|
+
def valid?
|
|
84
|
+
return false if @character_count.nil?
|
|
85
|
+
return false if @character_count > 50
|
|
86
|
+
return false if @character_count < 1
|
|
87
|
+
return false if @keywords.nil?
|
|
88
|
+
true
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Custom attribute writer method with validation
|
|
92
|
+
# @param character_count [Object] Object to be assigned
|
|
93
|
+
# @!visibility private
|
|
94
|
+
def character_count=(character_count)
|
|
95
|
+
if character_count.nil?
|
|
96
|
+
fail ArgumentError, 'invalid value for "character_count", character_count cannot be nil.'
|
|
97
|
+
end
|
|
98
|
+
if character_count > 50
|
|
99
|
+
fail ArgumentError, 'invalid value for "character_count", must be smaller than or equal to 50.'
|
|
100
|
+
end
|
|
101
|
+
if character_count < 1
|
|
102
|
+
fail ArgumentError, 'invalid value for "character_count", must be greater than or equal to 1.'
|
|
103
|
+
end
|
|
104
|
+
@character_count = character_count
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Custom attribute writer method with validation
|
|
108
|
+
# @param keywords [Object] Object to be assigned
|
|
109
|
+
# @!visibility private
|
|
110
|
+
def keywords=(keywords)
|
|
111
|
+
if keywords.nil?
|
|
112
|
+
fail ArgumentError, 'invalid value for "keywords", keywords cannot be nil.'
|
|
113
|
+
end
|
|
114
|
+
@keywords = keywords
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Checks equality by comparing each attribute.
|
|
118
|
+
# @param o [Object] Object to be compared
|
|
119
|
+
# @!visibility private
|
|
120
|
+
def ==(o)
|
|
121
|
+
return true if self.equal?(o)
|
|
122
|
+
self.class == o.class &&
|
|
123
|
+
character_count == o.character_count &&
|
|
124
|
+
keywords == o.keywords
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Calculates hash code according to all attributes.
|
|
128
|
+
# @return [Integer] Hash code
|
|
129
|
+
# @!visibility private
|
|
130
|
+
def hash
|
|
131
|
+
[character_count, keywords].hash
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
@@ -27,6 +27,12 @@ module DatadogAPIClient::V2
|
|
|
27
27
|
# Attributes excluded from the scan. If namespaces is provided, it has to be a sub-path of the namespaces array.
|
|
28
28
|
attr_accessor :excluded_namespaces
|
|
29
29
|
|
|
30
|
+
# Object defining a set of keywords and a number of characters that help reduce noise.
|
|
31
|
+
# You can provide a list of keywords you would like to check within a defined proximity of the matching pattern.
|
|
32
|
+
# If any of the keywords are found within the proximity check, the match is kept.
|
|
33
|
+
# If none are found, the match is discarded.
|
|
34
|
+
attr_accessor :included_keyword_configuration
|
|
35
|
+
|
|
30
36
|
# Whether or not the rule is enabled.
|
|
31
37
|
attr_accessor :is_enabled
|
|
32
38
|
|
|
@@ -40,6 +46,9 @@ module DatadogAPIClient::V2
|
|
|
40
46
|
# Not included if there is a relationship to a standard pattern.
|
|
41
47
|
attr_accessor :pattern
|
|
42
48
|
|
|
49
|
+
# Integer from 1 (high) to 5 (low) indicating rule issue severity.
|
|
50
|
+
attr_reader :priority
|
|
51
|
+
|
|
43
52
|
# List of tags.
|
|
44
53
|
attr_accessor :tags
|
|
45
54
|
|
|
@@ -52,10 +61,12 @@ module DatadogAPIClient::V2
|
|
|
52
61
|
{
|
|
53
62
|
:'description' => :'description',
|
|
54
63
|
:'excluded_namespaces' => :'excluded_namespaces',
|
|
64
|
+
:'included_keyword_configuration' => :'included_keyword_configuration',
|
|
55
65
|
:'is_enabled' => :'is_enabled',
|
|
56
66
|
:'name' => :'name',
|
|
57
67
|
:'namespaces' => :'namespaces',
|
|
58
68
|
:'pattern' => :'pattern',
|
|
69
|
+
:'priority' => :'priority',
|
|
59
70
|
:'tags' => :'tags',
|
|
60
71
|
:'text_replacement' => :'text_replacement'
|
|
61
72
|
}
|
|
@@ -67,10 +78,12 @@ module DatadogAPIClient::V2
|
|
|
67
78
|
{
|
|
68
79
|
:'description' => :'String',
|
|
69
80
|
:'excluded_namespaces' => :'Array<String>',
|
|
81
|
+
:'included_keyword_configuration' => :'SensitiveDataScannerIncludedKeywordConfiguration',
|
|
70
82
|
:'is_enabled' => :'Boolean',
|
|
71
83
|
:'name' => :'String',
|
|
72
84
|
:'namespaces' => :'Array<String>',
|
|
73
85
|
:'pattern' => :'String',
|
|
86
|
+
:'priority' => :'Integer',
|
|
74
87
|
:'tags' => :'Array<String>',
|
|
75
88
|
:'text_replacement' => :'SensitiveDataScannerTextReplacement'
|
|
76
89
|
}
|
|
@@ -102,6 +115,10 @@ module DatadogAPIClient::V2
|
|
|
102
115
|
end
|
|
103
116
|
end
|
|
104
117
|
|
|
118
|
+
if attributes.key?(:'included_keyword_configuration')
|
|
119
|
+
self.included_keyword_configuration = attributes[:'included_keyword_configuration']
|
|
120
|
+
end
|
|
121
|
+
|
|
105
122
|
if attributes.key?(:'is_enabled')
|
|
106
123
|
self.is_enabled = attributes[:'is_enabled']
|
|
107
124
|
end
|
|
@@ -120,6 +137,10 @@ module DatadogAPIClient::V2
|
|
|
120
137
|
self.pattern = attributes[:'pattern']
|
|
121
138
|
end
|
|
122
139
|
|
|
140
|
+
if attributes.key?(:'priority')
|
|
141
|
+
self.priority = attributes[:'priority']
|
|
142
|
+
end
|
|
143
|
+
|
|
123
144
|
if attributes.key?(:'tags')
|
|
124
145
|
if (value = attributes[:'tags']).is_a?(Array)
|
|
125
146
|
self.tags = value
|
|
@@ -131,6 +152,28 @@ module DatadogAPIClient::V2
|
|
|
131
152
|
end
|
|
132
153
|
end
|
|
133
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 !@priority.nil? && @priority > 5
|
|
160
|
+
return false if !@priority.nil? && @priority < 1
|
|
161
|
+
true
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Custom attribute writer method with validation
|
|
165
|
+
# @param priority [Object] Object to be assigned
|
|
166
|
+
# @!visibility private
|
|
167
|
+
def priority=(priority)
|
|
168
|
+
if !priority.nil? && priority > 5
|
|
169
|
+
fail ArgumentError, 'invalid value for "priority", must be smaller than or equal to 5.'
|
|
170
|
+
end
|
|
171
|
+
if !priority.nil? && priority < 1
|
|
172
|
+
fail ArgumentError, 'invalid value for "priority", must be greater than or equal to 1.'
|
|
173
|
+
end
|
|
174
|
+
@priority = priority
|
|
175
|
+
end
|
|
176
|
+
|
|
134
177
|
# Checks equality by comparing each attribute.
|
|
135
178
|
# @param o [Object] Object to be compared
|
|
136
179
|
# @!visibility private
|
|
@@ -139,10 +182,12 @@ module DatadogAPIClient::V2
|
|
|
139
182
|
self.class == o.class &&
|
|
140
183
|
description == o.description &&
|
|
141
184
|
excluded_namespaces == o.excluded_namespaces &&
|
|
185
|
+
included_keyword_configuration == o.included_keyword_configuration &&
|
|
142
186
|
is_enabled == o.is_enabled &&
|
|
143
187
|
name == o.name &&
|
|
144
188
|
namespaces == o.namespaces &&
|
|
145
189
|
pattern == o.pattern &&
|
|
190
|
+
priority == o.priority &&
|
|
146
191
|
tags == o.tags &&
|
|
147
192
|
text_replacement == o.text_replacement
|
|
148
193
|
end
|
|
@@ -151,7 +196,7 @@ module DatadogAPIClient::V2
|
|
|
151
196
|
# @return [Integer] Hash code
|
|
152
197
|
# @!visibility private
|
|
153
198
|
def hash
|
|
154
|
-
[description, excluded_namespaces, is_enabled, name, namespaces, pattern, tags, text_replacement].hash
|
|
199
|
+
[description, excluded_namespaces, included_keyword_configuration, is_enabled, name, namespaces, pattern, priority, tags, text_replacement].hash
|
|
155
200
|
end
|
|
156
201
|
end
|
|
157
202
|
end
|
|
@@ -24,12 +24,18 @@ module DatadogAPIClient::V2
|
|
|
24
24
|
# Description of the standard pattern.
|
|
25
25
|
attr_accessor :description
|
|
26
26
|
|
|
27
|
+
# List of included keywords.
|
|
28
|
+
attr_accessor :included_keywords
|
|
29
|
+
|
|
27
30
|
# Name of the standard pattern.
|
|
28
31
|
attr_accessor :name
|
|
29
32
|
|
|
30
33
|
# Regex to match.
|
|
31
34
|
attr_accessor :pattern
|
|
32
35
|
|
|
36
|
+
# Integer from 1 (high) to 5 (low) indicating standard pattern issue severity.
|
|
37
|
+
attr_reader :priority
|
|
38
|
+
|
|
33
39
|
# List of tags.
|
|
34
40
|
attr_accessor :tags
|
|
35
41
|
|
|
@@ -38,8 +44,10 @@ module DatadogAPIClient::V2
|
|
|
38
44
|
def self.attribute_map
|
|
39
45
|
{
|
|
40
46
|
:'description' => :'description',
|
|
47
|
+
:'included_keywords' => :'included_keywords',
|
|
41
48
|
:'name' => :'name',
|
|
42
49
|
:'pattern' => :'pattern',
|
|
50
|
+
:'priority' => :'priority',
|
|
43
51
|
:'tags' => :'tags'
|
|
44
52
|
}
|
|
45
53
|
end
|
|
@@ -49,8 +57,10 @@ module DatadogAPIClient::V2
|
|
|
49
57
|
def self.openapi_types
|
|
50
58
|
{
|
|
51
59
|
:'description' => :'String',
|
|
60
|
+
:'included_keywords' => :'Array<String>',
|
|
52
61
|
:'name' => :'String',
|
|
53
62
|
:'pattern' => :'String',
|
|
63
|
+
:'priority' => :'Integer',
|
|
54
64
|
:'tags' => :'Array<String>'
|
|
55
65
|
}
|
|
56
66
|
end
|
|
@@ -75,6 +85,12 @@ module DatadogAPIClient::V2
|
|
|
75
85
|
self.description = attributes[:'description']
|
|
76
86
|
end
|
|
77
87
|
|
|
88
|
+
if attributes.key?(:'included_keywords')
|
|
89
|
+
if (value = attributes[:'included_keywords']).is_a?(Array)
|
|
90
|
+
self.included_keywords = value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
78
94
|
if attributes.key?(:'name')
|
|
79
95
|
self.name = attributes[:'name']
|
|
80
96
|
end
|
|
@@ -83,6 +99,10 @@ module DatadogAPIClient::V2
|
|
|
83
99
|
self.pattern = attributes[:'pattern']
|
|
84
100
|
end
|
|
85
101
|
|
|
102
|
+
if attributes.key?(:'priority')
|
|
103
|
+
self.priority = attributes[:'priority']
|
|
104
|
+
end
|
|
105
|
+
|
|
86
106
|
if attributes.key?(:'tags')
|
|
87
107
|
if (value = attributes[:'tags']).is_a?(Array)
|
|
88
108
|
self.tags = value
|
|
@@ -90,6 +110,28 @@ module DatadogAPIClient::V2
|
|
|
90
110
|
end
|
|
91
111
|
end
|
|
92
112
|
|
|
113
|
+
# Check to see if the all the properties in the model are valid
|
|
114
|
+
# @return true if the model is valid
|
|
115
|
+
# @!visibility private
|
|
116
|
+
def valid?
|
|
117
|
+
return false if !@priority.nil? && @priority > 5
|
|
118
|
+
return false if !@priority.nil? && @priority < 1
|
|
119
|
+
true
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Custom attribute writer method with validation
|
|
123
|
+
# @param priority [Object] Object to be assigned
|
|
124
|
+
# @!visibility private
|
|
125
|
+
def priority=(priority)
|
|
126
|
+
if !priority.nil? && priority > 5
|
|
127
|
+
fail ArgumentError, 'invalid value for "priority", must be smaller than or equal to 5.'
|
|
128
|
+
end
|
|
129
|
+
if !priority.nil? && priority < 1
|
|
130
|
+
fail ArgumentError, 'invalid value for "priority", must be greater than or equal to 1.'
|
|
131
|
+
end
|
|
132
|
+
@priority = priority
|
|
133
|
+
end
|
|
134
|
+
|
|
93
135
|
# Checks equality by comparing each attribute.
|
|
94
136
|
# @param o [Object] Object to be compared
|
|
95
137
|
# @!visibility private
|
|
@@ -97,8 +139,10 @@ module DatadogAPIClient::V2
|
|
|
97
139
|
return true if self.equal?(o)
|
|
98
140
|
self.class == o.class &&
|
|
99
141
|
description == o.description &&
|
|
142
|
+
included_keywords == o.included_keywords &&
|
|
100
143
|
name == o.name &&
|
|
101
144
|
pattern == o.pattern &&
|
|
145
|
+
priority == o.priority &&
|
|
102
146
|
tags == o.tags
|
|
103
147
|
end
|
|
104
148
|
|
|
@@ -106,7 +150,7 @@ module DatadogAPIClient::V2
|
|
|
106
150
|
# @return [Integer] Hash code
|
|
107
151
|
# @!visibility private
|
|
108
152
|
def hash
|
|
109
|
-
[description, name, pattern, tags].hash
|
|
153
|
+
[description, included_keywords, name, pattern, priority, tags].hash
|
|
110
154
|
end
|
|
111
155
|
end
|
|
112
156
|
end
|