Skip to content

Commit 2b75d19

Browse files
Regenerating Python SDK for 2024-12-09 Preview version to apply fix f… (Azure#40675)
* Regenerating Python SDK for 2024-12-09 Preview version to apply fix for breaking change * Recording tests * fix mypy/pylint/verifytypes --------- Co-authored-by: Krista Pratico <[email protected]>
1 parent ebbbd27 commit 2b75d19

File tree

20 files changed

+2353
-237
lines changed

20 files changed

+2353
-237
lines changed

sdk/confidentialledger/azure-confidentialledger/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/confidentialledger/azure-confidentialledger",
5-
"Tag": "python/confidentialledger/azure-confidentialledger_b00d5637b0"
5+
"Tag": "python/confidentialledger/azure-confidentialledger_7025cb5b36"
66
}

sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,27 @@
1616

1717
from ._configuration import ConfidentialLedgerClientConfiguration
1818
from ._operations import ConfidentialLedgerClientOperationsMixin
19-
from ._serialization import Deserializer, Serializer
19+
from ._utils.serialization import Deserializer, Serializer
2020

2121

2222
class ConfidentialLedgerClient(ConfidentialLedgerClientOperationsMixin):
2323
"""The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential
2424
Ledger service.
2525
26-
:param endpoint: The Confidential Ledger URL, for example
26+
:param ledger_endpoint: The Confidential Ledger URL, for example
2727
https://contoso.confidentialledger.azure.com. Required.
28-
:type endpoint: str
28+
:type ledger_endpoint: str
2929
:keyword api_version: Api Version. Default value is "2024-12-09-preview". Note that overriding
3030
this default value may result in unsupported behavior.
3131
:paramtype api_version: str
3232
"""
3333

3434
def __init__( # pylint: disable=missing-client-constructor-parameter-credential
35-
self, endpoint: str, **kwargs: Any
35+
self, ledger_endpoint: str, **kwargs: Any
3636
) -> None:
37-
_endpoint = "{endpoint}"
38-
self._config = ConfidentialLedgerClientConfiguration(endpoint=endpoint, **kwargs)
37+
_endpoint = "{ledgerEndpoint}"
38+
self._config = ConfidentialLedgerClientConfiguration(ledger_endpoint=ledger_endpoint, **kwargs)
39+
3940
_policies = kwargs.pop("policies", None)
4041
if _policies is None:
4142
_policies = [
@@ -79,7 +80,9 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
7980

8081
request_copy = deepcopy(request)
8182
path_format_arguments = {
82-
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
83+
"ledgerEndpoint": self._serialize.url(
84+
"self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True
85+
),
8386
}
8487

8588
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)

sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_configuration.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ class ConfidentialLedgerClientConfiguration: # pylint: disable=too-many-instanc
1919
Note that all parameters used to create this instance are saved as instance
2020
attributes.
2121
22-
:param endpoint: The Confidential Ledger URL, for example
22+
:param ledger_endpoint: The Confidential Ledger URL, for example
2323
https://contoso.confidentialledger.azure.com. Required.
24-
:type endpoint: str
24+
:type ledger_endpoint: str
2525
:keyword api_version: Api Version. Default value is "2024-12-09-preview". Note that overriding
2626
this default value may result in unsupported behavior.
2727
:paramtype api_version: str
2828
"""
2929

30-
def __init__(self, endpoint: str, **kwargs: Any) -> None:
30+
def __init__(self, ledger_endpoint: str, **kwargs: Any) -> None:
3131
api_version: str = kwargs.pop("api_version", "2024-12-09-preview")
3232

33-
if endpoint is None:
34-
raise ValueError("Parameter 'endpoint' must not be None.")
33+
if ledger_endpoint is None:
34+
raise ValueError("Parameter 'ledger_endpoint' must not be None.")
3535

36-
self.endpoint = endpoint
36+
self.ledger_endpoint = ledger_endpoint
3737
self.api_version = api_version
3838
kwargs.setdefault("sdk_moniker", "confidentialledger/{}".format(VERSION))
3939
self.polling_interval = kwargs.get("polling_interval", 30)

sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/_operations.py

Lines changed: 109 additions & 59 deletions
Large diffs are not rendered by default.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------
Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,10 @@
11
# pylint: disable=line-too-long,useless-suppression,too-many-lines
2+
# coding=utf-8
23
# --------------------------------------------------------------------------
3-
#
44
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
#
6-
# The MIT License (MIT)
7-
#
8-
# Permission is hereby granted, free of charge, to any person obtaining a copy
9-
# of this software and associated documentation files (the ""Software""), to
10-
# deal in the Software without restriction, including without limitation the
11-
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12-
# sell copies of the Software, and to permit persons to whom the Software is
13-
# furnished to do so, subject to the following conditions:
14-
#
15-
# The above copyright notice and this permission notice shall be included in
16-
# all copies or substantial portions of the Software.
17-
#
18-
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23-
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24-
# IN THE SOFTWARE.
25-
#
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
268
# --------------------------------------------------------------------------
279

2810
# pyright: reportUnnecessaryTypeIgnoreComment=false
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
# --------------------------------------------------------------------------
77

88
from abc import ABC
9-
from typing import TYPE_CHECKING
10-
11-
from ._configuration import ConfidentialLedgerCertificateClientConfiguration
9+
from typing import Generic, TYPE_CHECKING, TypeVar
1210

1311
if TYPE_CHECKING:
14-
from azure.core import PipelineClient
12+
from .serialization import Deserializer, Serializer
13+
1514

16-
from ._serialization import Deserializer, Serializer
15+
TClient = TypeVar("TClient")
16+
TConfig = TypeVar("TConfig")
1717

1818

19-
class ConfidentialLedgerCertificateClientMixinABC(ABC): # pylint: disable=name-too-long
19+
class ClientMixinABC(ABC, Generic[TClient, TConfig]):
2020
"""DO NOT use this class. It is for internal typing use only."""
2121

22-
_client: "PipelineClient"
23-
_config: ConfidentialLedgerCertificateClientConfiguration
22+
_client: TClient
23+
_config: TConfig
2424
_serialize: "Serializer"
2525
_deserialize: "Deserializer"

sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from azure.core.pipeline import policies
1515
from azure.core.rest import AsyncHttpResponse, HttpRequest
1616

17-
from .._serialization import Deserializer, Serializer
17+
from .._utils.serialization import Deserializer, Serializer
1818
from ._configuration import ConfidentialLedgerClientConfiguration
1919
from ._operations import ConfidentialLedgerClientOperationsMixin
2020

@@ -23,19 +23,20 @@ class ConfidentialLedgerClient(ConfidentialLedgerClientOperationsMixin):
2323
"""The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential
2424
Ledger service.
2525
26-
:param endpoint: The Confidential Ledger URL, for example
26+
:param ledger_endpoint: The Confidential Ledger URL, for example
2727
https://contoso.confidentialledger.azure.com. Required.
28-
:type endpoint: str
28+
:type ledger_endpoint: str
2929
:keyword api_version: Api Version. Default value is "2024-12-09-preview". Note that overriding
3030
this default value may result in unsupported behavior.
3131
:paramtype api_version: str
3232
"""
3333

3434
def __init__( # pylint: disable=missing-client-constructor-parameter-credential
35-
self, endpoint: str, **kwargs: Any
35+
self, ledger_endpoint: str, **kwargs: Any
3636
) -> None:
37-
_endpoint = "{endpoint}"
38-
self._config = ConfidentialLedgerClientConfiguration(endpoint=endpoint, **kwargs)
37+
_endpoint = "{ledgerEndpoint}"
38+
self._config = ConfidentialLedgerClientConfiguration(ledger_endpoint=ledger_endpoint, **kwargs)
39+
3940
_policies = kwargs.pop("policies", None)
4041
if _policies is None:
4142
_policies = [
@@ -81,7 +82,9 @@ def send_request(
8182

8283
request_copy = deepcopy(request)
8384
path_format_arguments = {
84-
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
85+
"ledgerEndpoint": self._serialize.url(
86+
"self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True
87+
),
8588
}
8689

8790
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)

sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_configuration.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ class ConfidentialLedgerClientConfiguration: # pylint: disable=too-many-instanc
1919
Note that all parameters used to create this instance are saved as instance
2020
attributes.
2121
22-
:param endpoint: The Confidential Ledger URL, for example
22+
:param ledger_endpoint: The Confidential Ledger URL, for example
2323
https://contoso.confidentialledger.azure.com. Required.
24-
:type endpoint: str
24+
:type ledger_endpoint: str
2525
:keyword api_version: Api Version. Default value is "2024-12-09-preview". Note that overriding
2626
this default value may result in unsupported behavior.
2727
:paramtype api_version: str
2828
"""
2929

30-
def __init__(self, endpoint: str, **kwargs: Any) -> None:
30+
def __init__(self, ledger_endpoint: str, **kwargs: Any) -> None:
3131
api_version: str = kwargs.pop("api_version", "2024-12-09-preview")
3232

33-
if endpoint is None:
34-
raise ValueError("Parameter 'endpoint' must not be None.")
33+
if ledger_endpoint is None:
34+
raise ValueError("Parameter 'ledger_endpoint' must not be None.")
3535

36-
self.endpoint = endpoint
36+
self.ledger_endpoint = ledger_endpoint
3737
self.api_version = api_version
3838
kwargs.setdefault("sdk_moniker", "confidentialledger/{}".format(VERSION))
3939
self.polling_interval = kwargs.get("polling_interval", 30)

0 commit comments

Comments
 (0)