Skip to content

Commit 21b1d38

Browse files
author
SDKAuto
committed
CodeGen from PR 23644 in Azure/azure-rest-api-specs
Merge f81a2ba1a26a2b2f15ef0b207e7a7253239e54c9 into e60df62e9e0d88462e6abba81a76d94eab000f0d
1 parent d6fa6e3 commit 21b1d38

File tree

67 files changed

+1437
-142
lines changed

Some content is hidden

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

67 files changed

+1437
-142
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "a3974594e96506c6fa921be80f349d67b555e534",
2+
"commit": "23b458216502a081e883d591843080a247996fe8",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/[email protected].7",
6+
"@autorest/[email protected].8",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/security/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected].7 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/security/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].8 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/security/resource-manager/readme.md"
1111
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from ._serialization import Serializer, Deserializer
12+
from typing import Any, IO, Optional, Union
13+
14+
from . import models as _models
15+
16+
17+
class SecurityCenterOperationsMixin(object):
18+
19+
def get_sensitivity_settings(
20+
self,
21+
**kwargs: Any
22+
) -> _models.GetSensitivitySettingsResponse:
23+
"""Gets data sensitivity settings for sensitive data discovery.
24+
25+
:keyword callable cls: A custom type or function that will be passed the direct response
26+
:return: GetSensitivitySettingsResponse or the result of cls(response)
27+
:rtype: ~azure.mgmt.security.v2023_02_01_preview.models.GetSensitivitySettingsResponse
28+
:raises ~azure.core.exceptions.HttpResponseError:
29+
"""
30+
api_version = self._get_api_version('get_sensitivity_settings')
31+
if api_version == '2023-02-01-preview':
32+
from .v2023_02_01_preview.operations import SecurityCenterOperationsMixin as OperationClass
33+
else:
34+
raise ValueError("API version {} does not have operation 'get_sensitivity_settings'".format(api_version))
35+
mixin_instance = OperationClass()
36+
mixin_instance._client = self._client
37+
mixin_instance._config = self._config
38+
mixin_instance._config.api_version = api_version
39+
mixin_instance._serialize = Serializer(self._models_dict(api_version))
40+
mixin_instance._serialize.client_side_validation = False
41+
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
42+
return mixin_instance.get_sensitivity_settings(**kwargs)
43+
44+
def update_sensitivity_settings(
45+
self,
46+
sensitivity_settings: Union[_models.UpdateSensitivitySettingsRequest, IO],
47+
**kwargs: Any
48+
) -> _models.GetSensitivitySettingsResponse:
49+
"""Updates data sensitivity settings for sensitive data discovery.
50+
51+
:param sensitivity_settings: The data sensitivity settings to update. Is either a
52+
UpdateSensitivitySettingsRequest type or a IO type. Required.
53+
:type sensitivity_settings:
54+
~azure.mgmt.security.v2023_02_01_preview.models.UpdateSensitivitySettingsRequest or IO
55+
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
56+
Default value is None.
57+
:paramtype content_type: str
58+
:keyword callable cls: A custom type or function that will be passed the direct response
59+
:return: GetSensitivitySettingsResponse or the result of cls(response)
60+
:rtype: ~azure.mgmt.security.v2023_02_01_preview.models.GetSensitivitySettingsResponse
61+
:raises ~azure.core.exceptions.HttpResponseError:
62+
"""
63+
api_version = self._get_api_version('update_sensitivity_settings')
64+
if api_version == '2023-02-01-preview':
65+
from .v2023_02_01_preview.operations import SecurityCenterOperationsMixin as OperationClass
66+
else:
67+
raise ValueError("API version {} does not have operation 'update_sensitivity_settings'".format(api_version))
68+
mixin_instance = OperationClass()
69+
mixin_instance._client = self._client
70+
mixin_instance._config = self._config
71+
mixin_instance._config.api_version = api_version
72+
mixin_instance._serialize = Serializer(self._models_dict(api_version))
73+
mixin_instance._serialize.client_side_validation = False
74+
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
75+
return mixin_instance.update_sensitivity_settings(sensitivity_settings, **kwargs)

sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, *args, **kwargs):
2929
"""
3030
pass
3131

32-
class SecurityCenter(MultiApiClientMixin, _SDKClient):
32+
class SecurityCenter(SecurityCenterOperationsMixin, MultiApiClientMixin, _SDKClient):
3333
"""API spec for Microsoft.Security (Azure Security Center) resource provider.
3434
3535
This ready contains multiple API versions, to help you deal with all of the Azure clouds
@@ -996,6 +996,20 @@ def security_solutions_reference_data(self):
996996
self._config.api_version = api_version
997997
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
998998

999+
@property
1000+
def sensitivity_settings(self):
1001+
"""Instance depends on the API version:
1002+
1003+
* 2023-02-01-preview: :class:`SensitivitySettingsOperations<azure.mgmt.security.v2023_02_01_preview.operations.SensitivitySettingsOperations>`
1004+
"""
1005+
api_version = self._get_api_version('sensitivity_settings')
1006+
if api_version == '2023-02-01-preview':
1007+
from .v2023_02_01_preview.operations import SensitivitySettingsOperations as OperationClass
1008+
else:
1009+
raise ValueError("API version {} does not have operation group 'sensitivity_settings'".format(api_version))
1010+
self._config.api_version = api_version
1011+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
1012+
9991013
@property
10001014
def server_vulnerability_assessment(self):
10011015
"""Instance depends on the API version:

sdk/security/azure-mgmt-security/azure/mgmt/security/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "5.0.0"
8+
VERSION = "0.1.0"
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from .._serialization import Serializer, Deserializer
12+
from typing import Any, IO, Optional, Union
13+
14+
from .. import models as _models
15+
16+
17+
class SecurityCenterOperationsMixin(object):
18+
19+
async def get_sensitivity_settings(
20+
self,
21+
**kwargs: Any
22+
) -> _models.GetSensitivitySettingsResponse:
23+
"""Gets data sensitivity settings for sensitive data discovery.
24+
25+
:keyword callable cls: A custom type or function that will be passed the direct response
26+
:return: GetSensitivitySettingsResponse or the result of cls(response)
27+
:rtype: ~azure.mgmt.security.v2023_02_01_preview.models.GetSensitivitySettingsResponse
28+
:raises ~azure.core.exceptions.HttpResponseError:
29+
"""
30+
api_version = self._get_api_version('get_sensitivity_settings')
31+
if api_version == '2023-02-01-preview':
32+
from ..v2023_02_01_preview.aio.operations import SecurityCenterOperationsMixin as OperationClass
33+
else:
34+
raise ValueError("API version {} does not have operation 'get_sensitivity_settings'".format(api_version))
35+
mixin_instance = OperationClass()
36+
mixin_instance._client = self._client
37+
mixin_instance._config = self._config
38+
mixin_instance._config.api_version = api_version
39+
mixin_instance._serialize = Serializer(self._models_dict(api_version))
40+
mixin_instance._serialize.client_side_validation = False
41+
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
42+
return await mixin_instance.get_sensitivity_settings(**kwargs)
43+
44+
async def update_sensitivity_settings(
45+
self,
46+
sensitivity_settings: Union[_models.UpdateSensitivitySettingsRequest, IO],
47+
**kwargs: Any
48+
) -> _models.GetSensitivitySettingsResponse:
49+
"""Updates data sensitivity settings for sensitive data discovery.
50+
51+
:param sensitivity_settings: The data sensitivity settings to update. Is either a
52+
UpdateSensitivitySettingsRequest type or a IO type. Required.
53+
:type sensitivity_settings:
54+
~azure.mgmt.security.v2023_02_01_preview.models.UpdateSensitivitySettingsRequest or IO
55+
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
56+
Default value is None.
57+
:paramtype content_type: str
58+
:keyword callable cls: A custom type or function that will be passed the direct response
59+
:return: GetSensitivitySettingsResponse or the result of cls(response)
60+
:rtype: ~azure.mgmt.security.v2023_02_01_preview.models.GetSensitivitySettingsResponse
61+
:raises ~azure.core.exceptions.HttpResponseError:
62+
"""
63+
api_version = self._get_api_version('update_sensitivity_settings')
64+
if api_version == '2023-02-01-preview':
65+
from ..v2023_02_01_preview.aio.operations import SecurityCenterOperationsMixin as OperationClass
66+
else:
67+
raise ValueError("API version {} does not have operation 'update_sensitivity_settings'".format(api_version))
68+
mixin_instance = OperationClass()
69+
mixin_instance._client = self._client
70+
mixin_instance._config = self._config
71+
mixin_instance._config.api_version = api_version
72+
mixin_instance._serialize = Serializer(self._models_dict(api_version))
73+
mixin_instance._serialize.client_side_validation = False
74+
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
75+
return await mixin_instance.update_sensitivity_settings(sensitivity_settings, **kwargs)

sdk/security/azure-mgmt-security/azure/mgmt/security/aio/_security_center.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, *args, **kwargs):
2929
"""
3030
pass
3131

32-
class SecurityCenter(MultiApiClientMixin, _SDKClient):
32+
class SecurityCenter(SecurityCenterOperationsMixin, MultiApiClientMixin, _SDKClient):
3333
"""API spec for Microsoft.Security (Azure Security Center) resource provider.
3434
3535
This ready contains multiple API versions, to help you deal with all of the Azure clouds
@@ -996,6 +996,20 @@ def security_solutions_reference_data(self):
996996
self._config.api_version = api_version
997997
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
998998

999+
@property
1000+
def sensitivity_settings(self):
1001+
"""Instance depends on the API version:
1002+
1003+
* 2023-02-01-preview: :class:`SensitivitySettingsOperations<azure.mgmt.security.v2023_02_01_preview.aio.operations.SensitivitySettingsOperations>`
1004+
"""
1005+
api_version = self._get_api_version('sensitivity_settings')
1006+
if api_version == '2023-02-01-preview':
1007+
from ..v2023_02_01_preview.aio.operations import SensitivitySettingsOperations as OperationClass
1008+
else:
1009+
raise ValueError("API version {} does not have operation group 'sensitivity_settings'".format(api_version))
1010+
self._config.api_version = api_version
1011+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
1012+
9991013
@property
10001014
def server_vulnerability_assessment(self):
10011015
"""Instance depends on the API version:

sdk/security/azure-mgmt-security/azure/mgmt/security/v2015_06_01_preview/_version.py

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

9-
VERSION = "5.0.0"
9+
VERSION = "1.0.0b1"

sdk/security/azure-mgmt-security/azure/mgmt/security/v2015_06_01_preview/operations/_tasks_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def build_list_by_home_region_request(
9797
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
9898

9999

100-
def build_get_subscription_level_task_request(
100+
def build_get_subscription_level_task_request( # pylint: disable=name-too-long
101101
asc_location: str, task_name: str, subscription_id: str, **kwargs: Any
102102
) -> HttpRequest:
103103
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -130,7 +130,7 @@ def build_get_subscription_level_task_request(
130130
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
131131

132132

133-
def build_update_subscription_level_task_state_request(
133+
def build_update_subscription_level_task_state_request( # pylint: disable=name-too-long
134134
asc_location: str,
135135
task_name: str,
136136
task_update_action_type: Union[str, _models.TaskUpdateActionType],
@@ -205,7 +205,7 @@ def build_list_by_resource_group_request(
205205
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
206206

207207

208-
def build_get_resource_group_level_task_request(
208+
def build_get_resource_group_level_task_request( # pylint: disable=name-too-long
209209
resource_group_name: str, asc_location: str, task_name: str, subscription_id: str, **kwargs: Any
210210
) -> HttpRequest:
211211
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -241,7 +241,7 @@ def build_get_resource_group_level_task_request(
241241
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
242242

243243

244-
def build_update_resource_group_level_task_state_request(
244+
def build_update_resource_group_level_task_state_request( # pylint: disable=name-too-long
245245
resource_group_name: str,
246246
asc_location: str,
247247
task_name: str,

sdk/security/azure-mgmt-security/azure/mgmt/security/v2017_08_01/_version.py

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

9-
VERSION = "5.0.0"
9+
VERSION = "1.0.0b1"

sdk/security/azure-mgmt-security/azure/mgmt/security/v2017_08_01_preview/_version.py

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

9-
VERSION = "5.0.0"
9+
VERSION = "1.0.0b1"

0 commit comments

Comments
 (0)