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,32 @@
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
+ from ._version import VERSION
17
+
18
+ __version__ = VERSION
19
+
20
+ try:
21
+ from ._patch import __all__ as _patch_all
22
+ from ._patch import *
23
+ except ImportError:
24
+ _patch_all = []
25
+ from ._patch import patch_sdk as _patch_sdk
26
+
27
+ __all__ = [
28
+ "TrafficCollectorMgmtClient",
29
+ ]
30
+ __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
31
+
32
+ _patch_sdk()
@@ -0,0 +1,172 @@
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, Optional, TYPE_CHECKING, cast
12
+
13
+ from azure.core.pipeline import policies
14
+ from azure.core.rest import HttpRequest, HttpResponse
15
+ from azure.core.settings import settings
16
+ from azure.mgmt.core import ARMPipelineClient
17
+ from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18
+ from azure.mgmt.core.tools import get_arm_endpoints
19
+
20
+ from ._configuration import TrafficCollectorMgmtClientConfiguration
21
+ from ._utils.serialization import Deserializer, Serializer
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 import TokenCredential
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.operations.AzureTrafficCollectorsOperations
46
+ :ivar collector_policies: CollectorPoliciesOperations operations
47
+ :vartype collector_policies: azure.mgmt.networkfunction.operations.CollectorPoliciesOperations
48
+ :ivar network_function: NetworkFunctionOperations operations
49
+ :vartype network_function: azure.mgmt.networkfunction.operations.NetworkFunctionOperations
50
+ :ivar azure_traffic_collectors_by_resource_group:
51
+ AzureTrafficCollectorsByResourceGroupOperations operations
52
+ :vartype azure_traffic_collectors_by_resource_group:
53
+ azure.mgmt.networkfunction.operations.AzureTrafficCollectorsByResourceGroupOperations
54
+ :ivar azure_traffic_collectors_by_subscription: AzureTrafficCollectorsBySubscriptionOperations
55
+ operations
56
+ :vartype azure_traffic_collectors_by_subscription:
57
+ azure.mgmt.networkfunction.operations.AzureTrafficCollectorsBySubscriptionOperations
58
+ :param credential: Credential used to authenticate requests to the service. Required.
59
+ :type credential: ~azure.core.credentials.TokenCredential
60
+ :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
61
+ :type subscription_id: str
62
+ :param base_url: Service host. Default value is None.
63
+ :type base_url: str
64
+ :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
65
+ None.
66
+ :paramtype cloud_setting: ~azure.core.AzureClouds
67
+ :keyword api_version: The API version to use for this operation. Known values are "2022-11-01"
68
+ and None. Default value is None. If not set, the operation's default API version will be used.
69
+ Note that overriding this default value may result in unsupported behavior.
70
+ :paramtype api_version: str
71
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
72
+ Retry-After header is present.
73
+ """
74
+
75
+ def __init__(
76
+ self,
77
+ credential: "TokenCredential",
78
+ subscription_id: str,
79
+ base_url: Optional[str] = None,
80
+ *,
81
+ cloud_setting: Optional["AzureClouds"] = None,
82
+ **kwargs: Any
83
+ ) -> None:
84
+ _endpoint = "{endpoint}"
85
+ _cloud = cloud_setting or settings.current.azure_cloud # type: ignore
86
+ _endpoints = get_arm_endpoints(_cloud)
87
+ if not base_url:
88
+ base_url = _endpoints["resource_manager"]
89
+ credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
90
+ self._config = TrafficCollectorMgmtClientConfiguration(
91
+ credential=credential,
92
+ subscription_id=subscription_id,
93
+ base_url=cast(str, base_url),
94
+ cloud_setting=cloud_setting,
95
+ credential_scopes=credential_scopes,
96
+ **kwargs
97
+ )
98
+
99
+ _policies = kwargs.pop("policies", None)
100
+ if _policies is None:
101
+ _policies = [
102
+ policies.RequestIdPolicy(**kwargs),
103
+ self._config.headers_policy,
104
+ self._config.user_agent_policy,
105
+ self._config.proxy_policy,
106
+ policies.ContentDecodePolicy(**kwargs),
107
+ ARMAutoResourceProviderRegistrationPolicy(),
108
+ self._config.redirect_policy,
109
+ self._config.retry_policy,
110
+ self._config.authentication_policy,
111
+ self._config.custom_hook_policy,
112
+ self._config.logging_policy,
113
+ policies.DistributedTracingPolicy(**kwargs),
114
+ policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
115
+ self._config.http_logging_policy,
116
+ ]
117
+ self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
118
+
119
+ self._serialize = Serializer()
120
+ self._deserialize = Deserializer()
121
+ self._serialize.client_side_validation = False
122
+ self.azure_traffic_collectors = AzureTrafficCollectorsOperations(
123
+ self._client, self._config, self._serialize, self._deserialize
124
+ )
125
+ self.collector_policies = CollectorPoliciesOperations(
126
+ self._client, self._config, self._serialize, self._deserialize
127
+ )
128
+ self.network_function = NetworkFunctionOperations(
129
+ self._client, self._config, self._serialize, self._deserialize
130
+ )
131
+ self.azure_traffic_collectors_by_resource_group = AzureTrafficCollectorsByResourceGroupOperations(
132
+ self._client, self._config, self._serialize, self._deserialize
133
+ )
134
+ self.azure_traffic_collectors_by_subscription = AzureTrafficCollectorsBySubscriptionOperations(
135
+ self._client, self._config, self._serialize, self._deserialize
136
+ )
137
+
138
+ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
139
+ """Runs the network request through the client's chained policies.
140
+
141
+ >>> from azure.core.rest import HttpRequest
142
+ >>> request = HttpRequest("GET", "https://www.example.org/")
143
+ <HttpRequest [GET], url: 'https://www.example.org/'>
144
+ >>> response = client.send_request(request)
145
+ <HttpResponse: 200 OK>
146
+
147
+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
148
+
149
+ :param request: The network request you want to make. Required.
150
+ :type request: ~azure.core.rest.HttpRequest
151
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
152
+ :return: The response of your network call. Does not do error handling on your response.
153
+ :rtype: ~azure.core.rest.HttpResponse
154
+ """
155
+
156
+ request_copy = deepcopy(request)
157
+ path_format_arguments = {
158
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
159
+ }
160
+
161
+ request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
162
+ return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
163
+
164
+ def close(self) -> None:
165
+ self._client.close()
166
+
167
+ def __enter__(self) -> Self:
168
+ self._client.__enter__()
169
+ return self
170
+
171
+ def __exit__(self, *exc_details: Any) -> None:
172
+ self._client.__exit__(*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 ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
13
+
14
+ from ._version import VERSION
15
+
16
+ if TYPE_CHECKING:
17
+ from azure.core import AzureClouds
18
+ from azure.core.credentials import TokenCredential
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.TokenCredential
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: "TokenCredential",
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.RedirectPolicy(**kwargs)
75
+ self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
76
+ self.authentication_policy = kwargs.get("authentication_policy")
77
+ if self.credential and not self.authentication_policy:
78
+ self.authentication_policy = ARMChallengeAuthenticationPolicy(
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,6 @@
1
+ # --------------------------------------------------------------------------
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+ # Code generated by Microsoft (R) Python Code Generator.
5
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
+ # --------------------------------------------------------------------------