Skip to content

Commit

Permalink
CodeGen from PR 14444 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Fix temporaryDist default value issue (Azure#14444)
  • Loading branch information
SDKAuto committed Jun 8, 2021
1 parent dd11242 commit 6d873c5
Show file tree
Hide file tree
Showing 68 changed files with 647 additions and 527 deletions.
11 changes: 7 additions & 4 deletions sdk/appplatform/azure-mgmt-appplatform/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.0.6369",
"use": "@autorest/[email protected]",
"commit": "44cd436a26f7ba25bdaae13ed98866c3543a522c",
"autorest": "3.4.2",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "85042dd73c00fef4e072139a213416ae3bf507e3",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/appplatform/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.6.2 --version=3.0.6369",
"autorest_command": "autorest specification/appplatform/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.0 --use=@autorest/[email protected].2 --version=3.4.2",
"readme": "specification/appplatform/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from typing import Any, Optional

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

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
Expand Down
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 AppPlatformManagementClientConfiguration
from .operations import ServicesOperations
Expand Down Expand Up @@ -96,6 +97,24 @@ def __init__(
self.sku = SkuOperations(
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppPlatformManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -107,11 +107,5 @@
"operations": "Operations",
"runtime_versions": "RuntimeVersionsOperations",
"sku": "SkuOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
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 @@ -93,6 +94,23 @@ def __init__(
self.sku = SkuOperations(
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 @@ -49,7 +49,7 @@ async def get(
service_name: str,
app_name: str,
sync_status: Optional[str] = None,
**kwargs
**kwargs: Any
) -> "_models.AppResource":
"""Get an App and its properties.
Expand Down Expand Up @@ -117,7 +117,7 @@ async def _create_or_update_initial(
service_name: str,
app_name: str,
app_resource: "_models.AppResource",
**kwargs
**kwargs: Any
) -> "_models.AppResource":
cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"]
error_map = {
Expand Down Expand Up @@ -176,7 +176,7 @@ async def begin_create_or_update(
service_name: str,
app_name: str,
app_resource: "_models.AppResource",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.AppResource"]:
"""Create a new App or update an exiting App.
Expand All @@ -191,8 +191,8 @@ async def begin_create_or_update(
:type app_resource: ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource
: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: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a 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 AppResource or the result of cls(response)
Expand Down Expand Up @@ -252,7 +252,7 @@ async def delete(
resource_group_name: str,
service_name: str,
app_name: str,
**kwargs
**kwargs: Any
) -> None:
"""Operation to delete an App.
Expand Down Expand Up @@ -313,7 +313,7 @@ async def _update_initial(
service_name: str,
app_name: str,
app_resource: "_models.AppResource",
**kwargs
**kwargs: Any
) -> "_models.AppResource":
cls = kwargs.pop('cls', None) # type: ClsType["_models.AppResource"]
error_map = {
Expand Down Expand Up @@ -372,7 +372,7 @@ async def begin_update(
service_name: str,
app_name: str,
app_resource: "_models.AppResource",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.AppResource"]:
"""Operation to update an exiting App.
Expand All @@ -387,8 +387,8 @@ async def begin_update(
:type app_resource: ~azure.mgmt.appplatform.v2019_05_01_preview.models.AppResource
: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: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a 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 AppResource or the result of cls(response)
Expand Down Expand Up @@ -447,7 +447,7 @@ def list(
self,
resource_group_name: str,
service_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.AppResourceCollection"]:
"""Handles requests to list all resources in a Service.
Expand Down Expand Up @@ -523,7 +523,7 @@ async def get_resource_upload_url(
resource_group_name: str,
service_name: str,
app_name: str,
**kwargs
**kwargs: Any
) -> "_models.ResourceUploadDefinition":
"""Get an resource upload URL for an App, which may be artifacts or source archive.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def get(
service_name: str,
app_name: str,
binding_name: str,
**kwargs
**kwargs: Any
) -> "_models.BindingResource":
"""Get a Binding and its properties.
Expand Down Expand Up @@ -115,7 +115,7 @@ async def create_or_update(
app_name: str,
binding_name: str,
binding_resource: "_models.BindingResource",
**kwargs
**kwargs: Any
) -> "_models.BindingResource":
"""Create a new Binding or update an exiting Binding.
Expand Down Expand Up @@ -189,7 +189,7 @@ async def delete(
service_name: str,
app_name: str,
binding_name: str,
**kwargs
**kwargs: Any
) -> None:
"""Operation to delete a Binding.
Expand Down Expand Up @@ -254,7 +254,7 @@ async def update(
app_name: str,
binding_name: str,
binding_resource: "_models.BindingResource",
**kwargs
**kwargs: Any
) -> "_models.BindingResource":
"""Operation to update an exiting Binding.
Expand Down Expand Up @@ -327,7 +327,7 @@ def list(
resource_group_name: str,
service_name: str,
app_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.BindingResourceCollection"]:
"""Handles requests to list all resources in an App.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def get(
resource_group_name: str,
service_name: str,
certificate_name: str,
**kwargs
**kwargs: Any
) -> "_models.CertificateResource":
"""Get the certificate resource.
Expand Down Expand Up @@ -110,7 +110,7 @@ async def create_or_update(
service_name: str,
certificate_name: str,
certificate_resource: "_models.CertificateResource",
**kwargs
**kwargs: Any
) -> "_models.CertificateResource":
"""Create or update certificate resource.
Expand Down Expand Up @@ -180,7 +180,7 @@ async def delete(
resource_group_name: str,
service_name: str,
certificate_name: str,
**kwargs
**kwargs: Any
) -> None:
"""Delete the certificate resource.
Expand Down Expand Up @@ -239,7 +239,7 @@ def list(
self,
resource_group_name: str,
service_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.CertificateResourceCollection"]:
"""List all the certificates of one user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def get(
service_name: str,
app_name: str,
domain_name: str,
**kwargs
**kwargs: Any
) -> "_models.CustomDomainResource":
"""Get the custom domain of one lifecycle application.
Expand Down Expand Up @@ -115,7 +115,7 @@ async def create_or_update(
app_name: str,
domain_name: str,
domain_resource: "_models.CustomDomainResource",
**kwargs
**kwargs: Any
) -> "_models.CustomDomainResource":
"""Create or update custom domain of one lifecycle application.
Expand Down Expand Up @@ -189,7 +189,7 @@ async def delete(
service_name: str,
app_name: str,
domain_name: str,
**kwargs
**kwargs: Any
) -> None:
"""Delete the custom domain of one lifecycle application.
Expand Down Expand Up @@ -254,7 +254,7 @@ async def patch(
app_name: str,
domain_name: str,
domain_resource: "_models.CustomDomainResource",
**kwargs
**kwargs: Any
) -> "_models.CustomDomainResource":
"""Update custom domain of one lifecycle application.
Expand Down Expand Up @@ -327,7 +327,7 @@ def list(
resource_group_name: str,
service_name: str,
app_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.CustomDomainResourceCollection"]:
"""List the custom domains of one lifecycle application.
Expand Down Expand Up @@ -407,7 +407,7 @@ async def validate(
service_name: str,
app_name: str,
validate_payload: "_models.CustomDomainValidatePayload",
**kwargs
**kwargs: Any
) -> "_models.CustomDomainValidateResult":
"""Check the resource name is valid as well as not in use.
Expand Down
Loading

0 comments on commit 6d873c5

Please sign in to comment.