Skip to content

Commit 5a20521

Browse files
author
SDKAuto
committed
CodeGen from PR 3587 in openapi-env-test/azure-rest-api-specs
Merge 5f66a7d8962514b798d7473a3635d07f34eaa25e into 0cb800ff5c4e8ae549342de0a20e3517d470c864
1 parent fd40a92 commit 5a20521

File tree

60 files changed

+625
-6401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+625
-6401
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "e37a57df67daaa82f9c3758fc450bc8655812a08",
3-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
2+
"commit": "f3cf16a6ef63dbe34ed161385aff1410430b8dda",
3+
"repository_url": "https://github.com/openapi-env-test/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
66
"@autorest/[email protected]",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/agrifood/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/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/agrifood/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/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/agrifood/resource-manager/readme.md"
1111
}

sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from ._agri_food_mgmt_client import AgriFoodMgmtClient
9+
from ._azure_agri_food_rp_service import AzureAgriFoodRPService
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
@@ -19,7 +19,7 @@
1919
from ._patch import patch_sdk as _patch_sdk
2020

2121
__all__ = [
22-
"AgriFoodMgmtClient",
22+
"AzureAgriFoodRPService",
2323
]
2424
__all__.extend([p for p in _patch_all if p not in __all__])
2525

sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/_agri_food_mgmt_client.py renamed to sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/_azure_agri_food_rp_service.py

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,23 @@
1313
from azure.mgmt.core import ARMPipelineClient
1414

1515
from . import models as _models
16-
from ._configuration import AgriFoodMgmtClientConfiguration
16+
from ._configuration import AzureAgriFoodRPServiceConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
1919
ExtensionsOperations,
2020
FarmBeatsExtensionsOperations,
2121
FarmBeatsModelsOperations,
2222
LocationsOperations,
2323
Operations,
24-
PrivateEndpointConnectionsOperations,
25-
PrivateLinkResourcesOperations,
26-
SolutionsDiscoverabilityOperations,
27-
SolutionsOperations,
2824
)
2925

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

3430

35-
class AgriFoodMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
36-
"""APIs documentation for Azure AgFoodPlatform Resource Provider Service.
31+
class AzureAgriFoodRPService: # pylint: disable=client-accepts-api-version-keyword
32+
"""APIs documentation for Azure AgriFood Resource Provider Service.
3733
3834
:ivar extensions: ExtensionsOperations operations
3935
:vartype extensions: azure.mgmt.agrifood.operations.ExtensionsOperations
@@ -45,41 +41,26 @@ class AgriFoodMgmtClient: # pylint: disable=client-accepts-api-version-keyword,
4541
:vartype locations: azure.mgmt.agrifood.operations.LocationsOperations
4642
:ivar operations: Operations operations
4743
:vartype operations: azure.mgmt.agrifood.operations.Operations
48-
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
49-
:vartype private_endpoint_connections:
50-
azure.mgmt.agrifood.operations.PrivateEndpointConnectionsOperations
51-
:ivar private_link_resources: PrivateLinkResourcesOperations operations
52-
:vartype private_link_resources: azure.mgmt.agrifood.operations.PrivateLinkResourcesOperations
53-
:ivar solutions: SolutionsOperations operations
54-
:vartype solutions: azure.mgmt.agrifood.operations.SolutionsOperations
55-
:ivar solutions_discoverability: SolutionsDiscoverabilityOperations operations
56-
:vartype solutions_discoverability:
57-
azure.mgmt.agrifood.operations.SolutionsDiscoverabilityOperations
5844
:param credential: Credential needed for the client to connect to Azure. Required.
5945
:type credential: ~azure.core.credentials.TokenCredential
60-
:param solution_id: Solution Id of the solution. Required.
61-
:type solution_id: str
62-
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
46+
:param subscription_id: The ID of the target subscription. Required.
6347
:type subscription_id: str
6448
:param base_url: Service URL. Default value is "https://management.azure.com".
6549
:type base_url: str
66-
:keyword api_version: Api Version. Default value is "2021-09-01-preview". Note that overriding
50+
:keyword api_version: Api Version. Default value is "2020-05-12-preview". Note that overriding
6751
this default value may result in unsupported behavior.
6852
:paramtype api_version: str
69-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
70-
Retry-After header is present.
7153
"""
7254

7355
def __init__(
7456
self,
7557
credential: "TokenCredential",
76-
solution_id: str,
7758
subscription_id: str,
7859
base_url: str = "https://management.azure.com",
7960
**kwargs: Any
8061
) -> None:
81-
self._config = AgriFoodMgmtClientConfiguration(
82-
credential=credential, solution_id=solution_id, subscription_id=subscription_id, **kwargs
62+
self._config = AzureAgriFoodRPServiceConfiguration(
63+
credential=credential, subscription_id=subscription_id, **kwargs
8364
)
8465
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8566

@@ -96,16 +77,6 @@ def __init__(
9677
)
9778
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
9879
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
99-
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
100-
self._client, self._config, self._serialize, self._deserialize
101-
)
102-
self.private_link_resources = PrivateLinkResourcesOperations(
103-
self._client, self._config, self._serialize, self._deserialize
104-
)
105-
self.solutions = SolutionsOperations(self._client, self._config, self._serialize, self._deserialize)
106-
self.solutions_discoverability = SolutionsDiscoverabilityOperations(
107-
self._client, self._config, self._serialize, self._deserialize
108-
)
10980

11081
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
11182
"""Runs the network request through the client's chained policies.
@@ -132,7 +103,7 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
132103
def close(self) -> None:
133104
self._client.close()
134105

135-
def __enter__(self) -> "AgriFoodMgmtClient":
106+
def __enter__(self) -> "AzureAgriFoodRPService":
136107
self._client.__enter__()
137108
return self
138109

sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/_configuration.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,31 @@
2525
from azure.core.credentials import TokenCredential
2626

2727

28-
class AgriFoodMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
29-
"""Configuration for AgriFoodMgmtClient.
28+
class AzureAgriFoodRPServiceConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
29+
"""Configuration for AzureAgriFoodRPService.
3030
3131
Note that all parameters used to create this instance are saved as instance
3232
attributes.
3333
3434
:param credential: Credential needed for the client to connect to Azure. Required.
3535
:type credential: ~azure.core.credentials.TokenCredential
36-
:param solution_id: Solution Id of the solution. Required.
37-
:type solution_id: str
38-
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
36+
:param subscription_id: The ID of the target subscription. Required.
3937
:type subscription_id: str
40-
:keyword api_version: Api Version. Default value is "2021-09-01-preview". Note that overriding
38+
:keyword api_version: Api Version. Default value is "2020-05-12-preview". Note that overriding
4139
this default value may result in unsupported behavior.
4240
:paramtype api_version: str
4341
"""
4442

45-
def __init__(self, credential: "TokenCredential", solution_id: str, subscription_id: str, **kwargs: Any) -> None:
46-
super(AgriFoodMgmtClientConfiguration, self).__init__(**kwargs)
47-
api_version: Literal["2021-09-01-preview"] = kwargs.pop("api_version", "2021-09-01-preview")
43+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
44+
super(AzureAgriFoodRPServiceConfiguration, self).__init__(**kwargs)
45+
api_version: Literal["2020-05-12-preview"] = kwargs.pop("api_version", "2020-05-12-preview")
4846

4947
if credential is None:
5048
raise ValueError("Parameter 'credential' must not be None.")
51-
if solution_id is None:
52-
raise ValueError("Parameter 'solution_id' must not be None.")
5349
if subscription_id is None:
5450
raise ValueError("Parameter 'subscription_id' must not be None.")
5551

5652
self.credential = credential
57-
self.solution_id = solution_id
5853
self.subscription_id = subscription_id
5954
self.api_version = api_version
6055
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])

sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b3"
9+
VERSION = "1.0.0b1"

sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from ._agri_food_mgmt_client import AgriFoodMgmtClient
9+
from ._azure_agri_food_rp_service import AzureAgriFoodRPService
1010

1111
try:
1212
from ._patch import __all__ as _patch_all
@@ -16,7 +16,7 @@
1616
from ._patch import patch_sdk as _patch_sdk
1717

1818
__all__ = [
19-
"AgriFoodMgmtClient",
19+
"AzureAgriFoodRPService",
2020
]
2121
__all__.extend([p for p in _patch_all if p not in __all__])
2222

sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/_agri_food_mgmt_client.py renamed to sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/_azure_agri_food_rp_service.py

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,22 @@
1414

1515
from .. import models as _models
1616
from .._serialization import Deserializer, Serializer
17-
from ._configuration import AgriFoodMgmtClientConfiguration
17+
from ._configuration import AzureAgriFoodRPServiceConfiguration
1818
from .operations import (
1919
ExtensionsOperations,
2020
FarmBeatsExtensionsOperations,
2121
FarmBeatsModelsOperations,
2222
LocationsOperations,
2323
Operations,
24-
PrivateEndpointConnectionsOperations,
25-
PrivateLinkResourcesOperations,
26-
SolutionsDiscoverabilityOperations,
27-
SolutionsOperations,
2824
)
2925

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

3430

35-
class AgriFoodMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
36-
"""APIs documentation for Azure AgFoodPlatform Resource Provider Service.
31+
class AzureAgriFoodRPService: # pylint: disable=client-accepts-api-version-keyword
32+
"""APIs documentation for Azure AgriFood Resource Provider Service.
3733
3834
:ivar extensions: ExtensionsOperations operations
3935
:vartype extensions: azure.mgmt.agrifood.aio.operations.ExtensionsOperations
@@ -46,42 +42,26 @@ class AgriFoodMgmtClient: # pylint: disable=client-accepts-api-version-keyword,
4642
:vartype locations: azure.mgmt.agrifood.aio.operations.LocationsOperations
4743
:ivar operations: Operations operations
4844
:vartype operations: azure.mgmt.agrifood.aio.operations.Operations
49-
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
50-
:vartype private_endpoint_connections:
51-
azure.mgmt.agrifood.aio.operations.PrivateEndpointConnectionsOperations
52-
:ivar private_link_resources: PrivateLinkResourcesOperations operations
53-
:vartype private_link_resources:
54-
azure.mgmt.agrifood.aio.operations.PrivateLinkResourcesOperations
55-
:ivar solutions: SolutionsOperations operations
56-
:vartype solutions: azure.mgmt.agrifood.aio.operations.SolutionsOperations
57-
:ivar solutions_discoverability: SolutionsDiscoverabilityOperations operations
58-
:vartype solutions_discoverability:
59-
azure.mgmt.agrifood.aio.operations.SolutionsDiscoverabilityOperations
6045
:param credential: Credential needed for the client to connect to Azure. Required.
6146
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
62-
:param solution_id: Solution Id of the solution. Required.
63-
:type solution_id: str
64-
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
47+
:param subscription_id: The ID of the target subscription. Required.
6548
:type subscription_id: str
6649
:param base_url: Service URL. Default value is "https://management.azure.com".
6750
:type base_url: str
68-
:keyword api_version: Api Version. Default value is "2021-09-01-preview". Note that overriding
51+
:keyword api_version: Api Version. Default value is "2020-05-12-preview". Note that overriding
6952
this default value may result in unsupported behavior.
7053
:paramtype api_version: str
71-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
72-
Retry-After header is present.
7354
"""
7455

7556
def __init__(
7657
self,
7758
credential: "AsyncTokenCredential",
78-
solution_id: str,
7959
subscription_id: str,
8060
base_url: str = "https://management.azure.com",
8161
**kwargs: Any
8262
) -> None:
83-
self._config = AgriFoodMgmtClientConfiguration(
84-
credential=credential, solution_id=solution_id, subscription_id=subscription_id, **kwargs
63+
self._config = AzureAgriFoodRPServiceConfiguration(
64+
credential=credential, subscription_id=subscription_id, **kwargs
8565
)
8666
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8767

@@ -98,16 +78,6 @@ def __init__(
9878
)
9979
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
10080
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
101-
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
102-
self._client, self._config, self._serialize, self._deserialize
103-
)
104-
self.private_link_resources = PrivateLinkResourcesOperations(
105-
self._client, self._config, self._serialize, self._deserialize
106-
)
107-
self.solutions = SolutionsOperations(self._client, self._config, self._serialize, self._deserialize)
108-
self.solutions_discoverability = SolutionsDiscoverabilityOperations(
109-
self._client, self._config, self._serialize, self._deserialize
110-
)
11181

11282
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
11383
"""Runs the network request through the client's chained policies.
@@ -134,7 +104,7 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncH
134104
async def close(self) -> None:
135105
await self._client.close()
136106

137-
async def __aenter__(self) -> "AgriFoodMgmtClient":
107+
async def __aenter__(self) -> "AzureAgriFoodRPService":
138108
await self._client.__aenter__()
139109
return self
140110

sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/_configuration.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,31 @@
2525
from azure.core.credentials_async import AsyncTokenCredential
2626

2727

28-
class AgriFoodMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
29-
"""Configuration for AgriFoodMgmtClient.
28+
class AzureAgriFoodRPServiceConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
29+
"""Configuration for AzureAgriFoodRPService.
3030
3131
Note that all parameters used to create this instance are saved as instance
3232
attributes.
3333
3434
:param credential: Credential needed for the client to connect to Azure. Required.
3535
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
36-
:param solution_id: Solution Id of the solution. Required.
37-
:type solution_id: str
38-
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
36+
:param subscription_id: The ID of the target subscription. Required.
3937
:type subscription_id: str
40-
:keyword api_version: Api Version. Default value is "2021-09-01-preview". Note that overriding
38+
:keyword api_version: Api Version. Default value is "2020-05-12-preview". Note that overriding
4139
this default value may result in unsupported behavior.
4240
:paramtype api_version: str
4341
"""
4442

45-
def __init__(
46-
self, credential: "AsyncTokenCredential", solution_id: str, subscription_id: str, **kwargs: Any
47-
) -> None:
48-
super(AgriFoodMgmtClientConfiguration, self).__init__(**kwargs)
49-
api_version: Literal["2021-09-01-preview"] = kwargs.pop("api_version", "2021-09-01-preview")
43+
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
44+
super(AzureAgriFoodRPServiceConfiguration, self).__init__(**kwargs)
45+
api_version: Literal["2020-05-12-preview"] = kwargs.pop("api_version", "2020-05-12-preview")
5046

5147
if credential is None:
5248
raise ValueError("Parameter 'credential' must not be None.")
53-
if solution_id is None:
54-
raise ValueError("Parameter 'solution_id' must not be None.")
5549
if subscription_id is None:
5650
raise ValueError("Parameter 'subscription_id' must not be None.")
5751

5852
self.credential = credential
59-
self.solution_id = solution_id
6053
self.subscription_id = subscription_id
6154
self.api_version = api_version
6255
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])

sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/operations/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
from ._farm_beats_models_operations import FarmBeatsModelsOperations
1212
from ._locations_operations import LocationsOperations
1313
from ._operations import Operations
14-
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
15-
from ._private_link_resources_operations import PrivateLinkResourcesOperations
16-
from ._solutions_operations import SolutionsOperations
17-
from ._solutions_discoverability_operations import SolutionsDiscoverabilityOperations
1814

1915
from ._patch import __all__ as _patch_all
2016
from ._patch import * # pylint: disable=unused-wildcard-import
@@ -26,10 +22,6 @@
2622
"FarmBeatsModelsOperations",
2723
"LocationsOperations",
2824
"Operations",
29-
"PrivateEndpointConnectionsOperations",
30-
"PrivateLinkResourcesOperations",
31-
"SolutionsOperations",
32-
"SolutionsDiscoverabilityOperations",
3325
]
3426
__all__.extend([p for p in _patch_all if p not in __all__])
3527
_patch_sdk()

0 commit comments

Comments
 (0)