azure-mgmt-networkfunction 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. azure/mgmt/networkfunction/__init__.py +32 -0
  2. azure/mgmt/networkfunction/_client.py +172 -0
  3. azure/mgmt/networkfunction/_configuration.py +80 -0
  4. azure/mgmt/networkfunction/_patch.py +21 -0
  5. azure/mgmt/networkfunction/_utils/__init__.py +6 -0
  6. azure/mgmt/networkfunction/_utils/model_base.py +1770 -0
  7. azure/mgmt/networkfunction/_utils/serialization.py +2175 -0
  8. azure/mgmt/networkfunction/_version.py +9 -0
  9. azure/mgmt/networkfunction/aio/__init__.py +29 -0
  10. azure/mgmt/networkfunction/aio/_client.py +177 -0
  11. azure/mgmt/networkfunction/aio/_configuration.py +80 -0
  12. azure/mgmt/networkfunction/aio/_patch.py +21 -0
  13. azure/mgmt/networkfunction/aio/operations/__init__.py +33 -0
  14. azure/mgmt/networkfunction/aio/operations/_operations.py +1780 -0
  15. azure/mgmt/networkfunction/aio/operations/_patch.py +21 -0
  16. azure/mgmt/networkfunction/models/__init__.py +74 -0
  17. azure/mgmt/networkfunction/models/_enums.py +64 -0
  18. azure/mgmt/networkfunction/models/_models.py +718 -0
  19. azure/mgmt/networkfunction/models/_patch.py +21 -0
  20. azure/mgmt/networkfunction/operations/__init__.py +33 -0
  21. azure/mgmt/networkfunction/operations/_operations.py +2123 -0
  22. azure/mgmt/networkfunction/operations/_patch.py +21 -0
  23. azure/mgmt/networkfunction/py.typed +1 -0
  24. azure_mgmt_networkfunction-1.0.0.dist-info/METADATA +126 -0
  25. azure_mgmt_networkfunction-1.0.0.dist-info/RECORD +28 -0
  26. azure_mgmt_networkfunction-1.0.0.dist-info/WHEEL +5 -0
  27. azure_mgmt_networkfunction-1.0.0.dist-info/licenses/LICENSE +21 -0
  28. azure_mgmt_networkfunction-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,9 @@
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 license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+
9
+ VERSION = "1.0.0"
@@ -0,0 +1,29 @@
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 license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+ # pylint: disable=wrong-import-position
9
+
10
+ from typing import TYPE_CHECKING
11
+
12
+ if TYPE_CHECKING:
13
+ from ._patch import * # pylint: disable=unused-wildcard-import
14
+
15
+ from ._client import TrafficCollectorMgmtClient # type: ignore
16
+
17
+ try:
18
+ from ._patch import __all__ as _patch_all
19
+ from ._patch import *
20
+ except ImportError:
21
+ _patch_all = []
22
+ from ._patch import patch_sdk as _patch_sdk
23
+
24
+ __all__ = [
25
+ "TrafficCollectorMgmtClient",
26
+ ]
27
+ __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
28
+
29
+ _patch_sdk()
@@ -0,0 +1,177 @@
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 license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+
9
+ from copy import deepcopy
10
+ import sys
11
+ from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast
12
+
13
+ from azure.core.pipeline import policies
14
+ from azure.core.rest import AsyncHttpResponse, HttpRequest
15
+ from azure.core.settings import settings
16
+ from azure.mgmt.core import AsyncARMPipelineClient
17
+ from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy
18
+ from azure.mgmt.core.tools import get_arm_endpoints
19
+
20
+ from .._utils.serialization import Deserializer, Serializer
21
+ from ._configuration import TrafficCollectorMgmtClientConfiguration
22
+ from .operations import (
23
+ AzureTrafficCollectorsByResourceGroupOperations,
24
+ AzureTrafficCollectorsBySubscriptionOperations,
25
+ AzureTrafficCollectorsOperations,
26
+ CollectorPoliciesOperations,
27
+ NetworkFunctionOperations,
28
+ )
29
+
30
+ if sys.version_info >= (3, 11):
31
+ from typing import Self
32
+ else:
33
+ from typing_extensions import Self # type: ignore
34
+
35
+ if TYPE_CHECKING:
36
+ from azure.core import AzureClouds
37
+ from azure.core.credentials_async import AsyncTokenCredential
38
+
39
+
40
+ class TrafficCollectorMgmtClient:
41
+ """Azure Traffic Collector service.
42
+
43
+ :ivar azure_traffic_collectors: AzureTrafficCollectorsOperations operations
44
+ :vartype azure_traffic_collectors:
45
+ azure.mgmt.networkfunction.aio.operations.AzureTrafficCollectorsOperations
46
+ :ivar collector_policies: CollectorPoliciesOperations operations
47
+ :vartype collector_policies:
48
+ azure.mgmt.networkfunction.aio.operations.CollectorPoliciesOperations
49
+ :ivar network_function: NetworkFunctionOperations operations
50
+ :vartype network_function: azure.mgmt.networkfunction.aio.operations.NetworkFunctionOperations
51
+ :ivar azure_traffic_collectors_by_resource_group:
52
+ AzureTrafficCollectorsByResourceGroupOperations operations
53
+ :vartype azure_traffic_collectors_by_resource_group:
54
+ azure.mgmt.networkfunction.aio.operations.AzureTrafficCollectorsByResourceGroupOperations
55
+ :ivar azure_traffic_collectors_by_subscription: AzureTrafficCollectorsBySubscriptionOperations
56
+ operations
57
+ :vartype azure_traffic_collectors_by_subscription:
58
+ azure.mgmt.networkfunction.aio.operations.AzureTrafficCollectorsBySubscriptionOperations
59
+ :param credential: Credential used to authenticate requests to the service. Required.
60
+ :type credential: ~azure.core.credentials_async.AsyncTokenCredential
61
+ :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
62
+ :type subscription_id: str
63
+ :param base_url: Service host. Default value is None.
64
+ :type base_url: str
65
+ :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
66
+ None.
67
+ :paramtype cloud_setting: ~azure.core.AzureClouds
68
+ :keyword api_version: The API version to use for this operation. Known values are "2022-11-01"
69
+ and None. Default value is None. If not set, the operation's default API version will be used.
70
+ Note that overriding this default value may result in unsupported behavior.
71
+ :paramtype api_version: str
72
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
73
+ Retry-After header is present.
74
+ """
75
+
76
+ def __init__(
77
+ self,
78
+ credential: "AsyncTokenCredential",
79
+ subscription_id: str,
80
+ base_url: Optional[str] = None,
81
+ *,
82
+ cloud_setting: Optional["AzureClouds"] = None,
83
+ **kwargs: Any
84
+ ) -> None:
85
+ _endpoint = "{endpoint}"
86
+ _cloud = cloud_setting or settings.current.azure_cloud # type: ignore
87
+ _endpoints = get_arm_endpoints(_cloud)
88
+ if not base_url:
89
+ base_url = _endpoints["resource_manager"]
90
+ credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
91
+ self._config = TrafficCollectorMgmtClientConfiguration(
92
+ credential=credential,
93
+ subscription_id=subscription_id,
94
+ base_url=cast(str, base_url),
95
+ cloud_setting=cloud_setting,
96
+ credential_scopes=credential_scopes,
97
+ **kwargs
98
+ )
99
+
100
+ _policies = kwargs.pop("policies", None)
101
+ if _policies is None:
102
+ _policies = [
103
+ policies.RequestIdPolicy(**kwargs),
104
+ self._config.headers_policy,
105
+ self._config.user_agent_policy,
106
+ self._config.proxy_policy,
107
+ policies.ContentDecodePolicy(**kwargs),
108
+ AsyncARMAutoResourceProviderRegistrationPolicy(),
109
+ self._config.redirect_policy,
110
+ self._config.retry_policy,
111
+ self._config.authentication_policy,
112
+ self._config.custom_hook_policy,
113
+ self._config.logging_policy,
114
+ policies.DistributedTracingPolicy(**kwargs),
115
+ policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
116
+ self._config.http_logging_policy,
117
+ ]
118
+ self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(
119
+ base_url=cast(str, _endpoint), policies=_policies, **kwargs
120
+ )
121
+
122
+ self._serialize = Serializer()
123
+ self._deserialize = Deserializer()
124
+ self._serialize.client_side_validation = False
125
+ self.azure_traffic_collectors = AzureTrafficCollectorsOperations(
126
+ self._client, self._config, self._serialize, self._deserialize
127
+ )
128
+ self.collector_policies = CollectorPoliciesOperations(
129
+ self._client, self._config, self._serialize, self._deserialize
130
+ )
131
+ self.network_function = NetworkFunctionOperations(
132
+ self._client, self._config, self._serialize, self._deserialize
133
+ )
134
+ self.azure_traffic_collectors_by_resource_group = AzureTrafficCollectorsByResourceGroupOperations(
135
+ self._client, self._config, self._serialize, self._deserialize
136
+ )
137
+ self.azure_traffic_collectors_by_subscription = AzureTrafficCollectorsBySubscriptionOperations(
138
+ self._client, self._config, self._serialize, self._deserialize
139
+ )
140
+
141
+ def send_request(
142
+ self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
143
+ ) -> Awaitable[AsyncHttpResponse]:
144
+ """Runs the network request through the client's chained policies.
145
+
146
+ >>> from azure.core.rest import HttpRequest
147
+ >>> request = HttpRequest("GET", "https://www.example.org/")
148
+ <HttpRequest [GET], url: 'https://www.example.org/'>
149
+ >>> response = await client.send_request(request)
150
+ <AsyncHttpResponse: 200 OK>
151
+
152
+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
153
+
154
+ :param request: The network request you want to make. Required.
155
+ :type request: ~azure.core.rest.HttpRequest
156
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
157
+ :return: The response of your network call. Does not do error handling on your response.
158
+ :rtype: ~azure.core.rest.AsyncHttpResponse
159
+ """
160
+
161
+ request_copy = deepcopy(request)
162
+ path_format_arguments = {
163
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
164
+ }
165
+
166
+ request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
167
+ return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
168
+
169
+ async def close(self) -> None:
170
+ await self._client.close()
171
+
172
+ async def __aenter__(self) -> Self:
173
+ await self._client.__aenter__()
174
+ return self
175
+
176
+ async def __aexit__(self, *exc_details: Any) -> None:
177
+ await self._client.__aexit__(*exc_details)
@@ -0,0 +1,80 @@
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 license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+
9
+ from typing import Any, Optional, TYPE_CHECKING
10
+
11
+ from azure.core.pipeline import policies
12
+ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy
13
+
14
+ from .._version import VERSION
15
+
16
+ if TYPE_CHECKING:
17
+ from azure.core import AzureClouds
18
+ from azure.core.credentials_async import AsyncTokenCredential
19
+
20
+
21
+ class TrafficCollectorMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
22
+ """Configuration for TrafficCollectorMgmtClient.
23
+
24
+ Note that all parameters used to create this instance are saved as instance
25
+ attributes.
26
+
27
+ :param credential: Credential used to authenticate requests to the service. Required.
28
+ :type credential: ~azure.core.credentials_async.AsyncTokenCredential
29
+ :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
30
+ :type subscription_id: str
31
+ :param base_url: Service host. Default value is "https://management.azure.com".
32
+ :type base_url: str
33
+ :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
34
+ None.
35
+ :type cloud_setting: ~azure.core.AzureClouds
36
+ :keyword api_version: The API version to use for this operation. Known values are "2022-11-01"
37
+ and None. Default value is None. If not set, the operation's default API version will be used.
38
+ Note that overriding this default value may result in unsupported behavior.
39
+ :paramtype api_version: str
40
+ """
41
+
42
+ def __init__(
43
+ self,
44
+ credential: "AsyncTokenCredential",
45
+ subscription_id: str,
46
+ base_url: str = "https://management.azure.com",
47
+ cloud_setting: Optional["AzureClouds"] = None,
48
+ **kwargs: Any
49
+ ) -> None:
50
+ api_version: str = kwargs.pop("api_version", "2022-11-01")
51
+
52
+ if credential is None:
53
+ raise ValueError("Parameter 'credential' must not be None.")
54
+ if subscription_id is None:
55
+ raise ValueError("Parameter 'subscription_id' must not be None.")
56
+
57
+ self.credential = credential
58
+ self.subscription_id = subscription_id
59
+ self.base_url = base_url
60
+ self.cloud_setting = cloud_setting
61
+ self.api_version = api_version
62
+ self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
63
+ kwargs.setdefault("sdk_moniker", "mgmt-networkfunction/{}".format(VERSION))
64
+ self.polling_interval = kwargs.get("polling_interval", 30)
65
+ self._configure(**kwargs)
66
+
67
+ def _configure(self, **kwargs: Any) -> None:
68
+ self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
69
+ self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
70
+ self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
71
+ self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
72
+ self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
73
+ self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
74
+ self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs)
75
+ self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs)
76
+ self.authentication_policy = kwargs.get("authentication_policy")
77
+ if self.credential and not self.authentication_policy:
78
+ self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(
79
+ self.credential, *self.credential_scopes, **kwargs
80
+ )
@@ -0,0 +1,21 @@
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 license information.
5
+ # --------------------------------------------------------------------------
6
+ """Customize generated code here.
7
+
8
+ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
9
+ """
10
+
11
+
12
+ __all__: list[str] = [] # Add all objects you want publicly available to users at this package level
13
+
14
+
15
+ def patch_sdk():
16
+ """Do not remove from this file.
17
+
18
+ `patch_sdk` is a last resort escape hatch that allows you to do customizations
19
+ you can't accomplish using the techniques described in
20
+ https://aka.ms/azsdk/python/dpcodegen/python/customize
21
+ """
@@ -0,0 +1,33 @@
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 license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+ # pylint: disable=wrong-import-position
9
+
10
+ from typing import TYPE_CHECKING
11
+
12
+ if TYPE_CHECKING:
13
+ from ._patch import * # pylint: disable=unused-wildcard-import
14
+
15
+ from ._operations import AzureTrafficCollectorsOperations # type: ignore
16
+ from ._operations import CollectorPoliciesOperations # type: ignore
17
+ from ._operations import NetworkFunctionOperations # type: ignore
18
+ from ._operations import AzureTrafficCollectorsByResourceGroupOperations # type: ignore
19
+ from ._operations import AzureTrafficCollectorsBySubscriptionOperations # type: ignore
20
+
21
+ from ._patch import __all__ as _patch_all
22
+ from ._patch import *
23
+ from ._patch import patch_sdk as _patch_sdk
24
+
25
+ __all__ = [
26
+ "AzureTrafficCollectorsOperations",
27
+ "CollectorPoliciesOperations",
28
+ "NetworkFunctionOperations",
29
+ "AzureTrafficCollectorsByResourceGroupOperations",
30
+ "AzureTrafficCollectorsBySubscriptionOperations",
31
+ ]
32
+ __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
33
+ _patch_sdk()