Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/reservations/azure-mgmt-reservations/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "3751704f5318f1175875c94b66af769db917f2d3",
"commit": "8f54b1a7488beedbd4eab5b538018173be5e9c54",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.2.16",
"@autorest/python@6.4.3",
"@autorest/modelerfour@4.24.3"
],
"autorest_command": "autorest specification/reservations/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.16 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/reservations/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/reservations/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(
self, credential: "TokenCredential", base_url: str = "https://management.azure.com", **kwargs: Any
) -> None:
self._config = AzureReservationAPIConfiguration(credential=credential, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand Down Expand Up @@ -121,5 +121,5 @@ def __enter__(self) -> "AzureReservationAPI":
self._client.__enter__()
return self

def __exit__(self, *exc_details) -> None:
def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)
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 = "2.2.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(
self, credential: "AsyncTokenCredential", base_url: str = "https://management.azure.com", **kwargs: Any
) -> None:
self._config = AzureReservationAPIConfiguration(credential=credential, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand Down Expand Up @@ -122,5 +122,5 @@ async def __aenter__(self) -> "AzureReservationAPI":
await self._client.__aenter__()
return self

async def __aexit__(self, *exc_details) -> None:
async def __aexit__(self, *exc_details: Any) -> None:
await self._client.__aexit__(*exc_details)
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down Expand Up @@ -196,8 +197,9 @@ async def get_applied_reservation_list(self, subscription_id: str, **kwargs: Any
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ async def _post_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -191,7 +192,7 @@ async def begin_post(
Calculates price for exchanging ``Reservations`` if there are no policy errors.

:param body: Request containing purchases and refunds that need to be executed. Is either a
model type or a IO type. Required.
CalculateExchangeRequest type or a IO type. Required.
:type body: ~azure.mgmt.reservations.models.CalculateExchangeRequest or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ async def post(

:param reservation_order_id: Order Id of the reservation. Required.
:type reservation_order_id: str
:param body: Information needed for calculating refund of a reservation. Is either a model type
or a IO type. Required.
:param body: Information needed for calculating refund of a reservation. Is either a
CalculateRefundRequest type or a IO type. Required.
:type body: ~azure.mgmt.reservations.models.CalculateRefundRequest or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
Expand Down Expand Up @@ -160,8 +160,9 @@ async def post(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ async def _post_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -191,7 +192,7 @@ async def begin_post(
Returns one or more ``Reservations`` in exchange for one or more ``Reservation`` purchases.

:param body: Request containing the refunds and purchases that need to be executed. Is either a
model type or a IO type. Required.
ExchangeRequest type or a IO type. Required.
:type body: ~azure.mgmt.reservations.models.ExchangeRequest or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ async def get(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -189,8 +190,9 @@ async def _create_or_update_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -353,8 +355,8 @@ async def begin_create_or_update(
Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices.
Required.
:type resource_name: str
:param create_quota_request: Quota requests payload. Is either a model type or a IO type.
Required.
:param create_quota_request: Quota requests payload. Is either a CurrentQuotaLimitBase type or
a IO type. Required.
:type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
Expand Down Expand Up @@ -478,8 +480,9 @@ async def _update_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -633,8 +636,8 @@ async def begin_update(
Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices.
Required.
:type resource_name: str
:param create_quota_request: Payload for the quota request. Is either a model type or a IO
type. Required.
:param create_quota_request: Payload for the quota request. Is either a CurrentQuotaLimitBase
type or a IO type. Required.
:type create_quota_request: ~azure.mgmt.reservations.models.CurrentQuotaLimitBase or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
Expand Down Expand Up @@ -774,8 +777,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ async def get(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -219,8 +220,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ async def _available_scopes_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -229,8 +230,8 @@ async def begin_available_scopes(
:type reservation_order_id: str
:param reservation_id: Id of the reservation item. Required.
:type reservation_id: str
:param body: Scopes to be checked for eligibility. Is either a model type or a IO type.
Required.
:param body: Scopes to be checked for eligibility. Is either a AvailableScopeRequest type or a
IO type. Required.
:type body: ~azure.mgmt.reservations.models.AvailableScopeRequest or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
Expand Down Expand Up @@ -336,8 +337,9 @@ async def _split_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -438,8 +440,8 @@ async def begin_split(

:param reservation_order_id: Order Id of the reservation. Required.
:type reservation_order_id: str
:param body: Information needed to Split a reservation item. Is either a model type or a IO
type. Required.
:param body: Information needed to Split a reservation item. Is either a SplitRequest type or a
IO type. Required.
:type body: ~azure.mgmt.reservations.models.SplitRequest or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
Expand Down Expand Up @@ -544,8 +546,9 @@ async def _merge_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -649,8 +652,8 @@ async def begin_merge(

:param reservation_order_id: Order Id of the reservation. Required.
:type reservation_order_id: str
:param body: Information needed for commercial request for a reservation. Is either a model
type or a IO type. Required.
:param body: Information needed for commercial request for a reservation. Is either a
MergeRequest type or a IO type. Required.
:type body: ~azure.mgmt.reservations.models.MergeRequest or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
Expand Down Expand Up @@ -774,8 +777,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down Expand Up @@ -835,8 +839,9 @@ async def get(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -897,8 +902,9 @@ async def _update_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -1015,7 +1021,7 @@ async def begin_update(
:type reservation_order_id: str
:param reservation_id: Id of the reservation item. Required.
:type reservation_id: str
:param parameters: Information needed to patch a reservation item. Is either a model type or a
:param parameters: Information needed to patch a reservation item. Is either a Patch type or a
IO type. Required.
:type parameters: ~azure.mgmt.reservations.models.Patch or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Expand Down Expand Up @@ -1127,8 +1133,9 @@ async def archive( # pylint: disable=inconsistent-return-statements
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -1187,8 +1194,9 @@ async def unarchive( # pylint: disable=inconsistent-return-statements
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -1268,8 +1276,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down Expand Up @@ -1374,8 +1383,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down
Loading