Skip to content

Commit

Permalink
CodeGen from PR 16721 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge aac9b90d08a3461fe052dca5b98b2edf357eda30 into 564d013
  • Loading branch information
SDKAuto committed Nov 17, 2021
1 parent ca0302b commit 8b58ff7
Show file tree
Hide file tree
Showing 32 changed files with 2,003 additions and 2,375 deletions.
1 change: 1 addition & 0 deletions sdk/streamanalytics/azure-mgmt-streamanalytics/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
11 changes: 11 additions & 0 deletions sdk/streamanalytics/azure-mgmt-streamanalytics/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "0209ffc9cf81658adc04cc8eeed118530a71866d",
"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 --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/streamanalytics/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-03-01"
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
Original file line number Diff line number Diff line change
@@ -1,68 +1,111 @@
{
"chosen_version": "",
"total_api_version_list": ["2017-04-01-preview", "2020-03-01-preview"],
"chosen_version": "2020-03-01",
"total_api_version_list": ["2020-03-01"],
"client": {
"name": "StreamAnalyticsManagementClient",
"filename": "_stream_analytics_management_client",
"description": "Stream Analytics Client.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true
"has_lro_operations": true,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"StreamAnalyticsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"StreamAnalyticsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync_method": {
"sync": {
"credential": {
"method_signature": "credential, # type: \"TokenCredential\"",
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
},
"async_method": {
"async": {
"credential": {
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id: str,",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
"call": "credential, subscription_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url=None, # type: Optional[str]",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url: Optional[str] = None,",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
"credential_key_header_name": null,
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"functions": "FunctionsOperations",
"operations": "Operations",
"streaming_jobs": "StreamingJobsOperations",
"inputs": "InputsOperations",
"outputs": "OutputsOperations",
"streaming_jobs": "StreamingJobsOperations",
"subscriptions": "SubscriptionsOperations",
"transformations": "TransformationsOperations",
"operations": "Operations",
"functions": "FunctionsOperations",
"subscriptions": "SubscriptionsOperations",
"clusters": "ClustersOperations",
"private_endpoints": "PrivateEndpointsOperations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import StreamAnalyticsManagementClientConfiguration
from .operations import FunctionsOperations
from .operations import Operations
from .operations import StreamingJobsOperations
from .operations import InputsOperations
from .operations import OutputsOperations
from .operations import StreamingJobsOperations
from .operations import SubscriptionsOperations
from .operations import TransformationsOperations
from .operations import Operations
from .operations import FunctionsOperations
from .operations import SubscriptionsOperations
from .operations import ClustersOperations
from .operations import PrivateEndpointsOperations
from . import models
Expand All @@ -33,20 +34,20 @@
class StreamAnalyticsManagementClient(object):
"""Stream Analytics Client.
:ivar functions: FunctionsOperations operations
:vartype functions: stream_analytics_management_client.operations.FunctionsOperations
:ivar operations: Operations operations
:vartype operations: stream_analytics_management_client.operations.Operations
:ivar streaming_jobs: StreamingJobsOperations operations
:vartype streaming_jobs: stream_analytics_management_client.operations.StreamingJobsOperations
:ivar inputs: InputsOperations operations
:vartype inputs: stream_analytics_management_client.operations.InputsOperations
:ivar outputs: OutputsOperations operations
:vartype outputs: stream_analytics_management_client.operations.OutputsOperations
:ivar streaming_jobs: StreamingJobsOperations operations
:vartype streaming_jobs: stream_analytics_management_client.operations.StreamingJobsOperations
:ivar subscriptions: SubscriptionsOperations operations
:vartype subscriptions: stream_analytics_management_client.operations.SubscriptionsOperations
:ivar transformations: TransformationsOperations operations
:vartype transformations: stream_analytics_management_client.operations.TransformationsOperations
:ivar operations: Operations operations
:vartype operations: stream_analytics_management_client.operations.Operations
:ivar functions: FunctionsOperations operations
:vartype functions: stream_analytics_management_client.operations.FunctionsOperations
:ivar subscriptions: SubscriptionsOperations operations
:vartype subscriptions: stream_analytics_management_client.operations.SubscriptionsOperations
:ivar clusters: ClustersOperations operations
:vartype clusters: stream_analytics_management_client.operations.ClustersOperations
:ivar private_endpoints: PrivateEndpointsOperations operations
Expand Down Expand Up @@ -77,25 +78,43 @@ def __init__(
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.functions = FunctionsOperations(
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.streaming_jobs = StreamingJobsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.subscriptions = SubscriptionsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.transformations = TransformationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
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, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
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.0rc1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-03-01"
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 8b58ff7

Please sign in to comment.