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-workloads] Removed locale from link in Swagger #2930

Closed
wants to merge 1 commit into from
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/workloads/azure-mgmt-workloads/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f",
"commit": "8ef315e61629c6b4b36f9582da68255650f8f87b",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.2.16",
"@autorest/python@6.4.0",
"@autorest/modelerfour@4.24.3"
],
"autorest_command": "autorest specification/workloads/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/workloads/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.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/workloads/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._workloads_client import WorkloadsClient
from ._workloads_mgmt_client import WorkloadsMgmtClient
from ._version import VERSION

__version__ = VERSION
Expand All @@ -19,7 +19,7 @@
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"WorkloadsClient",
"WorkloadsMgmtClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from azure.core.credentials import TokenCredential


class WorkloadsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for WorkloadsClient.
class WorkloadsMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for WorkloadsMgmtClient.

Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -35,14 +35,14 @@ class WorkloadsClientConfiguration(Configuration): # pylint: disable=too-many-i
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(WorkloadsClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2022-11-01-preview"] = kwargs.pop("api_version", "2022-11-01-preview")
super(WorkloadsMgmtClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2023-04-01"] = kwargs.pop("api_version", "2023-04-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from azure.core.pipeline.transport import HttpRequest

from ._configuration import WorkloadsClientConfiguration
from ._configuration import WorkloadsMgmtClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand Down Expand Up @@ -39,10 +39,10 @@ def _format_url_section(template, **kwargs):
template = "/".join(components)


class WorkloadsClientMixinABC(ABC):
class WorkloadsMgmtClientMixinABC(ABC):
"""DO NOT use this class. It is for internal typing use only."""

_client: "PipelineClient"
_config: WorkloadsClientConfiguration
_config: WorkloadsMgmtClientConfiguration
_serialize: "Serializer"
_deserialize: "Deserializer"
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.0b3"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from azure.mgmt.core import ARMPipelineClient

from . import models as _models
from ._configuration import WorkloadsClientConfiguration
from ._configuration import WorkloadsMgmtClientConfiguration
from ._serialization import Deserializer, Serializer
from .operations import (
MonitorsOperations,
Expand All @@ -24,18 +24,21 @@
SAPDatabaseInstancesOperations,
SAPVirtualInstancesOperations,
SapLandscapeMonitorOperations,
WorkloadsClientOperationsMixin,
WorkloadsMgmtClientOperationsMixin,
)

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


class WorkloadsClient(
WorkloadsClientOperationsMixin
class WorkloadsMgmtClient(
WorkloadsMgmtClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""Workloads client provides access to various workload operations.
"""Workloads client provides access to various workload operations.:code:`<br>`Azure Center for
SAP solutions is currently in PREVIEW. See the `Azure Center for SAP solutions - Legal Terms
<https://learn.microsoft.com/legal/azure-center-for-sap-solutions/azure-center-for-sap-solutions-legal-terms>`_
for legal notices applicable to Azure Center for SAP solutions.

:ivar sap_virtual_instances: SAPVirtualInstancesOperations operations
:vartype sap_virtual_instances: azure.mgmt.workloads.operations.SAPVirtualInstancesOperations
Expand All @@ -60,8 +63,8 @@ class WorkloadsClient(
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -74,7 +77,9 @@ def __init__(
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = WorkloadsClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._config = WorkloadsMgmtClientConfiguration(
credential=credential, subscription_id=subscription_id, **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 @@ -127,9 +132,9 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "WorkloadsClient":
def __enter__(self) -> "WorkloadsMgmtClient":
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,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._workloads_client import WorkloadsClient
from ._workloads_mgmt_client import WorkloadsMgmtClient

try:
from ._patch import __all__ as _patch_all
Expand All @@ -16,7 +16,7 @@
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"WorkloadsClient",
"WorkloadsMgmtClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from azure.core.credentials_async import AsyncTokenCredential


class WorkloadsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for WorkloadsClient.
class WorkloadsMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for WorkloadsMgmtClient.

Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -35,14 +35,14 @@ class WorkloadsClientConfiguration(Configuration): # pylint: disable=too-many-i
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(WorkloadsClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2022-11-01-preview"] = kwargs.pop("api_version", "2022-11-01-preview")
super(WorkloadsMgmtClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2023-04-01"] = kwargs.pop("api_version", "2023-04-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from azure.core.pipeline.transport import HttpRequest

from ._configuration import WorkloadsClientConfiguration
from ._configuration import WorkloadsMgmtClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand All @@ -19,10 +19,10 @@
from .._serialization import Deserializer, Serializer


class WorkloadsClientMixinABC(ABC):
class WorkloadsMgmtClientMixinABC(ABC):
"""DO NOT use this class. It is for internal typing use only."""

_client: "AsyncPipelineClient"
_config: WorkloadsClientConfiguration
_config: WorkloadsMgmtClientConfiguration
_serialize: "Serializer"
_deserialize: "Deserializer"
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from .. import models as _models
from .._serialization import Deserializer, Serializer
from ._configuration import WorkloadsClientConfiguration
from ._configuration import WorkloadsMgmtClientConfiguration
from .operations import (
MonitorsOperations,
Operations,
Expand All @@ -24,18 +24,21 @@
SAPDatabaseInstancesOperations,
SAPVirtualInstancesOperations,
SapLandscapeMonitorOperations,
WorkloadsClientOperationsMixin,
WorkloadsMgmtClientOperationsMixin,
)

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


class WorkloadsClient(
WorkloadsClientOperationsMixin
class WorkloadsMgmtClient(
WorkloadsMgmtClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""Workloads client provides access to various workload operations.
"""Workloads client provides access to various workload operations.:code:`<br>`Azure Center for
SAP solutions is currently in PREVIEW. See the `Azure Center for SAP solutions - Legal Terms
<https://learn.microsoft.com/legal/azure-center-for-sap-solutions/azure-center-for-sap-solutions-legal-terms>`_
for legal notices applicable to Azure Center for SAP solutions.

:ivar sap_virtual_instances: SAPVirtualInstancesOperations operations
:vartype sap_virtual_instances:
Expand Down Expand Up @@ -64,8 +67,8 @@ class WorkloadsClient(
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -78,7 +81,9 @@ def __init__(
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = WorkloadsClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._config = WorkloadsMgmtClientConfiguration(
credential=credential, subscription_id=subscription_id, **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 @@ -131,9 +136,9 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncH
async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "WorkloadsClient":
async def __aenter__(self) -> "WorkloadsMgmtClient":
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 @@ -6,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._workloads_client_operations import WorkloadsClientOperationsMixin
from ._workloads_mgmt_client_operations import WorkloadsMgmtClientOperationsMixin
from ._sap_virtual_instances_operations import SAPVirtualInstancesOperations
from ._sap_central_instances_operations import SAPCentralInstancesOperations
from ._sap_database_instances_operations import SAPDatabaseInstancesOperations
Expand All @@ -21,7 +21,7 @@
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"WorkloadsClientOperationsMixin",
"WorkloadsMgmtClientOperationsMixin",
"SAPVirtualInstancesOperations",
"SAPCentralInstancesOperations",
"SAPDatabaseInstancesOperations",
Expand Down
Loading