Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
368bdf4
Initial-Commit-multimodal
w-javed Oct 3, 2024
920c46c
Fix
w-javed Oct 4, 2024
17c7dac
Sync eng/common directory with azure-sdk-tools for PR 9092 (#37713)
azure-sdk Oct 3, 2024
5d8ca40
Removing private parameter from __call__ of AdversarialSimulator (#37…
nagkumar91 Oct 3, 2024
6e5bd48
Enabling option to disable response payload on writes (#37365)
FabianMeiswinkel Oct 3, 2024
10f9ac7
deprecate azure_germany (#37654)
xiangyan99 Oct 4, 2024
db68d9d
Add default impl to handle token challenges (#37652)
xiangyan99 Oct 4, 2024
793c3fc
Make Credentials Required for Content Safety and Protected Materials …
needuv Oct 4, 2024
4d4e5bc
addFeedRangesAndUseFeedRangeInQueryChangeFeed (#37687)
xinlian12 Oct 4, 2024
22f081c
Update release date for core (#37723)
xiangyan99 Oct 4, 2024
71e44d4
Improvements to mindependency dev_requirement conflict resolution (#3…
scbedd Oct 4, 2024
ee45fa1
Need to add environment to subscription configuration (#37726)
azure-sdk Oct 4, 2024
2e2366b
Enable samples for formrecognizer (#37676)
xiangyan99 Oct 4, 2024
0faf959
Merge branch 'main' into multi-moodal-sdk-support
w-javed Oct 5, 2024
088ed3b
multi-modal-changes
w-javed Oct 14, 2024
3ff2c2a
Merge-conflicts
w-javed Oct 14, 2024
5ff2668
fixes
w-javed Oct 14, 2024
5c270cd
Fix with latest
w-javed Oct 16, 2024
c473df7
merge-conflicts
w-javed Oct 16, 2024
99d0cf0
dict-fix
w-javed Oct 16, 2024
d570130
adding-protected-material
w-javed Oct 17, 2024
4bc8a34
Merge branch 'main' into multi-moodal-sdk-support
w-javed Oct 17, 2024
6ad0164
adding-protected-material
w-javed Oct 17, 2024
7655b9e
adding-protected-material
w-javed Oct 17, 2024
3c4b816
bumping-version
w-javed Oct 17, 2024
255add0
adding assets
w-javed Oct 17, 2024
49a8ad8
Added image in simulator
w-javed Oct 17, 2024
f64d4d3
Merge branch 'main' into multi-moodal-sdk-support
w-javed Oct 17, 2024
acad134
Added image in simulator
w-javed Oct 17, 2024
60eae73
bumping-version
w-javed Oct 18, 2024
e14c6d7
push-asset
w-javed Oct 18, 2024
b12ef57
merge-conflict-fix
w-javed Oct 18, 2024
e070237
assets
w-javed Oct 18, 2024
66548f5
pushing asset
w-javed Oct 18, 2024
f05726c
merge-conflicts
w-javed Oct 19, 2024
1fe065b
remove-containt-on-key
w-javed Oct 19, 2024
82fd655
asset
w-javed Oct 19, 2024
6dddb96
asset2
w-javed Oct 19, 2024
c5fa8cf
asset3
w-javed Oct 19, 2024
74b3582
asset4
w-javed Oct 19, 2024
2e11e9d
adding conftest
w-javed Oct 20, 2024
651fc00
conftest
w-javed Oct 20, 2024
3ed59e8
cred fix
w-javed Oct 20, 2024
4031d46
asset-new
w-javed Oct 20, 2024
b5fc1c5
fix
w-javed Oct 20, 2024
24a52aa
asset
w-javed Oct 20, 2024
73e62c6
adding multi-modal-without-tests
w-javed Oct 20, 2024
c89b341
asset-from-main
w-javed Oct 20, 2024
b63910d
asset-from-main
w-javed Oct 20, 2024
ca4c3e6
fix
w-javed Oct 20, 2024
8b28458
adding one test only
w-javed Oct 20, 2024
1eb9304
new asset
w-javed Oct 20, 2024
dd53e67
tests,fix: Sanitizer should replace with enum value not enum name
kdestin Oct 21, 2024
9fcd7f8
test-asset
w-javed Oct 21, 2024
d64704d
[AutoRelease] t2-containerservicefleet-2024-09-24-42036(can only be m…
azure-sdk Oct 21, 2024
78b11c9
[AutoRelease] t2-dns-2024-09-25-81486(can only be merged by SDK owner…
azure-sdk Oct 21, 2024
6962ca2
[AutoRelease] t2-appconfiguration-2024-10-09-68726(can only be merged…
azure-sdk Oct 21, 2024
aa2bb08
code and test (#37855)
azure-sdk Oct 21, 2024
52f3784
[AutoRelease] t2-servicefabricmanagedclusters-2024-10-08-57405(can on…
azure-sdk Oct 21, 2024
09724d8
[AutoRelease] t2-containerinstance-2024-10-21-66631(can only be merge…
azure-sdk Oct 21, 2024
9f5f7f9
[sdk generation pipeline] bump typespec-python 0.36.1 (#38008)
msyyc Oct 21, 2024
45e049c
[AutoRelease] t2-dnsresolver-2024-10-12-16936(can only be merged by S…
azure-sdk Oct 21, 2024
617f8aa
Merge branch 'main' into multi-moodal-sdk-support-one-test
w-javed Oct 21, 2024
706eea3
new asset after fix in conftest
w-javed Oct 21, 2024
bd08adf
asset
w-javed Oct 21, 2024
3c71da9
chore: Update assets.json
kdestin Oct 21, 2024
6d48318
Move perf pipelines to TME subscription (#38020)
azure-sdk Oct 21, 2024
14d4675
fix
w-javed Oct 21, 2024
d4b8272
after-comments
w-javed Oct 21, 2024
33e3075
fix
w-javed Oct 21, 2024
237443b
fix
w-javed Oct 21, 2024
525379e
asset
w-javed Oct 22, 2024
9603f21
Merge branch 'main' into multi-moodal-sdk-support-one-test
w-javed Oct 22, 2024
af143e8
new asset with 1 test recording only
w-javed Oct 22, 2024
511e4b5
chore: Update assets.json
kdestin Oct 22, 2024
ac94148
conftest fix
w-javed Oct 23, 2024
4f445f6
Merge branch 'main' into multi-moodal-sdk-support-one-test
w-javed Oct 23, 2024
dc7cb7d
assets change
w-javed Oct 23, 2024
48bec25
new test
w-javed Oct 23, 2024
307b4e4
few changes
w-javed Oct 23, 2024
20093f8
removing proxy start
w-javed Oct 23, 2024
e819a80
added all tests
w-javed Oct 24, 2024
6f1595e
merge with asset
w-javed Oct 24, 2024
60a823f
asset
w-javed Oct 24, 2024
b6334eb
fixes
w-javed Oct 25, 2024
9092831
Merge branch 'main' into multi-moodal-sdk-support-one-test
w-javed Oct 25, 2024
93ba2f0
fixes with asset
w-javed Oct 25, 2024
1be5ef1
asset-after-tax
w-javed Oct 25, 2024
78f8ec2
enabling 2 more tests
w-javed Oct 25, 2024
84d4eac
unit test fix
w-javed Oct 25, 2024
7a9eb2b
asset
w-javed Oct 25, 2024
30eba68
new asset
w-javed Oct 25, 2024
ca7cdfe
fixes per comments
w-javed Oct 25, 2024
9afeb5f
changes by black
w-javed Oct 25, 2024
dd67a01
merge fix
w-javed Oct 25, 2024
c5fb4f1
merge fix
w-javed Oct 25, 2024
1701076
pylint fix
w-javed Oct 25, 2024
9397aaf
merge conflict
w-javed Oct 25, 2024
a1d9be9
pylint fix
w-javed Oct 26, 2024
47ff5fd
ground test fix
w-javed Oct 26, 2024
a7689a2
fixes - pylint, black, mypy
w-javed Oct 26, 2024
9c09880
more tests
w-javed Oct 26, 2024
ebd21d3
docstring fixes
w-javed Oct 26, 2024
c9db879
merge conflict
w-javed Oct 26, 2024
9fdef18
doc string fix
w-javed Oct 26, 2024
058c37a
asset
w-javed Oct 26, 2024
1e15809
few updates after Nagkumar review
w-javed Oct 28, 2024
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
Prev Previous commit
Next Next commit
[AutoRelease] t2-dnsresolver-2024-10-12-16936(can only be merged by S…
…DK owner) (#37864)

* code and test

* update-testcase

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Co-authored-by: azure-sdk <PythonSdkPipelines>
Co-authored-by: ChenxiJiang333 <[email protected]>
Co-authored-by: ChenxiJiang333 <[email protected]>
Co-authored-by: Yuchao Yan <[email protected]>
  • Loading branch information
4 people authored and w-javed committed Oct 21, 2024
commit 45e049c4d32c0cae4414cede9b9fc0596781b839
33 changes: 33 additions & 0 deletions sdk/dnsresolver/azure-mgmt-dnsresolver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Release History

## 1.1.0b2 (2024-XX-XX)

### Features Added

- Client `DnsResolverManagementClient` added operation group `dns_resolver_policies`
- Client `DnsResolverManagementClient` added operation group `dns_security_rules`
- Client `DnsResolverManagementClient` added operation group `dns_resolver_policy_virtual_network_links`
- Client `DnsResolverManagementClient` added operation group `dns_resolver_domain_lists`
- Model `Resource` added property `system_data`
- Added enum `ActionType`
- Added enum `BlockResponseCode`
- Added model `DnsResolverDomainList`
- Added model `DnsResolverDomainListPatch`
- Added model `DnsResolverDomainListResult`
- Added model `DnsResolverPolicy`
- Added model `DnsResolverPolicyListResult`
- Added model `DnsResolverPolicyPatch`
- Added model `DnsResolverPolicyVirtualNetworkLink`
- Added model `DnsResolverPolicyVirtualNetworkLinkListResult`
- Added model `DnsResolverPolicyVirtualNetworkLinkPatch`
- Added model `DnsSecurityRule`
- Added model `DnsSecurityRuleAction`
- Added model `DnsSecurityRuleListResult`
- Added model `DnsSecurityRulePatch`
- Added enum `DnsSecurityRuleState`
- Added model `ErrorAdditionalInfo`
- Added model `ErrorDetail`
- Added model `ErrorResponse`
- Added model `DnsResolverDomainListsOperations`
- Added model `DnsResolverPoliciesOperations`
- Added model `DnsResolverPolicyVirtualNetworkLinksOperations`
- Added model `DnsSecurityRulesOperations`

## 1.1.0b1 (2022-12-27)

### Other Changes
Expand Down
18 changes: 8 additions & 10 deletions sdk/dnsresolver/azure-mgmt-dnsresolver/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure Dnsresolver Management Client Library.
This package has been tested with Python 3.7+.
This package has been tested with Python 3.8+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_
Expand All @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For

### Prerequisites

- Python 3.7+ is required to use this package.
- Python 3.8+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package
Expand All @@ -28,25 +28,26 @@ By default, [Azure Active Directory](https://aka.ms/awps/aad) token authenticati

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
- `AZURE_CLIENT_SECRET` for Azure client secret.

In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.

With above configuration, client can be authenticated by following code:

```python
from azure.identity import DefaultAzureCredential
from azure.mgmt.dnsresolver import DnsResolverManagementClient
from azure.mgmt.dnsresolver import DnsresolverManagementClient
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = DnsResolverManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
client = DnsresolverManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
```

## Examples


Code samples for this package can be found at [Dnsresolver Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com and [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
Code samples for this package can be found at:
- [Search Dnsresolver Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)


## Troubleshooting
Expand All @@ -58,6 +59,3 @@ Code samples for this package can be found at [Dnsresolver Management](https://d
If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-dnsresolver%2FREADME.png)
10 changes: 5 additions & 5 deletions sdk/dnsresolver/azure-mgmt-dnsresolver/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "89a9bf17524904e7670f0fd2d62ac882ca00d85c",
"commit": "15b16d1b5c3cccdecdd1cfe936f6a8005680c557",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.19.0",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/dnsresolver/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/dnsresolver/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/dnsresolver/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,35 @@
# 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
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

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


class DnsResolverManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
class DnsResolverManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
"""Configuration for DnsResolverManagementClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-07-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-07-01-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(DnsResolverManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2022-07-01"] = kwargs.pop("api_version", "2022-07-01")
api_version: str = kwargs.pop("api_version", "2023-07-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -54,6 +46,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-dnsresolver/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(self, **kwargs: Any) -> None:
Expand All @@ -62,9 +55,9 @@ def _configure(self, **kwargs: Any) -> None:
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,23 @@

from copy import deepcopy
from typing import Any, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy

from . import models as _models
from ._configuration import DnsResolverManagementClientConfiguration
from ._serialization import Deserializer, Serializer
from .operations import (
DnsForwardingRulesetsOperations,
DnsResolverDomainListsOperations,
DnsResolverPoliciesOperations,
DnsResolverPolicyVirtualNetworkLinksOperations,
DnsResolversOperations,
DnsSecurityRulesOperations,
ForwardingRulesOperations,
InboundEndpointsOperations,
OutboundEndpointsOperations,
Expand All @@ -29,8 +36,8 @@
from azure.core.credentials import TokenCredential


class DnsResolverManagementClient: # pylint: disable=client-accepts-api-version-keyword
"""The DNS Resolver Management Client.
class DnsResolverManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""DNS Resolver Client.

:ivar dns_resolvers: DnsResolversOperations operations
:vartype dns_resolvers: azure.mgmt.dnsresolver.operations.DnsResolversOperations
Expand All @@ -45,14 +52,25 @@ class DnsResolverManagementClient: # pylint: disable=client-accepts-api-version
:vartype forwarding_rules: azure.mgmt.dnsresolver.operations.ForwardingRulesOperations
:ivar virtual_network_links: VirtualNetworkLinksOperations operations
:vartype virtual_network_links: azure.mgmt.dnsresolver.operations.VirtualNetworkLinksOperations
:ivar dns_resolver_policies: DnsResolverPoliciesOperations operations
:vartype dns_resolver_policies: azure.mgmt.dnsresolver.operations.DnsResolverPoliciesOperations
:ivar dns_security_rules: DnsSecurityRulesOperations operations
:vartype dns_security_rules: azure.mgmt.dnsresolver.operations.DnsSecurityRulesOperations
:ivar dns_resolver_policy_virtual_network_links: DnsResolverPolicyVirtualNetworkLinksOperations
operations
:vartype dns_resolver_policy_virtual_network_links:
azure.mgmt.dnsresolver.operations.DnsResolverPolicyVirtualNetworkLinksOperations
:ivar dns_resolver_domain_lists: DnsResolverDomainListsOperations operations
:vartype dns_resolver_domain_lists:
azure.mgmt.dnsresolver.operations.DnsResolverDomainListsOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. 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-07-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-07-01-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 @@ -68,7 +86,25 @@ def __init__(
self._config = DnsResolverManagementClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
policies.RequestIdPolicy(**kwargs),
self._config.headers_policy,
self._config.user_agent_policy,
self._config.proxy_policy,
policies.ContentDecodePolicy(**kwargs),
ARMAutoResourceProviderRegistrationPolicy(),
self._config.redirect_policy,
self._config.retry_policy,
self._config.authentication_policy,
self._config.custom_hook_policy,
self._config.logging_policy,
policies.DistributedTracingPolicy(**kwargs),
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand All @@ -90,8 +126,20 @@ def __init__(
self.virtual_network_links = VirtualNetworkLinksOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.dns_resolver_policies = DnsResolverPoliciesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.dns_security_rules = DnsSecurityRulesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.dns_resolver_policy_virtual_network_links = DnsResolverPolicyVirtualNetworkLinksOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.dns_resolver_domain_lists = DnsResolverDomainListsOperations(
self._client, self._config, self._serialize, self._deserialize
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand All @@ -111,14 +159,14 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:

request_copy = deepcopy(request)
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore

def close(self) -> None:
self._client.close()

def __enter__(self) -> "DnsResolverManagementClient":
def __enter__(self) -> Self:
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 @@ -25,6 +25,7 @@
#
# --------------------------------------------------------------------------


# This file 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
def patch_sdk():
Expand Down
Loading