Skip to content

Commit

Permalink
CodeGen from PR 16870 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Track2 modify readme.go.md (Azure#16870)
  • Loading branch information
SDKAuto committed Nov 25, 2021
1 parent 9e1d561 commit ae5dd44
Show file tree
Hide file tree
Showing 12 changed files with 208 additions and 39 deletions.
11 changes: 7 additions & 4 deletions sdk/azurestack/azure-mgmt-azurestack/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.0.6369",
"use": "@autorest/python@5.6.2",
"commit": "ea6ceada9e22eb0d455288d339955dfe56521302",
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "754938e4cb9416358b02dcc11f444adf14b3b7b6",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/azurestack/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/azurestack/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/azurestack/resource-manager/readme.md"
}
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 AzureStackManagementClientConfiguration
from .operations import Operations
Expand Down Expand Up @@ -80,6 +81,24 @@ def __init__(
self.linked_subscriptions = LinkedSubscriptionsOperations(
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": false,
"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -104,11 +104,5 @@
"products": "ProductsOperations",
"registrations": "RegistrationsOperations",
"linked_subscriptions": "LinkedSubscriptionsOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
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 = "1.0.0"
VERSION = "1.0.0b1"
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 @@ -77,6 +78,23 @@ def __init__(
self.linked_subscriptions = LinkedSubscriptionsOperations(
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 @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:

async def list(
self,
**kwargs
**kwargs: Any
) -> "_models.CloudManifestFileResponse":
"""Returns a cloud specific manifest JSON file with latest version.
Expand Down Expand Up @@ -91,7 +91,7 @@ async def get(
self,
verification_version: str,
version_creation_date: Optional[str] = None,
**kwargs
**kwargs: Any
) -> "_models.CloudManifestFileResponse":
"""Returns a cloud specific manifest JSON file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def list(
self,
resource_group: str,
registration_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.CustomerSubscriptionList"]:
"""Returns a list of products.
Expand Down Expand Up @@ -121,7 +121,7 @@ async def get(
resource_group: str,
registration_name: str,
customer_subscription_name: str,
**kwargs
**kwargs: Any
) -> "_models.CustomerSubscription":
"""Returns the specified product.
Expand Down Expand Up @@ -184,7 +184,7 @@ async def delete(
resource_group: str,
registration_name: str,
customer_subscription_name: str,
**kwargs
**kwargs: Any
) -> None:
"""Deletes a customer subscription under a registration.
Expand Down Expand Up @@ -245,7 +245,7 @@ async def create(
registration_name: str,
customer_subscription_name: str,
customer_creation_parameters: "_models.CustomerSubscription",
**kwargs
**kwargs: Any
) -> "_models.CustomerSubscription":
"""Creates a new customer subscription under a registration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def list_by_resource_group(
self,
resource_group: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.LinkedSubscriptionsList"]:
"""Returns a list of all linked subscriptions under current resource group.
Expand Down Expand Up @@ -114,7 +114,7 @@ async def get_next(next_link=None):

def list_by_subscription(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.LinkedSubscriptionsList"]:
"""Returns a list of all linked subscriptions under current subscription.
Expand Down Expand Up @@ -183,7 +183,7 @@ async def get(
self,
resource_group: str,
linked_subscription_name: str,
**kwargs
**kwargs: Any
) -> "_models.LinkedSubscription":
"""Returns the properties of a Linked Subscription resource.
Expand Down Expand Up @@ -242,7 +242,7 @@ async def delete(
self,
resource_group: str,
linked_subscription_name: str,
**kwargs
**kwargs: Any
) -> None:
"""Delete the requested Linked Subscription resource.
Expand Down Expand Up @@ -299,7 +299,7 @@ async def create_or_update(
resource_group: str,
linked_subscription_name: str,
resource: "_models.LinkedSubscriptionParameter",
**kwargs
**kwargs: Any
) -> "_models.LinkedSubscription":
"""Create or update a linked subscription resource.
Expand Down Expand Up @@ -370,7 +370,7 @@ async def update(
resource_group: str,
linked_subscription_name: str,
resource: "_models.LinkedSubscriptionParameter",
**kwargs
**kwargs: Any
) -> "_models.LinkedSubscription":
"""Patch a Linked Subscription resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:

def list(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.OperationList"]:
"""Returns the list of supported REST operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def list(
self,
resource_group: str,
registration_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.ProductList"]:
"""Returns a list of products.
Expand Down Expand Up @@ -121,7 +121,7 @@ async def get(
resource_group: str,
registration_name: str,
product_name: str,
**kwargs
**kwargs: Any
) -> "_models.Product":
"""Returns the specified product.
Expand Down Expand Up @@ -184,7 +184,7 @@ async def list_details(
resource_group: str,
registration_name: str,
product_name: str,
**kwargs
**kwargs: Any
) -> "_models.ExtendedProduct":
"""Returns the extended properties of a product.
Expand Down Expand Up @@ -248,7 +248,7 @@ async def get_products(
registration_name: str,
product_name: str,
device_configuration: Optional["_models.DeviceConfiguration"] = None,
**kwargs
**kwargs: Any
) -> "_models.ProductList":
"""Returns a list of products.
Expand Down Expand Up @@ -322,7 +322,7 @@ async def get_product(
registration_name: str,
product_name: str,
device_configuration: Optional["_models.DeviceConfiguration"] = None,
**kwargs
**kwargs: Any
) -> "_models.Product":
"""Returns the specified product.
Expand Down Expand Up @@ -396,7 +396,7 @@ async def upload_log(
registration_name: str,
product_name: str,
marketplace_product_log_update: Optional["_models.MarketplaceProductLogUpdate"] = None,
**kwargs
**kwargs: Any
) -> "_models.ProductLog":
"""Returns the specified product.
Expand Down
Loading

0 comments on commit ae5dd44

Please sign in to comment.