Skip to content

Commit 375ff0f

Browse files
author
SDKAuto
committed
CodeGen from PR 15692 in Azure/azure-rest-api-specs
Merge 2f1edceb597b0a63d9d2ba988d022e9fd965353a into 30d1537
1 parent 599ef47 commit 375ff0f

27 files changed

+916
-726
lines changed

sdk/securityinsight/azure-mgmt-securityinsight/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "1f744ab67c98739aedfdf4c311e5e666f96dd7af",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/securityinsights/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.4.5",
10+
"readme": "specification/securityinsights/resource-manager/readme.md"
11+
}

sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_metadata.json

Lines changed: 58 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,60 +8,103 @@
88
"base_url": "\u0027https://management.azure.com\u0027",
99
"custom_base_url": null,
1010
"azure_arm": true,
11-
"has_lro_operations": false
11+
"has_lro_operations": false,
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SecurityInsightsConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SecurityInsightsConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1215
},
1316
"global_parameters": {
14-
"sync_method": {
17+
"sync": {
1518
"credential": {
16-
"method_signature": "credential, # type: \"TokenCredential\"",
19+
"signature": "credential, # type: \"TokenCredential\"",
1720
"description": "Credential needed for the client to connect to Azure.",
1821
"docstring_type": "~azure.core.credentials.TokenCredential",
1922
"required": true
2023
},
2124
"subscription_id": {
22-
"method_signature": "subscription_id, # type: str",
25+
"signature": "subscription_id, # type: str",
2326
"description": "Azure subscription ID.",
2427
"docstring_type": "str",
2528
"required": true
2629
}
2730
},
28-
"async_method": {
31+
"async": {
2932
"credential": {
30-
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
33+
"signature": "credential: \"AsyncTokenCredential\",",
3134
"description": "Credential needed for the client to connect to Azure.",
3235
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
3336
"required": true
3437
},
3538
"subscription_id": {
36-
"method_signature": "subscription_id, # type: str",
39+
"signature": "subscription_id: str,",
3740
"description": "Azure subscription ID.",
3841
"docstring_type": "str",
3942
"required": true
4043
}
4144
},
4245
"constant": {
4346
},
44-
"call": "credential, subscription_id"
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
4590
},
4691
"config": {
4792
"credential": true,
4893
"credential_scopes": ["https://management.azure.com/.default"],
4994
"credential_default_policy_type": "BearerTokenCredentialPolicy",
5095
"credential_default_policy_type_has_async_version": true,
51-
"credential_key_header_name": null
96+
"credential_key_header_name": null,
97+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
98+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
5299
},
53100
"operation_groups": {
54-
"operations": "Operations",
55101
"alert_rules": "AlertRulesOperations",
56102
"actions": "ActionsOperations",
57103
"alert_rule_templates": "AlertRuleTemplatesOperations",
58104
"bookmarks": "BookmarksOperations",
59105
"data_connectors": "DataConnectorsOperations",
106+
"operations": "Operations",
60107
"incidents": "IncidentsOperations",
61108
"incident_comments": "IncidentCommentsOperations"
62-
},
63-
"operation_mixins": {
64-
},
65-
"sync_imports": "None",
66-
"async_imports": "None"
109+
}
67110
}

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

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import SecurityInsightsConfiguration
21-
from .operations import Operations
2222
from .operations import AlertRulesOperations
2323
from .operations import ActionsOperations
2424
from .operations import AlertRuleTemplatesOperations
2525
from .operations import BookmarksOperations
2626
from .operations import DataConnectorsOperations
27+
from .operations import Operations
2728
from .operations import IncidentsOperations
2829
from .operations import IncidentCommentsOperations
2930
from . import models
@@ -32,8 +33,6 @@
3233
class SecurityInsights(object):
3334
"""API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider.
3435
35-
:ivar operations: Operations operations
36-
:vartype operations: azure.mgmt.securityinsight.operations.Operations
3736
:ivar alert_rules: AlertRulesOperations operations
3837
:vartype alert_rules: azure.mgmt.securityinsight.operations.AlertRulesOperations
3938
:ivar actions: ActionsOperations operations
@@ -44,6 +43,8 @@ class SecurityInsights(object):
4443
:vartype bookmarks: azure.mgmt.securityinsight.operations.BookmarksOperations
4544
:ivar data_connectors: DataConnectorsOperations operations
4645
:vartype data_connectors: azure.mgmt.securityinsight.operations.DataConnectorsOperations
46+
:ivar operations: Operations operations
47+
:vartype operations: azure.mgmt.securityinsight.operations.Operations
4748
:ivar incidents: IncidentsOperations operations
4849
:vartype incidents: azure.mgmt.securityinsight.operations.IncidentsOperations
4950
:ivar incident_comments: IncidentCommentsOperations operations
@@ -70,10 +71,9 @@ def __init__(
7071

7172
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
7273
self._serialize = Serializer(client_models)
74+
self._serialize.client_side_validation = False
7375
self._deserialize = Deserializer(client_models)
7476

75-
self.operations = Operations(
76-
self._client, self._config, self._serialize, self._deserialize)
7777
self.alert_rules = AlertRulesOperations(
7878
self._client, self._config, self._serialize, self._deserialize)
7979
self.actions = ActionsOperations(
@@ -84,11 +84,31 @@ def __init__(
8484
self._client, self._config, self._serialize, self._deserialize)
8585
self.data_connectors = DataConnectorsOperations(
8686
self._client, self._config, self._serialize, self._deserialize)
87+
self.operations = Operations(
88+
self._client, self._config, self._serialize, self._deserialize)
8789
self.incidents = IncidentsOperations(
8890
self._client, self._config, self._serialize, self._deserialize)
8991
self.incident_comments = IncidentCommentsOperations(
9092
self._client, self._config, self._serialize, self._deserialize)
9193

94+
def _send_request(self, http_request, **kwargs):
95+
# type: (HttpRequest, Any) -> HttpResponse
96+
"""Runs the network request through the client's chained policies.
97+
98+
:param http_request: The network request you want to make. Required.
99+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
100+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
101+
:return: The response of your network call. Does not do error handling on your response.
102+
:rtype: ~azure.core.pipeline.transport.HttpResponse
103+
"""
104+
path_format_arguments = {
105+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'),
106+
}
107+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
108+
stream = kwargs.pop("stream", True)
109+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
110+
return pipeline_response.http_response
111+
92112
def close(self):
93113
# type: () -> None
94114
self._client.close()

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

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -16,12 +17,12 @@
1617
from azure.core.credentials_async import AsyncTokenCredential
1718

1819
from ._configuration import SecurityInsightsConfiguration
19-
from .operations import Operations
2020
from .operations import AlertRulesOperations
2121
from .operations import ActionsOperations
2222
from .operations import AlertRuleTemplatesOperations
2323
from .operations import BookmarksOperations
2424
from .operations import DataConnectorsOperations
25+
from .operations import Operations
2526
from .operations import IncidentsOperations
2627
from .operations import IncidentCommentsOperations
2728
from .. import models
@@ -30,8 +31,6 @@
3031
class SecurityInsights(object):
3132
"""API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider.
3233
33-
:ivar operations: Operations operations
34-
:vartype operations: azure.mgmt.securityinsight.aio.operations.Operations
3534
:ivar alert_rules: AlertRulesOperations operations
3635
:vartype alert_rules: azure.mgmt.securityinsight.aio.operations.AlertRulesOperations
3736
:ivar actions: ActionsOperations operations
@@ -42,6 +41,8 @@ class SecurityInsights(object):
4241
:vartype bookmarks: azure.mgmt.securityinsight.aio.operations.BookmarksOperations
4342
:ivar data_connectors: DataConnectorsOperations operations
4443
:vartype data_connectors: azure.mgmt.securityinsight.aio.operations.DataConnectorsOperations
44+
:ivar operations: Operations operations
45+
:vartype operations: azure.mgmt.securityinsight.aio.operations.Operations
4546
:ivar incidents: IncidentsOperations operations
4647
:vartype incidents: azure.mgmt.securityinsight.aio.operations.IncidentsOperations
4748
:ivar incident_comments: IncidentCommentsOperations operations
@@ -67,10 +68,9 @@ def __init__(
6768

6869
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
6970
self._serialize = Serializer(client_models)
71+
self._serialize.client_side_validation = False
7072
self._deserialize = Deserializer(client_models)
7173

72-
self.operations = Operations(
73-
self._client, self._config, self._serialize, self._deserialize)
7474
self.alert_rules = AlertRulesOperations(
7575
self._client, self._config, self._serialize, self._deserialize)
7676
self.actions = ActionsOperations(
@@ -81,11 +81,30 @@ def __init__(
8181
self._client, self._config, self._serialize, self._deserialize)
8282
self.data_connectors = DataConnectorsOperations(
8383
self._client, self._config, self._serialize, self._deserialize)
84+
self.operations = Operations(
85+
self._client, self._config, self._serialize, self._deserialize)
8486
self.incidents = IncidentsOperations(
8587
self._client, self._config, self._serialize, self._deserialize)
8688
self.incident_comments = IncidentCommentsOperations(
8789
self._client, self._config, self._serialize, self._deserialize)
8890

91+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
92+
"""Runs the network request through the client's chained policies.
93+
94+
:param http_request: The network request you want to make. Required.
95+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
96+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
97+
:return: The response of your network call. Does not do error handling on your response.
98+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
99+
"""
100+
path_format_arguments = {
101+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'),
102+
}
103+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
104+
stream = kwargs.pop("stream", True)
105+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
106+
return pipeline_response.http_response
107+
89108
async def close(self) -> None:
90109
await self._client.close()
91110

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

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

9-
from ._operations import Operations
109
from ._alert_rules_operations import AlertRulesOperations
1110
from ._actions_operations import ActionsOperations
1211
from ._alert_rule_templates_operations import AlertRuleTemplatesOperations
1312
from ._bookmarks_operations import BookmarksOperations
1413
from ._data_connectors_operations import DataConnectorsOperations
14+
from ._operations import Operations
1515
from ._incidents_operations import IncidentsOperations
1616
from ._incident_comments_operations import IncidentCommentsOperations
1717

1818
__all__ = [
19-
'Operations',
2019
'AlertRulesOperations',
2120
'ActionsOperations',
2221
'AlertRuleTemplatesOperations',
2322
'BookmarksOperations',
2423
'DataConnectorsOperations',
24+
'Operations',
2525
'IncidentsOperations',
2626
'IncidentCommentsOperations',
2727
]

0 commit comments

Comments
 (0)