Skip to content

Commit

Permalink
CodeGen from PR 16129 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Azure CDN] Add missing customHttpsParameters field in CustomDomainProperties for versions after 2019-06-15 (Azure#16129)

Co-authored-by: Bo Zhang <bzhan@microsoft.com>
  • Loading branch information
SDKAuto and Bo Zhang committed Oct 19, 2021
1 parent f8bbfa9 commit 400dc05
Show file tree
Hide file tree
Showing 56 changed files with 1,223 additions and 872 deletions.
1 change: 1 addition & 0 deletions sdk/cdn/azure-mgmt-cdn/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
11 changes: 11 additions & 0 deletions sdk/cdn/azure-mgmt-cdn/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "60fcb275cbce38d343f9c35411786e672aba154e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/cdn/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/cdn/resource-manager/readme.md"
}
19 changes: 19 additions & 0 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import CdnManagementClientConfiguration
from .operations import ProfilesOperations
Expand Down Expand Up @@ -162,6 +163,24 @@ def __init__(
self.managed_rule_sets = ManagedRuleSetsOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
Expand Down
130 changes: 89 additions & 41 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_metadata.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "11.0.0"
VERSION = "2.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

Expand Down Expand Up @@ -159,6 +160,23 @@ def __init__(
self.managed_rule_sets = ManagedRuleSetsOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def list_by_profile(
self,
resource_group_name: str,
profile_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.AFDDomainListResult"]:
"""Lists existing AzureFrontDoor domains.
Expand Down Expand Up @@ -107,7 +107,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize(_models.AfdErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

Expand All @@ -123,7 +123,7 @@ async def get(
resource_group_name: str,
profile_name: str,
custom_domain_name: str,
**kwargs
**kwargs: Any
) -> "_models.AFDDomain":
"""Gets an existing AzureFrontDoor domain with the specified domain name under the specified
subscription, resource group and profile.
Expand Down Expand Up @@ -171,7 +171,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('AFDDomain', pipeline_response)
Expand All @@ -188,7 +188,7 @@ async def _create_initial(
profile_name: str,
custom_domain_name: str,
custom_domain: "_models.AFDDomain",
**kwargs
**kwargs: Any
) -> "_models.AFDDomain":
cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDDomain"]
error_map = {
Expand Down Expand Up @@ -227,7 +227,7 @@ async def _create_initial(

if response.status_code not in [200, 201, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if response.status_code == 200:
Expand All @@ -251,7 +251,7 @@ async def begin_create(
profile_name: str,
custom_domain_name: str,
custom_domain: "_models.AFDDomain",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.AFDDomain"]:
"""Creates a new domain within the specified profile.
Expand All @@ -265,8 +265,8 @@ async def begin_create(
:type custom_domain: ~azure.mgmt.cdn.models.AFDDomain
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either AFDDomain or the result of cls(response)
Expand Down Expand Up @@ -327,7 +327,7 @@ async def _update_initial(
profile_name: str,
custom_domain_name: str,
custom_domain_update_properties: "_models.AFDDomainUpdateParameters",
**kwargs
**kwargs: Any
) -> "_models.AFDDomain":
cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDDomain"]
error_map = {
Expand Down Expand Up @@ -366,7 +366,7 @@ async def _update_initial(

if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if response.status_code == 200:
Expand All @@ -387,7 +387,7 @@ async def begin_update(
profile_name: str,
custom_domain_name: str,
custom_domain_update_properties: "_models.AFDDomainUpdateParameters",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.AFDDomain"]:
"""Updates an existing domain within a profile.
Expand All @@ -401,8 +401,8 @@ async def begin_update(
:type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either AFDDomain or the result of cls(response)
Expand Down Expand Up @@ -462,7 +462,7 @@ async def _delete_initial(
resource_group_name: str,
profile_name: str,
custom_domain_name: str,
**kwargs
**kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
Expand Down Expand Up @@ -496,7 +496,7 @@ async def _delete_initial(

if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if cls:
Expand All @@ -509,7 +509,7 @@ async def begin_delete(
resource_group_name: str,
profile_name: str,
custom_domain_name: str,
**kwargs
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes an existing AzureFrontDoor domain with the specified domain name under the specified
subscription, resource group and profile.
Expand All @@ -522,8 +522,8 @@ async def begin_delete(
:type custom_domain_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
Expand Down Expand Up @@ -579,7 +579,7 @@ async def _refresh_validation_token_initial(
resource_group_name: str,
profile_name: str,
custom_domain_name: str,
**kwargs
**kwargs: Any
) -> "_models.ValidationToken":
cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationToken"]
error_map = {
Expand Down Expand Up @@ -613,7 +613,7 @@ async def _refresh_validation_token_initial(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('ValidationToken', pipeline_response)
Expand All @@ -629,7 +629,7 @@ async def begin_refresh_validation_token(
resource_group_name: str,
profile_name: str,
custom_domain_name: str,
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.ValidationToken"]:
"""Updates the domain validation token.
Expand All @@ -641,8 +641,8 @@ async def begin_refresh_validation_token(
:type custom_domain_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either ValidationToken or the result of cls(response)
Expand Down
Loading

0 comments on commit 400dc05

Please sign in to comment.