Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-servicelinker] update service linker readme for sdk generation #79

Closed
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
4 changes: 2 additions & 2 deletions sdk/servicelinker/azure-mgmt-servicelinker/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "429a7ea873cc1bbd4df133f71427162e15e258b1",
"commit": "64270d16339e818af93625a3574ff4cf7bbc32d1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/servicelinker/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"autorest_command": "autorest specification/servicelinker/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/servicelinker/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._microsoft_service_linker import MicrosoftServiceLinker
from ._service_linker_management_client import ServiceLinkerManagementClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['MicrosoftServiceLinker']
__all__ = ['ServiceLinkerManagementClient']

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from azure.core.credentials import TokenCredential


class MicrosoftServiceLinkerConfiguration(Configuration):
"""Configuration for MicrosoftServiceLinker.
class ServiceLinkerManagementClientConfiguration(Configuration):
"""Configuration for ServiceLinkerManagementClient.

Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -34,12 +34,12 @@ def __init__(
credential: "TokenCredential",
**kwargs: Any
) -> None:
super(MicrosoftServiceLinkerConfiguration, self).__init__(**kwargs)
super(ServiceLinkerManagementClientConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")

self.credential = credential
self.api_version = "2021-11-01-preview"
self.api_version = "2022-05-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-servicelinker/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"chosen_version": "2021-11-01-preview",
"total_api_version_list": ["2021-11-01-preview"],
"chosen_version": "2022-05-01",
"total_api_version_list": ["2022-05-01"],
"client": {
"name": "MicrosoftServiceLinker",
"filename": "_microsoft_service_linker",
"name": "ServiceLinkerManagementClient",
"filename": "_service_linker_management_client",
"description": "Microsoft.ServiceLinker provider.",
"host_value": "\"https://management.azure.com\"",
"parameterized_host_template": null,
"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\": [\"MicrosoftServiceLinkerConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftServiceLinkerConfiguration\"]}}, \"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\": [\"ServiceLinkerManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ServiceLinkerManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
from msrest import Deserializer, Serializer

from . import models
from ._configuration import MicrosoftServiceLinkerConfiguration
from ._configuration import ServiceLinkerManagementClientConfiguration
from .operations import LinkerOperations, Operations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

class MicrosoftServiceLinker:
class ServiceLinkerManagementClient:
"""Microsoft.ServiceLinker provider.

:ivar linker: LinkerOperations operations
:vartype linker: microsoft_service_linker.operations.LinkerOperations
:vartype linker: azure.mgmt.servicelinker.operations.LinkerOperations
:ivar operations: Operations operations
:vartype operations: microsoft_service_linker.operations.Operations
:vartype operations: azure.mgmt.servicelinker.operations.Operations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param base_url: Service URL. Default value is 'https://management.azure.com'.
Expand All @@ -42,7 +42,7 @@ def __init__(
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = MicrosoftServiceLinkerConfiguration(credential=credential, **kwargs)
self._config = ServiceLinkerManagementClientConfiguration(credential=credential, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
Expand Down Expand Up @@ -84,7 +84,7 @@ def close(self):
self._client.close()

def __enter__(self):
# type: () -> MicrosoftServiceLinker
# type: () -> ServiceLinkerManagementClient
self._client.__enter__()
return self

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 = "1.0.0b2"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._microsoft_service_linker import MicrosoftServiceLinker
__all__ = ['MicrosoftServiceLinker']
from ._service_linker_management_client import ServiceLinkerManagementClient
__all__ = ['ServiceLinkerManagementClient']

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from azure.core.credentials_async import AsyncTokenCredential


class MicrosoftServiceLinkerConfiguration(Configuration):
"""Configuration for MicrosoftServiceLinker.
class ServiceLinkerManagementClientConfiguration(Configuration):
"""Configuration for ServiceLinkerManagementClient.

Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -34,12 +34,12 @@ def __init__(
credential: "AsyncTokenCredential",
**kwargs: Any
) -> None:
super(MicrosoftServiceLinkerConfiguration, self).__init__(**kwargs)
super(ServiceLinkerManagementClientConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")

self.credential = credential
self.api_version = "2021-11-01-preview"
self.api_version = "2022-05-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-servicelinker/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
from msrest import Deserializer, Serializer

from .. import models
from ._configuration import MicrosoftServiceLinkerConfiguration
from ._configuration import ServiceLinkerManagementClientConfiguration
from .operations import LinkerOperations, Operations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

class MicrosoftServiceLinker:
class ServiceLinkerManagementClient:
"""Microsoft.ServiceLinker provider.

:ivar linker: LinkerOperations operations
:vartype linker: microsoft_service_linker.aio.operations.LinkerOperations
:vartype linker: azure.mgmt.servicelinker.aio.operations.LinkerOperations
:ivar operations: Operations operations
:vartype operations: microsoft_service_linker.aio.operations.Operations
:vartype operations: azure.mgmt.servicelinker.aio.operations.Operations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param base_url: Service URL. Default value is 'https://management.azure.com'.
Expand All @@ -42,7 +42,7 @@ def __init__(
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = MicrosoftServiceLinkerConfiguration(credential=credential, **kwargs)
self._config = ServiceLinkerManagementClientConfiguration(credential=credential, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
Expand Down Expand Up @@ -82,7 +82,7 @@ def _send_request(
async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "MicrosoftServiceLinker":
async def __aenter__(self) -> "ServiceLinkerManagementClient":
await self._client.__aenter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class LinkerOperations:
instantiates it for you and attaches it as an attribute.

:ivar models: Alias to model classes used in this operation group.
:type models: ~microsoft_service_linker.models
:type models: ~azure.mgmt.servicelinker.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
Expand Down Expand Up @@ -61,7 +61,7 @@ def list(
:type resource_uri: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either LinkerList or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~microsoft_service_linker.models.LinkerList]
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.servicelinker.models.LinkerList]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.LinkerList"]
Expand Down Expand Up @@ -132,7 +132,7 @@ async def get(
:type linker_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: LinkerResource, or the result of cls(response)
:rtype: ~microsoft_service_linker.models.LinkerResource
:rtype: ~azure.mgmt.servicelinker.models.LinkerResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.LinkerResource"]
Expand Down Expand Up @@ -232,7 +232,7 @@ async def begin_create_or_update(
:param linker_name: The name Linker resource.
:type linker_name: str
:param parameters: Linker details.
:type parameters: ~microsoft_service_linker.models.LinkerResource
:type parameters: ~azure.mgmt.servicelinker.models.LinkerResource
: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: By default, your polling method will be AsyncARMPolling. Pass in False for
Expand All @@ -243,7 +243,7 @@ async def begin_create_or_update(
Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either LinkerResource or the result of
cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~microsoft_service_linker.models.LinkerResource]
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.servicelinker.models.LinkerResource]
:raises: ~azure.core.exceptions.HttpResponseError
"""
content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
Expand Down Expand Up @@ -448,7 +448,7 @@ async def begin_update(
:param linker_name: The name Linker resource.
:type linker_name: str
:param parameters: Linker details.
:type parameters: ~microsoft_service_linker.models.LinkerPatch
:type parameters: ~azure.mgmt.servicelinker.models.LinkerPatch
: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: By default, your polling method will be AsyncARMPolling. Pass in False for
Expand All @@ -459,7 +459,7 @@ async def begin_update(
Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either LinkerResource or the result of
cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~microsoft_service_linker.models.LinkerResource]
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.servicelinker.models.LinkerResource]
:raises: ~azure.core.exceptions.HttpResponseError
"""
content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
Expand Down Expand Up @@ -568,7 +568,7 @@ async def begin_validate(
Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either ValidateResult or the result of
cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~microsoft_service_linker.models.ValidateResult]
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.servicelinker.models.ValidateResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
Expand Down Expand Up @@ -626,7 +626,7 @@ async def list_configurations(
:type linker_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: SourceConfigurationResult, or the result of cls(response)
:rtype: ~microsoft_service_linker.models.SourceConfigurationResult
:rtype: ~azure.mgmt.servicelinker.models.SourceConfigurationResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceConfigurationResult"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Operations:
instantiates it for you and attaches it as an attribute.

:ivar models: Alias to model classes used in this operation group.
:type models: ~microsoft_service_linker.models
:type models: ~azure.mgmt.servicelinker.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
Expand All @@ -56,7 +56,7 @@ def list(
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either OperationListResult or the result of cls(response)
:rtype:
~azure.core.async_paging.AsyncItemPaged[~microsoft_service_linker.models.OperationListResult]
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.servicelinker.models.OperationListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"]
Expand Down
Loading