Skip to content

Commit b95a869

Browse files
author
SDKAuto
committed
CodeGen from PR 30820 in Azure/azure-rest-api-specs
Merge a921d8d9a1640a97adddbd2900688bbfa27465a6 into e605d439dda724fc2fc0274e0a82a3434a1524d7
1 parent d594ee8 commit b95a869

File tree

530 files changed

+70433
-27921
lines changed

Some content is hidden

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

530 files changed

+70433
-27921
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk
20-
2120
__all__ = [
22-
"SecurityInsights",
21+
'SecurityInsights',
2322
]
2423
__all__.extend([p for p in _patch_all if p not in __all__])
2524

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

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

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

12-
from azure.core.configuration import Configuration
1311
from azure.core.pipeline import policies
1412
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1513

1614
from ._version import VERSION
1715

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-
2316
if TYPE_CHECKING:
2417
# pylint: disable=unused-import,ungrouped-imports
2518
from azure.core.credentials import TokenCredential
2619

2720

28-
class SecurityInsightsConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
21+
class SecurityInsightsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2922
"""Configuration for SecurityInsights.
3023
3124
Note that all parameters used to create this instance are saved as instance
3225
attributes.
3326
3427
:param credential: Credential needed for the client to connect to Azure. Required.
3528
:type credential: ~azure.core.credentials.TokenCredential
36-
:param subscription_id: The ID of the target subscription. Required.
29+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3730
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2022-12-01-preview". Note that overriding
31+
:keyword api_version: Api Version. Default value is "2024-04-01-preview". Note that overriding
3932
this default value may result in unsupported behavior.
4033
:paramtype api_version: str
4134
"""
4235

43-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
44-
super(SecurityInsightsConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2022-12-01-preview"] = kwargs.pop("api_version", "2022-12-01-preview")
36+
def __init__(
37+
self,
38+
credential: "TokenCredential",
39+
subscription_id: str,
40+
**kwargs: Any
41+
) -> None:
42+
api_version: str = kwargs.pop('api_version', "2024-04-01-preview")
4643

4744
if credential is None:
4845
raise ValueError("Parameter 'credential' must not be None.")
@@ -52,21 +49,24 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5249
self.credential = credential
5350
self.subscription_id = subscription_id
5451
self.api_version = api_version
55-
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
56-
kwargs.setdefault("sdk_moniker", "mgmt-securityinsight/{}".format(VERSION))
52+
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
53+
kwargs.setdefault('sdk_moniker', 'mgmt-securityinsight/{}'.format(VERSION))
54+
self.polling_interval = kwargs.get("polling_interval", 30)
5755
self._configure(**kwargs)
5856

59-
def _configure(self, **kwargs: Any) -> None:
60-
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
61-
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
62-
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
63-
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
64-
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
65-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
66-
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
67-
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
68-
self.authentication_policy = kwargs.get("authentication_policy")
57+
58+
def _configure(
59+
self,
60+
**kwargs: Any
61+
) -> None:
62+
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
63+
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
64+
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
65+
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
66+
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
67+
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
68+
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
69+
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
70+
self.authentication_policy = kwargs.get('authentication_policy')
6971
if self.credential and not self.authentication_policy:
70-
self.authentication_policy = ARMChallengeAuthenticationPolicy(
71-
self.credential, *self.credential_scopes, **kwargs
72-
)
72+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

0 commit comments

Comments
 (0)