|
| 1 | +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. |
| 2 | +# This product includes software developed at Datadog (https://www.datadoghq.com/). |
| 3 | +# Copyright 2019-Present Datadog, Inc. |
| 4 | +from __future__ import annotations |
| 5 | + |
| 6 | +from typing import List |
| 7 | + |
| 8 | +from datadog_api_client.model_utils import ( |
| 9 | + ModelNormal, |
| 10 | + cached_property, |
| 11 | +) |
| 12 | + |
| 13 | + |
| 14 | +class ApplicationSecurityServiceAttributes(ModelNormal): |
| 15 | + @cached_property |
| 16 | + def openapi_types(_): |
| 17 | + return { |
| 18 | + "agent_versions": ([str],), |
| 19 | + "app_type": (str,), |
| 20 | + "asm_threat_compatible": (bool,), |
| 21 | + "backend_waf_event_count": (int,), |
| 22 | + "business_logic": ([str],), |
| 23 | + "color": (str,), |
| 24 | + "env": (str,), |
| 25 | + "event_count": (int,), |
| 26 | + "event_trend": ([int],), |
| 27 | + "has_appsec_enabled": (bool,), |
| 28 | + "hits": (int,), |
| 29 | + "iast_product_activation": (bool,), |
| 30 | + "iast_product_compatibility": (str,), |
| 31 | + "iast_product_compatibility_reasons": ([str],), |
| 32 | + "languages": ([str],), |
| 33 | + "last_ingested_spans": (int,), |
| 34 | + "rc_capabilities": ([str],), |
| 35 | + "recommended_business_logic": ([str],), |
| 36 | + "risk_product_activation": (bool,), |
| 37 | + "risk_product_compatibility": (str,), |
| 38 | + "risk_product_compatibility_reasons": ([str],), |
| 39 | + "rules_version": ([str],), |
| 40 | + "service": (str,), |
| 41 | + "signal_count": (int,), |
| 42 | + "signal_trend": ([int],), |
| 43 | + "source": ([str],), |
| 44 | + "teams": ([str],), |
| 45 | + "tracer_versions": ([str],), |
| 46 | + "vm_activation": (str,), |
| 47 | + "vuln_critical_count": (int,), |
| 48 | + "vuln_high_count": (int,), |
| 49 | + "without_filter_services": (int,), |
| 50 | + } |
| 51 | + |
| 52 | + attribute_map = { |
| 53 | + "agent_versions": "agent_versions", |
| 54 | + "app_type": "app_type", |
| 55 | + "asm_threat_compatible": "asm_threat_compatible", |
| 56 | + "backend_waf_event_count": "backend_waf_event_count", |
| 57 | + "business_logic": "business_logic", |
| 58 | + "color": "color", |
| 59 | + "env": "env", |
| 60 | + "event_count": "event_count", |
| 61 | + "event_trend": "event_trend", |
| 62 | + "has_appsec_enabled": "has_appsec_enabled", |
| 63 | + "hits": "hits", |
| 64 | + "iast_product_activation": "iast_product_activation", |
| 65 | + "iast_product_compatibility": "iast_product_compatibility", |
| 66 | + "iast_product_compatibility_reasons": "iast_product_compatibility_reasons", |
| 67 | + "languages": "languages", |
| 68 | + "last_ingested_spans": "last_ingested_spans", |
| 69 | + "rc_capabilities": "rc_capabilities", |
| 70 | + "recommended_business_logic": "recommended_business_logic", |
| 71 | + "risk_product_activation": "risk_product_activation", |
| 72 | + "risk_product_compatibility": "risk_product_compatibility", |
| 73 | + "risk_product_compatibility_reasons": "risk_product_compatibility_reasons", |
| 74 | + "rules_version": "rules_version", |
| 75 | + "service": "service", |
| 76 | + "signal_count": "signal_count", |
| 77 | + "signal_trend": "signal_trend", |
| 78 | + "source": "source", |
| 79 | + "teams": "teams", |
| 80 | + "tracer_versions": "tracer_versions", |
| 81 | + "vm_activation": "vm-activation", |
| 82 | + "vuln_critical_count": "vuln_critical_count", |
| 83 | + "vuln_high_count": "vuln_high_count", |
| 84 | + "without_filter_services": "without_filter_services", |
| 85 | + } |
| 86 | + |
| 87 | + def __init__( |
| 88 | + self_, |
| 89 | + agent_versions: List[str], |
| 90 | + app_type: str, |
| 91 | + asm_threat_compatible: bool, |
| 92 | + backend_waf_event_count: int, |
| 93 | + business_logic: List[str], |
| 94 | + color: str, |
| 95 | + env: str, |
| 96 | + event_count: int, |
| 97 | + event_trend: List[int], |
| 98 | + has_appsec_enabled: bool, |
| 99 | + hits: int, |
| 100 | + iast_product_activation: bool, |
| 101 | + iast_product_compatibility: str, |
| 102 | + iast_product_compatibility_reasons: List[str], |
| 103 | + languages: List[str], |
| 104 | + last_ingested_spans: int, |
| 105 | + rc_capabilities: List[str], |
| 106 | + recommended_business_logic: List[str], |
| 107 | + risk_product_activation: bool, |
| 108 | + risk_product_compatibility: str, |
| 109 | + risk_product_compatibility_reasons: List[str], |
| 110 | + rules_version: List[str], |
| 111 | + service: str, |
| 112 | + signal_count: int, |
| 113 | + signal_trend: List[int], |
| 114 | + source: List[str], |
| 115 | + teams: List[str], |
| 116 | + tracer_versions: List[str], |
| 117 | + vm_activation: str, |
| 118 | + vuln_critical_count: int, |
| 119 | + vuln_high_count: int, |
| 120 | + without_filter_services: int, |
| 121 | + **kwargs, |
| 122 | + ): |
| 123 | + """ |
| 124 | + Application Security details describing a service in a given environment. |
| 125 | +
|
| 126 | + :param agent_versions: The Datadog Agent versions reporting for the service. |
| 127 | + :type agent_versions: [str] |
| 128 | +
|
| 129 | + :param app_type: The application type of the service, such as ``web`` or ``serverless``. |
| 130 | + :type app_type: str |
| 131 | +
|
| 132 | + :param asm_threat_compatible: Whether the service is compatible with Application Security Management (Threats). |
| 133 | + :type asm_threat_compatible: bool |
| 134 | +
|
| 135 | + :param backend_waf_event_count: The number of backend WAF events detected for the service. |
| 136 | + :type backend_waf_event_count: int |
| 137 | +
|
| 138 | + :param business_logic: The enabled business logic detection rules for the service. |
| 139 | + :type business_logic: [str] |
| 140 | +
|
| 141 | + :param color: Deprecated: a display color associated with the service in the UI. **Deprecated**. |
| 142 | + :type color: str |
| 143 | +
|
| 144 | + :param env: The environment the service runs in. |
| 145 | + :type env: str |
| 146 | +
|
| 147 | + :param event_count: The number of Application Security events detected for the service. |
| 148 | + :type event_count: int |
| 149 | +
|
| 150 | + :param event_trend: Deprecated: the trend of Application Security events over time. **Deprecated**. |
| 151 | + :type event_trend: [int] |
| 152 | +
|
| 153 | + :param has_appsec_enabled: Whether Application Security Management (Threats) is enabled for the service. |
| 154 | + :type has_appsec_enabled: bool |
| 155 | +
|
| 156 | + :param hits: Deprecated: the number of hits for the service. **Deprecated**. |
| 157 | + :type hits: int |
| 158 | +
|
| 159 | + :param iast_product_activation: Whether Interactive Application Security Testing (IAST) is enabled for the service. |
| 160 | + :type iast_product_activation: bool |
| 161 | +
|
| 162 | + :param iast_product_compatibility: The Interactive Application Security Testing (IAST) compatibility status of the service. |
| 163 | + :type iast_product_compatibility: str |
| 164 | +
|
| 165 | + :param iast_product_compatibility_reasons: The reasons explaining the Interactive Application Security Testing (IAST) compatibility status. |
| 166 | + :type iast_product_compatibility_reasons: [str] |
| 167 | +
|
| 168 | + :param languages: The programming languages detected for the service. |
| 169 | + :type languages: [str] |
| 170 | +
|
| 171 | + :param last_ingested_spans: The Unix timestamp, in seconds, of the last ingested span for the service. |
| 172 | + :type last_ingested_spans: int |
| 173 | +
|
| 174 | + :param rc_capabilities: The Remote Configuration capabilities reported by the service. |
| 175 | + :type rc_capabilities: [str] |
| 176 | +
|
| 177 | + :param recommended_business_logic: The recommended business logic detection rules for the service. |
| 178 | + :type recommended_business_logic: [str] |
| 179 | +
|
| 180 | + :param risk_product_activation: Whether Software Composition Analysis (SCA) is enabled for the service. |
| 181 | + :type risk_product_activation: bool |
| 182 | +
|
| 183 | + :param risk_product_compatibility: The Software Composition Analysis (SCA) compatibility status of the service. |
| 184 | + :type risk_product_compatibility: str |
| 185 | +
|
| 186 | + :param risk_product_compatibility_reasons: The reasons explaining the Software Composition Analysis (SCA) compatibility status. |
| 187 | + :type risk_product_compatibility_reasons: [str] |
| 188 | +
|
| 189 | + :param rules_version: The WAF rules versions applied to the service. |
| 190 | + :type rules_version: [str] |
| 191 | +
|
| 192 | + :param service: The name of the service. |
| 193 | + :type service: str |
| 194 | +
|
| 195 | + :param signal_count: Deprecated: the number of security signals for the service. **Deprecated**. |
| 196 | + :type signal_count: int |
| 197 | +
|
| 198 | + :param signal_trend: Deprecated: the trend of security signals over time. **Deprecated**. |
| 199 | + :type signal_trend: [int] |
| 200 | +
|
| 201 | + :param source: The data sources that contributed information about the service. |
| 202 | + :type source: [str] |
| 203 | +
|
| 204 | + :param teams: The teams that own the service. |
| 205 | + :type teams: [str] |
| 206 | +
|
| 207 | + :param tracer_versions: The Datadog tracing library versions reporting for the service. |
| 208 | + :type tracer_versions: [str] |
| 209 | +
|
| 210 | + :param vm_activation: The Vulnerability Management activation status of the service. |
| 211 | + :type vm_activation: str |
| 212 | +
|
| 213 | + :param vuln_critical_count: Deprecated: the number of critical-severity vulnerabilities for the service. **Deprecated**. |
| 214 | + :type vuln_critical_count: int |
| 215 | +
|
| 216 | + :param vuln_high_count: Deprecated: the number of high-severity vulnerabilities for the service. **Deprecated**. |
| 217 | + :type vuln_high_count: int |
| 218 | +
|
| 219 | + :param without_filter_services: The total number of services available without applying the service filter. |
| 220 | + :type without_filter_services: int |
| 221 | + """ |
| 222 | + super().__init__(kwargs) |
| 223 | + |
| 224 | + self_.agent_versions = agent_versions |
| 225 | + self_.app_type = app_type |
| 226 | + self_.asm_threat_compatible = asm_threat_compatible |
| 227 | + self_.backend_waf_event_count = backend_waf_event_count |
| 228 | + self_.business_logic = business_logic |
| 229 | + self_.color = color |
| 230 | + self_.env = env |
| 231 | + self_.event_count = event_count |
| 232 | + self_.event_trend = event_trend |
| 233 | + self_.has_appsec_enabled = has_appsec_enabled |
| 234 | + self_.hits = hits |
| 235 | + self_.iast_product_activation = iast_product_activation |
| 236 | + self_.iast_product_compatibility = iast_product_compatibility |
| 237 | + self_.iast_product_compatibility_reasons = iast_product_compatibility_reasons |
| 238 | + self_.languages = languages |
| 239 | + self_.last_ingested_spans = last_ingested_spans |
| 240 | + self_.rc_capabilities = rc_capabilities |
| 241 | + self_.recommended_business_logic = recommended_business_logic |
| 242 | + self_.risk_product_activation = risk_product_activation |
| 243 | + self_.risk_product_compatibility = risk_product_compatibility |
| 244 | + self_.risk_product_compatibility_reasons = risk_product_compatibility_reasons |
| 245 | + self_.rules_version = rules_version |
| 246 | + self_.service = service |
| 247 | + self_.signal_count = signal_count |
| 248 | + self_.signal_trend = signal_trend |
| 249 | + self_.source = source |
| 250 | + self_.teams = teams |
| 251 | + self_.tracer_versions = tracer_versions |
| 252 | + self_.vm_activation = vm_activation |
| 253 | + self_.vuln_critical_count = vuln_critical_count |
| 254 | + self_.vuln_high_count = vuln_high_count |
| 255 | + self_.without_filter_services = without_filter_services |
0 commit comments