Skip to content

Commit

Permalink
CodeGen from PR 25441 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge de068212bc3cdf86557b7510655ee94f777c54de into 7e1c56e32d48749c12faa3b3e70ad0a0bfb27bcb
  • Loading branch information
SDKAuto committed Aug 24, 2023
1 parent e8eaf04 commit ecd42d0
Show file tree
Hide file tree
Showing 82 changed files with 2,033 additions and 749 deletions.
10 changes: 5 additions & 5 deletions sdk/botservice/azure-mgmt-botservice/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "c0f92082a788895368a738a9200e24971157d7ca",
"commit": "26aec466aafe1f6bdf59492d866a4a37ac029ed3",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/botservice/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.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/botservice/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/botservice/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
DirectLineOperations,
EmailOperations,
HostSettingsOperations,
NetworkSecurityPerimeterConfigurationsOperations,
OperationResultsOperations,
Operations,
PrivateEndpointConnectionsOperations,
Expand Down Expand Up @@ -62,14 +63,18 @@ class AzureBotService: # pylint: disable=client-accepts-api-version-keyword,too
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources:
azure.mgmt.botservice.operations.PrivateLinkResourcesOperations
:ivar network_security_perimeter_configurations:
NetworkSecurityPerimeterConfigurationsOperations operations
:vartype network_security_perimeter_configurations:
azure.mgmt.botservice.operations.NetworkSecurityPerimeterConfigurationsOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Azure Subscription ID. Required.
: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-09-15". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-09-15-preview". 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 @@ -83,7 +88,7 @@ def __init__(
**kwargs: Any
) -> None:
self._config = AzureBotServiceConfiguration(credential=credential, subscription_id=subscription_id, **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 All @@ -108,6 +113,9 @@ def __init__(
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down Expand Up @@ -138,5 +146,5 @@ def __enter__(self) -> "AzureBotService":
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,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -35,14 +29,14 @@ class AzureBotServiceConfiguration(Configuration): # pylint: disable=too-many-i
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Azure Subscription ID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-09-15". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-09-15-preview". 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(AzureBotServiceConfiguration, self).__init__(**kwargs)
api_version: Literal["2022-09-15"] = kwargs.pop("api_version", "2022-09-15")
api_version: str = kwargs.pop("api_version", "2023-09-15-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Loading

0 comments on commit ecd42d0

Please sign in to comment.