Skip to content

Commit

Permalink
CodeGen from PR 16859 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 4e88b322082f0d59463c41760556bb7931edcb6a into 47b551f
  • Loading branch information
SDKAuto committed Nov 23, 2021
1 parent 3858a56 commit 561cde7
Show file tree
Hide file tree
Showing 21 changed files with 584 additions and 344 deletions.
11 changes: 7 additions & 4 deletions sdk/managedservices/azure-mgmt-managedservices/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.3.0",
"use": "@autorest/[email protected]",
"commit": "528c0cffd4de3d4acdf451a1ea5f7cf6f3cb790c",
"autorest": "3.4.5",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "0e6644c54a38a59abdf495fcdc2be6298583a194",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/managedservices/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.6 --version=3.3.0",
"autorest_command": "autorest specification/managedservices/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/[email protected] --version=3.4.5",
"readme": "specification/managedservices/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
super(ManagedServicesClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.api_version = "2020-02-01-preview"
self.api_version = "2021-11-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-managedservices/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


class ManagedServicesClient(object):
"""Specification for ManagedServices.
"""The specification for ManagedServices.
:ivar registration_definitions: RegistrationDefinitionsOperations operations
:vartype registration_definitions: azure.mgmt.managedservices.operations.RegistrationDefinitionsOperations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"chosen_version": "2020-02-01-preview",
"total_api_version_list": ["2020-02-01-preview"],
"chosen_version": "2021-11-01-preview",
"total_api_version_list": ["2021-11-01-preview"],
"client": {
"name": "ManagedServicesClient",
"filename": "_managed_services_client",
"description": "Specification for ManagedServices.",
"description": "The specification for ManagedServices.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
Expand Down
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 = "6.0.0"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
super(ManagedServicesClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.api_version = "2020-02-01-preview"
self.api_version = "2021-11-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-managedservices/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


class ManagedServicesClient(object):
"""Specification for ManagedServices.
"""The specification for ManagedServices.
:ivar registration_definitions: RegistrationDefinitionsOperations operations
:vartype registration_definitions: azure.mgmt.managedservices.aio.operations.RegistrationDefinitionsOperations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ def list(
self,
scope: str,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.MarketplaceRegistrationDefinitionList"]:
"""Gets a list of the marketplace registration definitions for the marketplace identifier.
:param scope: Scope of the resource.
:param scope: The scope of the resource.
:type scope: str
:param filter: The filter query parameter. Might be used to filter marketplace registration
definition by plan identifier, publisher, version etc.
:param filter: The filter query parameter to filter managed services resources by.
:type filter: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either MarketplaceRegistrationDefinitionList or the result of cls(response)
Expand All @@ -64,7 +63,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
api_version = "2021-11-01-preview"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -121,13 +120,13 @@ async def get(
self,
scope: str,
marketplace_identifier: str,
**kwargs
**kwargs: Any
) -> "_models.MarketplaceRegistrationDefinition":
"""Get the marketplace registration definition for the marketplace identifier.
:param scope: Scope of the resource.
:param scope: The scope of the resource.
:type scope: str
:param marketplace_identifier: Market place identifier. Expected Formats -
:param marketplace_identifier: The Azure Marketplace identifier. Expected formats:
{publisher}.{product[-preview]}.{planName}.{version} or
{publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}).
:type marketplace_identifier: str
Expand All @@ -141,7 +140,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
api_version = "2021-11-01-preview"
accept = "application/json"

# Construct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def list(
self,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.MarketplaceRegistrationDefinitionList"]:
"""Gets a list of the marketplace registration definitions for the marketplace identifier.
:param filter: The filter query parameter. Might be used to filter marketplace registration
definition by plan identifier, publisher, version etc.
:param filter: The filter query parameter to filter managed services resources by.
:type filter: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either MarketplaceRegistrationDefinitionList or the result of cls(response)
Expand All @@ -61,7 +60,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
api_version = "2021-11-01-preview"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -113,11 +112,11 @@ async def get_next(next_link=None):
async def get(
self,
marketplace_identifier: str,
**kwargs
**kwargs: Any
) -> "_models.MarketplaceRegistrationDefinition":
"""Get the marketplace registration definition for the marketplace identifier.
:param marketplace_identifier: Market place identifier. Expected Formats -
:param marketplace_identifier: The Azure Marketplace identifier. Expected formats:
{publisher}.{product[-preview]}.{planName}.{version} or
{publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}).
:type marketplace_identifier: str
Expand All @@ -131,7 +130,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
api_version = "2021-11-01-preview"
accept = "application/json"

# Construct URL
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.OperationList":
"""Gets a list of the operations.
Expand All @@ -56,7 +56,7 @@ async def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
api_version = "2021-11-01-preview"
accept = "application/json"

# Construct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ async def get(
scope: str,
registration_assignment_id: str,
expand_registration_definition: Optional[bool] = None,
**kwargs
**kwargs: Any
) -> "_models.RegistrationAssignment":
"""Gets the details of specified registration assignment.
"""Gets the details of the specified registration assignment.
:param scope: Scope of the resource.
:param scope: The scope of the resource.
:type scope: str
:param registration_assignment_id: Guid of the registration assignment.
:param registration_assignment_id: The GUID of the registration assignment.
:type registration_assignment_id: str
:param expand_registration_definition: Tells whether to return registration definition details
also along with registration assignment details.
:param expand_registration_definition: The flag indicating whether to return the registration
definition details along with the registration assignment details.
:type expand_registration_definition: bool
:keyword callable cls: A custom type or function that will be passed the direct response
:return: RegistrationAssignment, or the result of cls(response)
Expand All @@ -69,7 +69,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
api_version = "2021-11-01-preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -111,14 +111,14 @@ async def _delete_initial(
self,
scope: str,
registration_assignment_id: str,
**kwargs
**kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
api_version = "2021-11-01-preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -155,18 +155,18 @@ async def begin_delete(
self,
scope: str,
registration_assignment_id: str,
**kwargs
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes the specified registration assignment.
:param scope: Scope of the resource.
:param scope: The scope of the resource.
:type scope: str
:param registration_assignment_id: Guid of the registration assignment.
:param registration_assignment_id: The GUID of the registration assignment.
:type registration_assignment_id: 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: 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 None or the result of cls(response)
Expand Down Expand Up @@ -219,14 +219,14 @@ async def _create_or_update_initial(
scope: str,
registration_assignment_id: str,
request_body: "_models.RegistrationAssignment",
**kwargs
**kwargs: Any
) -> "_models.RegistrationAssignment":
cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistrationAssignment"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
api_version = "2021-11-01-preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -276,20 +276,20 @@ async def begin_create_or_update(
scope: str,
registration_assignment_id: str,
request_body: "_models.RegistrationAssignment",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.RegistrationAssignment"]:
"""Creates or updates a registration assignment.
:param scope: Scope of the resource.
:param scope: The scope of the resource.
:type scope: str
:param registration_assignment_id: Guid of the registration assignment.
:param registration_assignment_id: The GUID of the registration assignment.
:type registration_assignment_id: str
:param request_body: The parameters required to create new registration assignment.
:type request_body: ~azure.mgmt.managedservices.models.RegistrationAssignment
: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 RegistrationAssignment or the result of cls(response)
Expand Down Expand Up @@ -345,15 +345,18 @@ def list(
self,
scope: str,
expand_registration_definition: Optional[bool] = None,
**kwargs
filter: Optional[str] = None,
**kwargs: Any
) -> AsyncIterable["_models.RegistrationAssignmentList"]:
"""Gets a list of the registration assignments.
:param scope: Scope of the resource.
:param scope: The scope of the resource.
:type scope: str
:param expand_registration_definition: Tells whether to return registration definition details
also along with registration assignment details.
:param expand_registration_definition: The flag indicating whether to return the registration
definition details along with the registration assignment details.
:type expand_registration_definition: bool
:param filter: The filter query parameter to filter managed services resources by.
:type filter: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either RegistrationAssignmentList or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managedservices.models.RegistrationAssignmentList]
Expand All @@ -364,7 +367,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
api_version = "2021-11-01-preview"
accept = "application/json"

def prepare_request(next_link=None):
Expand All @@ -384,6 +387,8 @@ def prepare_request(next_link=None):
if expand_registration_definition is not None:
query_parameters['$expandRegistrationDefinition'] = self._serialize.query("expand_registration_definition", expand_registration_definition, 'bool')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
if filter is not None:
query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
Expand Down
Loading

0 comments on commit 561cde7

Please sign in to comment.