Skip to content

Commit

Permalink
CodeGen from PR 3186 in test-repo-billy/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge c83b222861abbde7b2e27c7594679974425bf68b into 4791ba864c7b494cc0554b418cb42773e7ddd40d
  • Loading branch information
SDKAuto committed Jan 22, 2024
1 parent e56a49c commit b0aa8f4
Show file tree
Hide file tree
Showing 67 changed files with 4,140 additions and 2,689 deletions.
12 changes: 6 additions & 6 deletions sdk/agrifood/azure-mgmt-agrifood/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "e37a57df67daaa82f9c3758fc450bc8655812a08",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"commit": "53b37cf6c41614013c9357629b107cbd61d37066",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"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/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/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"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/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/agrifood/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
from ._configuration import AgriFoodMgmtClientConfiguration
from ._serialization import Deserializer, Serializer
from .operations import (
CheckNameAvailabilityOperations,
DataConnectorsOperations,
DataManagerForAgricultureExtensionsOperations,
DataManagerForAgricultureResourcesOperations,
ExtensionsOperations,
FarmBeatsExtensionsOperations,
FarmBeatsModelsOperations,
LocationsOperations,
OperationResultsOperations,
Operations,
PrivateEndpointConnectionsOperations,
PrivateLinkResourcesOperations,
Expand All @@ -33,16 +35,25 @@


class AgriFoodMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""APIs documentation for Azure AgFoodPlatform Resource Provider Service.
"""APIs documentation for Microsoft Azure Data Manager for Agriculture Service.
:ivar check_name_availability: CheckNameAvailabilityOperations operations
:vartype check_name_availability:
azure.mgmt.agrifood.operations.CheckNameAvailabilityOperations
:ivar data_connectors: DataConnectorsOperations operations
:vartype data_connectors: azure.mgmt.agrifood.operations.DataConnectorsOperations
:ivar data_manager_for_agriculture_extensions: DataManagerForAgricultureExtensionsOperations
operations
:vartype data_manager_for_agriculture_extensions:
azure.mgmt.agrifood.operations.DataManagerForAgricultureExtensionsOperations
:ivar data_manager_for_agriculture_resources: DataManagerForAgricultureResourcesOperations
operations
:vartype data_manager_for_agriculture_resources:
azure.mgmt.agrifood.operations.DataManagerForAgricultureResourcesOperations
:ivar operation_results: OperationResultsOperations operations
:vartype operation_results: azure.mgmt.agrifood.operations.OperationResultsOperations
:ivar extensions: ExtensionsOperations operations
:vartype extensions: azure.mgmt.agrifood.operations.ExtensionsOperations
:ivar farm_beats_extensions: FarmBeatsExtensionsOperations operations
:vartype farm_beats_extensions: azure.mgmt.agrifood.operations.FarmBeatsExtensionsOperations
:ivar farm_beats_models: FarmBeatsModelsOperations operations
:vartype farm_beats_models: azure.mgmt.agrifood.operations.FarmBeatsModelsOperations
:ivar locations: LocationsOperations operations
:vartype locations: azure.mgmt.agrifood.operations.LocationsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.agrifood.operations.Operations
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
Expand All @@ -57,13 +68,11 @@ class AgriFoodMgmtClient: # pylint: disable=client-accepts-api-version-keyword,
azure.mgmt.agrifood.operations.SolutionsDiscoverabilityOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param solution_id: Solution Id of the solution. Required.
:type solution_id: str
: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 "2021-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-06-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
Expand All @@ -73,28 +82,31 @@ class AgriFoodMgmtClient: # pylint: disable=client-accepts-api-version-keyword,
def __init__(
self,
credential: "TokenCredential",
solution_id: str,
subscription_id: str,
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = AgriFoodMgmtClientConfiguration(
credential=credential, solution_id=solution_id, subscription_id=subscription_id, **kwargs
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._config = AgriFoodMgmtClientConfiguration(credential=credential, subscription_id=subscription_id, **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)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.farm_beats_extensions = FarmBeatsExtensionsOperations(
self.check_name_availability = CheckNameAvailabilityOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.data_connectors = DataConnectorsOperations(self._client, self._config, self._serialize, self._deserialize)
self.data_manager_for_agriculture_extensions = DataManagerForAgricultureExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.data_manager_for_agriculture_resources = DataManagerForAgricultureResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.farm_beats_models = FarmBeatsModelsOperations(
self.operation_results = OperationResultsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
self._client, self._config, self._serialize, self._deserialize
Expand Down Expand Up @@ -136,5 +148,5 @@ def __enter__(self) -> "AgriFoodMgmtClient":
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 @@ -33,28 +27,23 @@ class AgriFoodMgmtClientConfiguration(Configuration): # pylint: disable=too-man
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param solution_id: Solution Id of the solution. Required.
:type solution_id: str
: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 "2021-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", solution_id: str, subscription_id: str, **kwargs: Any) -> None:
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(AgriFoodMgmtClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2021-09-01-preview"] = kwargs.pop("api_version", "2021-09-01-preview")
api_version: str = kwargs.pop("api_version", "2023-06-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if solution_id is None:
raise ValueError("Parameter 'solution_id' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.solution_id = solution_id
self.subscription_id = subscription_id
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
Expand Down
Loading

0 comments on commit b0aa8f4

Please sign in to comment.