66# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77# --------------------------------------------------------------------------
88
9- from typing import TYPE_CHECKING
9+ from copy import deepcopy
10+ from typing import Any , Optional , TYPE_CHECKING
1011
12+ from azure .core .rest import HttpRequest , HttpResponse
1113from azure .mgmt .core import ARMPipelineClient
1214from msrest import Deserializer , Serializer
1315
16+ from . import models
17+ from ._configuration import CdnManagementClientConfiguration
18+ from .operations import AFDCustomDomainsOperations , AFDEndpointsOperations , AFDOriginGroupsOperations , AFDOriginsOperations , AFDProfilesOperations , CdnManagementClientOperationsMixin , CustomDomainsOperations , EdgeNodesOperations , EndpointsOperations , LogAnalyticsOperations , ManagedRuleSetsOperations , Operations , OriginGroupsOperations , OriginsOperations , PoliciesOperations , ProfilesOperations , ResourceUsageOperations , RoutesOperations , RuleSetsOperations , RulesOperations , SecretsOperations , SecurityPoliciesOperations , ValidateOperations
19+
1420if TYPE_CHECKING :
1521 # pylint: disable=unused-import,ungrouped-imports
16- from typing import Any , Optional
17-
1822 from azure .core .credentials import TokenCredential
1923
20- from ._configuration import CdnManagementClientConfiguration
21- from .operations import ProfilesOperations
22- from .operations import EndpointsOperations
23- from .operations import OriginsOperations
24- from .operations import OriginGroupsOperations
25- from .operations import CustomDomainsOperations
26- from .operations import CdnManagementClientOperationsMixin
27- from .operations import ResourceUsageOperations
28- from .operations import Operations
29- from .operations import EdgeNodesOperations
30- from .operations import AFDProfilesOperations
31- from .operations import AFDCustomDomainsOperations
32- from .operations import AFDEndpointsOperations
33- from .operations import AFDOriginGroupsOperations
34- from .operations import AFDOriginsOperations
35- from .operations import RoutesOperations
36- from .operations import RuleSetsOperations
37- from .operations import RulesOperations
38- from .operations import SecurityPoliciesOperations
39- from .operations import SecretsOperations
40- from .operations import ValidateOperations
41- from .operations import LogAnalyticsOperations
42- from .operations import PoliciesOperations
43- from .operations import ManagedRuleSetsOperations
44- from . import models
45-
46-
4724class CdnManagementClient (CdnManagementClientOperationsMixin ):
4825 """Cdn Management Client.
4926
50- :ivar profiles: ProfilesOperations operations
51- :vartype profiles: azure.mgmt.cdn.operations.ProfilesOperations
52- :ivar endpoints: EndpointsOperations operations
53- :vartype endpoints: azure.mgmt.cdn.operations.EndpointsOperations
54- :ivar origins: OriginsOperations operations
55- :vartype origins: azure.mgmt.cdn.operations.OriginsOperations
56- :ivar origin_groups: OriginGroupsOperations operations
57- :vartype origin_groups: azure.mgmt.cdn.operations.OriginGroupsOperations
58- :ivar custom_domains: CustomDomainsOperations operations
59- :vartype custom_domains: azure.mgmt.cdn.operations.CustomDomainsOperations
60- :ivar resource_usage: ResourceUsageOperations operations
61- :vartype resource_usage: azure.mgmt.cdn.operations.ResourceUsageOperations
62- :ivar operations: Operations operations
63- :vartype operations: azure.mgmt.cdn.operations.Operations
64- :ivar edge_nodes: EdgeNodesOperations operations
65- :vartype edge_nodes: azure.mgmt.cdn.operations.EdgeNodesOperations
6627 :ivar afd_profiles: AFDProfilesOperations operations
6728 :vartype afd_profiles: azure.mgmt.cdn.operations.AFDProfilesOperations
6829 :ivar afd_custom_domains: AFDCustomDomainsOperations operations
@@ -87,6 +48,22 @@ class CdnManagementClient(CdnManagementClientOperationsMixin):
8748 :vartype validate: azure.mgmt.cdn.operations.ValidateOperations
8849 :ivar log_analytics: LogAnalyticsOperations operations
8950 :vartype log_analytics: azure.mgmt.cdn.operations.LogAnalyticsOperations
51+ :ivar profiles: ProfilesOperations operations
52+ :vartype profiles: azure.mgmt.cdn.operations.ProfilesOperations
53+ :ivar endpoints: EndpointsOperations operations
54+ :vartype endpoints: azure.mgmt.cdn.operations.EndpointsOperations
55+ :ivar origins: OriginsOperations operations
56+ :vartype origins: azure.mgmt.cdn.operations.OriginsOperations
57+ :ivar origin_groups: OriginGroupsOperations operations
58+ :vartype origin_groups: azure.mgmt.cdn.operations.OriginGroupsOperations
59+ :ivar custom_domains: CustomDomainsOperations operations
60+ :vartype custom_domains: azure.mgmt.cdn.operations.CustomDomainsOperations
61+ :ivar resource_usage: ResourceUsageOperations operations
62+ :vartype resource_usage: azure.mgmt.cdn.operations.ResourceUsageOperations
63+ :ivar operations: Operations operations
64+ :vartype operations: azure.mgmt.cdn.operations.Operations
65+ :ivar edge_nodes: EdgeNodesOperations operations
66+ :vartype edge_nodes: azure.mgmt.cdn.operations.EdgeNodesOperations
9067 :ivar policies: PoliciesOperations operations
9168 :vartype policies: azure.mgmt.cdn.operations.PoliciesOperations
9269 :ivar managed_rule_sets: ManagedRuleSetsOperations operations
@@ -95,72 +72,75 @@ class CdnManagementClient(CdnManagementClientOperationsMixin):
9572 :type credential: ~azure.core.credentials.TokenCredential
9673 :param subscription_id: Azure Subscription ID.
9774 :type subscription_id: str
98- :param str base_url: Service URL
99- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
75+ :param base_url: Service URL. Default value is 'https://management.azure.com'.
76+ :type base_url: str
77+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
78+ Retry-After header is present.
10079 """
10180
10281 def __init__ (
10382 self ,
104- credential , # type: "TokenCredential"
105- subscription_id , # type: str
106- base_url = None , # type: Optional[str]
107- ** kwargs # type: Any
108- ):
109- # type: (...) -> None
110- if not base_url :
111- base_url = 'https://management.azure.com'
112- self ._config = CdnManagementClientConfiguration (credential , subscription_id , ** kwargs )
83+ credential : "TokenCredential" ,
84+ subscription_id : str ,
85+ base_url : str = "https://management.azure.com" ,
86+ ** kwargs : Any
87+ ) -> None :
88+ self ._config = CdnManagementClientConfiguration (credential = credential , subscription_id = subscription_id , ** kwargs )
11389 self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
11490
11591 client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
11692 self ._serialize = Serializer (client_models )
117- self ._serialize .client_side_validation = False
11893 self ._deserialize = Deserializer (client_models )
94+ self ._serialize .client_side_validation = False
95+ self .afd_profiles = AFDProfilesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
96+ self .afd_custom_domains = AFDCustomDomainsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
97+ self .afd_endpoints = AFDEndpointsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
98+ self .afd_origin_groups = AFDOriginGroupsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
99+ self .afd_origins = AFDOriginsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
100+ self .routes = RoutesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
101+ self .rule_sets = RuleSetsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
102+ self .rules = RulesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
103+ self .security_policies = SecurityPoliciesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
104+ self .secrets = SecretsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
105+ self .validate = ValidateOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
106+ self .log_analytics = LogAnalyticsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
107+ self .profiles = ProfilesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
108+ self .endpoints = EndpointsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
109+ self .origins = OriginsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
110+ self .origin_groups = OriginGroupsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
111+ self .custom_domains = CustomDomainsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
112+ self .resource_usage = ResourceUsageOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
113+ self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
114+ self .edge_nodes = EdgeNodesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
115+ self .policies = PoliciesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
116+ self .managed_rule_sets = ManagedRuleSetsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
117+
118+
119+ def _send_request (
120+ self ,
121+ request , # type: HttpRequest
122+ ** kwargs : Any
123+ ) -> HttpResponse :
124+ """Runs the network request through the client's chained policies.
125+
126+ >>> from azure.core.rest import HttpRequest
127+ >>> request = HttpRequest("GET", "https://www.example.org/")
128+ <HttpRequest [GET], url: 'https://www.example.org/'>
129+ >>> response = client._send_request(request)
130+ <HttpResponse: 200 OK>
131+
132+ For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
133+
134+ :param request: The network request you want to make. Required.
135+ :type request: ~azure.core.rest.HttpRequest
136+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
137+ :return: The response of your network call. Does not do error handling on your response.
138+ :rtype: ~azure.core.rest.HttpResponse
139+ """
119140
120- self .profiles = ProfilesOperations (
121- self ._client , self ._config , self ._serialize , self ._deserialize )
122- self .endpoints = EndpointsOperations (
123- self ._client , self ._config , self ._serialize , self ._deserialize )
124- self .origins = OriginsOperations (
125- self ._client , self ._config , self ._serialize , self ._deserialize )
126- self .origin_groups = OriginGroupsOperations (
127- self ._client , self ._config , self ._serialize , self ._deserialize )
128- self .custom_domains = CustomDomainsOperations (
129- self ._client , self ._config , self ._serialize , self ._deserialize )
130- self .resource_usage = ResourceUsageOperations (
131- self ._client , self ._config , self ._serialize , self ._deserialize )
132- self .operations = Operations (
133- self ._client , self ._config , self ._serialize , self ._deserialize )
134- self .edge_nodes = EdgeNodesOperations (
135- self ._client , self ._config , self ._serialize , self ._deserialize )
136- self .afd_profiles = AFDProfilesOperations (
137- self ._client , self ._config , self ._serialize , self ._deserialize )
138- self .afd_custom_domains = AFDCustomDomainsOperations (
139- self ._client , self ._config , self ._serialize , self ._deserialize )
140- self .afd_endpoints = AFDEndpointsOperations (
141- self ._client , self ._config , self ._serialize , self ._deserialize )
142- self .afd_origin_groups = AFDOriginGroupsOperations (
143- self ._client , self ._config , self ._serialize , self ._deserialize )
144- self .afd_origins = AFDOriginsOperations (
145- self ._client , self ._config , self ._serialize , self ._deserialize )
146- self .routes = RoutesOperations (
147- self ._client , self ._config , self ._serialize , self ._deserialize )
148- self .rule_sets = RuleSetsOperations (
149- self ._client , self ._config , self ._serialize , self ._deserialize )
150- self .rules = RulesOperations (
151- self ._client , self ._config , self ._serialize , self ._deserialize )
152- self .security_policies = SecurityPoliciesOperations (
153- self ._client , self ._config , self ._serialize , self ._deserialize )
154- self .secrets = SecretsOperations (
155- self ._client , self ._config , self ._serialize , self ._deserialize )
156- self .validate = ValidateOperations (
157- self ._client , self ._config , self ._serialize , self ._deserialize )
158- self .log_analytics = LogAnalyticsOperations (
159- self ._client , self ._config , self ._serialize , self ._deserialize )
160- self .policies = PoliciesOperations (
161- self ._client , self ._config , self ._serialize , self ._deserialize )
162- self .managed_rule_sets = ManagedRuleSetsOperations (
163- self ._client , self ._config , self ._serialize , self ._deserialize )
141+ request_copy = deepcopy (request )
142+ request_copy .url = self ._client .format_url (request_copy .url )
143+ return self ._client .send_request (request_copy , ** kwargs )
164144
165145 def close (self ):
166146 # type: () -> None
0 commit comments