Skip to content

Commit

Permalink
CodeGen from PR 20092 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
migrate to .net track 2 batch 2 (Azure#20092)
  • Loading branch information
SDKAuto committed Aug 5, 2022
1 parent 3f52cf8 commit 92f26bd
Show file tree
Hide file tree
Showing 35 changed files with 4,418 additions and 2,647 deletions.
6 changes: 3 additions & 3 deletions sdk/streamanalytics/azure-mgmt-streamanalytics/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.12.0",
"@autorest/python@5.16.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "0ca8399b0e4fb4ae4608ffd0a6c056213664dacd",
"commit": "63f4e39c20223c20941614e776d33e699c3e2777",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/streamanalytics/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"autorest_command": "autorest specification/streamanalytics/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/streamanalytics/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['StreamAnalyticsManagementClient']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` 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
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials import TokenCredential


class StreamAnalyticsManagementClientConfiguration(Configuration):
class StreamAnalyticsManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for StreamAnalyticsManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,6 +29,9 @@ class StreamAnalyticsManagementClientConfiguration(Configuration):
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2020-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
Expand All @@ -38,14 +41,16 @@ def __init__(
**kwargs: Any
) -> None:
super(StreamAnalyticsManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2020-03-01") # type: str

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

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-03-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-streamanalytics/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Optional, TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from msrest import Deserializer, Serializer

from . import models
from ._configuration import StreamAnalyticsManagementClientConfiguration
Expand All @@ -21,35 +22,36 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

class StreamAnalyticsManagementClient:
class StreamAnalyticsManagementClient: # pylint: disable=too-many-instance-attributes
"""Stream Analytics Client.
:ivar operations: Operations operations
:vartype operations: stream_analytics_management_client.operations.Operations
:vartype operations: azure.mgmt.streamanalytics.operations.Operations
:ivar streaming_jobs: StreamingJobsOperations operations
:vartype streaming_jobs: stream_analytics_management_client.operations.StreamingJobsOperations
:vartype streaming_jobs: azure.mgmt.streamanalytics.operations.StreamingJobsOperations
:ivar inputs: InputsOperations operations
:vartype inputs: stream_analytics_management_client.operations.InputsOperations
:vartype inputs: azure.mgmt.streamanalytics.operations.InputsOperations
:ivar outputs: OutputsOperations operations
:vartype outputs: stream_analytics_management_client.operations.OutputsOperations
:vartype outputs: azure.mgmt.streamanalytics.operations.OutputsOperations
:ivar transformations: TransformationsOperations operations
:vartype transformations:
stream_analytics_management_client.operations.TransformationsOperations
:vartype transformations: azure.mgmt.streamanalytics.operations.TransformationsOperations
:ivar functions: FunctionsOperations operations
:vartype functions: stream_analytics_management_client.operations.FunctionsOperations
:vartype functions: azure.mgmt.streamanalytics.operations.FunctionsOperations
:ivar subscriptions: SubscriptionsOperations operations
:vartype subscriptions: stream_analytics_management_client.operations.SubscriptionsOperations
:vartype subscriptions: azure.mgmt.streamanalytics.operations.SubscriptionsOperations
:ivar clusters: ClustersOperations operations
:vartype clusters: stream_analytics_management_client.operations.ClustersOperations
:vartype clusters: azure.mgmt.streamanalytics.operations.ClustersOperations
:ivar private_endpoints: PrivateEndpointsOperations operations
:vartype private_endpoints:
stream_analytics_management_client.operations.PrivateEndpointsOperations
:vartype private_endpoints: azure.mgmt.streamanalytics.operations.PrivateEndpointsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2020-03-01". 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,20 +70,38 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.streaming_jobs = StreamingJobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.inputs = InputsOperations(self._client, self._config, self._serialize, self._deserialize)
self.outputs = OutputsOperations(self._client, self._config, self._serialize, self._deserialize)
self.transformations = TransformationsOperations(self._client, self._config, self._serialize, self._deserialize)
self.functions = FunctionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.subscriptions = SubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
self.private_endpoints = PrivateEndpointsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize
)
self.streaming_jobs = StreamingJobsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.inputs = InputsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.outputs = OutputsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.transformations = TransformationsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.functions = FunctionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.subscriptions = SubscriptionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.clusters = ClustersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.private_endpoints = PrivateEndpointsOperations(
self._client, self._config, self._serialize, self._deserialize
)


def _send_request(
self,
request, # type: HttpRequest
request: HttpRequest,
**kwargs: Any
) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
# --------------------------------------------------------------------------

from ._stream_analytics_management_client import StreamAnalyticsManagementClient

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['StreamAnalyticsManagementClient']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` 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
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials_async import AsyncTokenCredential


class StreamAnalyticsManagementClientConfiguration(Configuration):
class StreamAnalyticsManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for StreamAnalyticsManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,6 +29,9 @@ class StreamAnalyticsManagementClientConfiguration(Configuration):
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2020-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
Expand All @@ -38,14 +41,16 @@ def __init__(
**kwargs: Any
) -> None:
super(StreamAnalyticsManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2020-03-01") # type: str

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

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-03-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-streamanalytics/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Loading

0 comments on commit 92f26bd

Please sign in to comment.