Skip to content

Commit f09b123

Browse files
author
SDKAuto
committed
CodeGen from PR 21853 in Azure/azure-rest-api-specs
Merge 97aef033f398aa4c92e8f928f5c872539e68f875 into 2647ee494ecbe4668bdf16486207fecd67843e57
1 parent b63108e commit f09b123

File tree

260 files changed

+16137
-2317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+16137
-2317
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.8.4",
2+
"commit": "f7c35f46dc69f05519f54b845724305ab86d3511",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"autorest": "3.9.2",
35
"use": [
4-
"@autorest/python@6.1.6",
5-
"@autorest/modelerfour@4.23.5"
6+
"@autorest/python@6.2.7",
7+
"@autorest/modelerfour@4.24.3"
68
],
7-
"commit": "e24bbf6a66cb0a19c072c6f15cee163acbd7acf7",
8-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/securityinsights/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.8.4 --version-tolerant=False",
9+
"autorest_command": "autorest specification/securityinsights/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/securityinsights/resource-manager/readme.md"
1111
}

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313

1414
try:
1515
from ._patch import __all__ as _patch_all
16-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
16+
from ._patch import * # pylint: disable=unused-wildcard-import
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk
2020

21-
__all__ = ["SecurityInsights"]
21+
__all__ = [
22+
"SecurityInsights",
23+
]
2224
__all__.extend([p for p in _patch_all if p not in __all__])
2325

2426
_patch_sdk()

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_configuration.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9+
import sys
910
from typing import Any, TYPE_CHECKING
1011

1112
from azure.core.configuration import Configuration
@@ -14,6 +15,11 @@
1415

1516
from ._version import VERSION
1617

18+
if sys.version_info >= (3, 8):
19+
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20+
else:
21+
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22+
1723
if TYPE_CHECKING:
1824
# pylint: disable=unused-import,ungrouped-imports
1925
from azure.core.credentials import TokenCredential
@@ -29,14 +35,14 @@ class SecurityInsightsConfiguration(Configuration): # pylint: disable=too-many-
2935
:type credential: ~azure.core.credentials.TokenCredential
3036
:param subscription_id: The ID of the target subscription. Required.
3137
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
38+
:keyword api_version: Api Version. Default value is "2022-12-01-preview". Note that overriding
3339
this default value may result in unsupported behavior.
3440
:paramtype api_version: str
3541
"""
3642

3743
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3844
super(SecurityInsightsConfiguration, self).__init__(**kwargs)
39-
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: str
45+
api_version: Literal["2022-12-01-preview"] = kwargs.pop("api_version", "2022-12-01-preview")
4046

4147
if credential is None:
4248
raise ValueError("Parameter 'credential' must not be None.")
@@ -50,10 +56,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5056
kwargs.setdefault("sdk_moniker", "mgmt-securityinsight/{}".format(VERSION))
5157
self._configure(**kwargs)
5258

53-
def _configure(
54-
self, **kwargs # type: Any
55-
):
56-
# type: (...) -> None
59+
def _configure(self, **kwargs: Any) -> None:
5760
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
5861
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
5962
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_security_insights.py

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from azure.core.rest import HttpRequest, HttpResponse
1313
from azure.mgmt.core import ARMPipelineClient
1414

15-
from . import models
15+
from . import models as _models
1616
from ._configuration import SecurityInsightsConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
@@ -33,9 +33,12 @@
3333
EntityQueryTemplatesOperations,
3434
EntityRelationsOperations,
3535
FileImportsOperations,
36+
GetOperations,
37+
GetRecommendationsOperations,
3638
IPGeodataOperations,
3739
IncidentCommentsOperations,
3840
IncidentRelationsOperations,
41+
IncidentTasksOperations,
3942
IncidentsOperations,
4043
MetadataOperations,
4144
OfficeConsentsOperations,
@@ -48,6 +51,7 @@
4851
ThreatIntelligenceIndicatorMetricsOperations,
4952
ThreatIntelligenceIndicatorOperations,
5053
ThreatIntelligenceIndicatorsOperations,
54+
UpdateOperations,
5155
WatchlistItemsOperations,
5256
WatchlistsOperations,
5357
)
@@ -101,13 +105,22 @@ class SecurityInsights: # pylint: disable=client-accepts-api-version-keyword,to
101105
:vartype incident_comments: azure.mgmt.securityinsight.operations.IncidentCommentsOperations
102106
:ivar incident_relations: IncidentRelationsOperations operations
103107
:vartype incident_relations: azure.mgmt.securityinsight.operations.IncidentRelationsOperations
108+
:ivar incident_tasks: IncidentTasksOperations operations
109+
:vartype incident_tasks: azure.mgmt.securityinsight.operations.IncidentTasksOperations
104110
:ivar metadata: MetadataOperations operations
105111
:vartype metadata: azure.mgmt.securityinsight.operations.MetadataOperations
106112
:ivar office_consents: OfficeConsentsOperations operations
107113
:vartype office_consents: azure.mgmt.securityinsight.operations.OfficeConsentsOperations
108114
:ivar sentinel_onboarding_states: SentinelOnboardingStatesOperations operations
109115
:vartype sentinel_onboarding_states:
110116
azure.mgmt.securityinsight.operations.SentinelOnboardingStatesOperations
117+
:ivar get_recommendations: GetRecommendationsOperations operations
118+
:vartype get_recommendations:
119+
azure.mgmt.securityinsight.operations.GetRecommendationsOperations
120+
:ivar get: GetOperations operations
121+
:vartype get: azure.mgmt.securityinsight.operations.GetOperations
122+
:ivar update: UpdateOperations operations
123+
:vartype update: azure.mgmt.securityinsight.operations.UpdateOperations
111124
:ivar security_ml_analytics_settings: SecurityMLAnalyticsSettingsOperations operations
112125
:vartype security_ml_analytics_settings:
113126
azure.mgmt.securityinsight.operations.SecurityMLAnalyticsSettingsOperations
@@ -144,7 +157,7 @@ class SecurityInsights: # pylint: disable=client-accepts-api-version-keyword,to
144157
:type subscription_id: str
145158
:param base_url: Service URL. Default value is "https://management.azure.com".
146159
:type base_url: str
147-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
160+
:keyword api_version: Api Version. Default value is "2022-12-01-preview". Note that overriding
148161
this default value may result in unsupported behavior.
149162
:paramtype api_version: str
150163
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -161,7 +174,7 @@ def __init__(
161174
self._config = SecurityInsightsConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
162175
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
163176

164-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
177+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
165178
self._serialize = Serializer(client_models)
166179
self._deserialize = Deserializer(client_models)
167180
self._serialize.client_side_validation = False
@@ -202,11 +215,17 @@ def __init__(
202215
self.incident_relations = IncidentRelationsOperations(
203216
self._client, self._config, self._serialize, self._deserialize
204217
)
218+
self.incident_tasks = IncidentTasksOperations(self._client, self._config, self._serialize, self._deserialize)
205219
self.metadata = MetadataOperations(self._client, self._config, self._serialize, self._deserialize)
206220
self.office_consents = OfficeConsentsOperations(self._client, self._config, self._serialize, self._deserialize)
207221
self.sentinel_onboarding_states = SentinelOnboardingStatesOperations(
208222
self._client, self._config, self._serialize, self._deserialize
209223
)
224+
self.get_recommendations = GetRecommendationsOperations(
225+
self._client, self._config, self._serialize, self._deserialize
226+
)
227+
self.get = GetOperations(self._client, self._config, self._serialize, self._deserialize)
228+
self.update = UpdateOperations(self._client, self._config, self._serialize, self._deserialize)
210229
self.security_ml_analytics_settings = SecurityMLAnalyticsSettingsOperations(
211230
self._client, self._config, self._serialize, self._deserialize
212231
)
@@ -254,15 +273,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
254273
request_copy.url = self._client.format_url(request_copy.url)
255274
return self._client.send_request(request_copy, **kwargs)
256275

257-
def close(self):
258-
# type: () -> None
276+
def close(self) -> None:
259277
self._client.close()
260278

261-
def __enter__(self):
262-
# type: () -> SecurityInsights
279+
def __enter__(self) -> "SecurityInsights":
263280
self._client.__enter__()
264281
return self
265282

266-
def __exit__(self, *exc_details):
267-
# type: (Any) -> None
283+
def __exit__(self, *exc_details) -> None:
268284
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)