Skip to content

Commit

Permalink
CodeGen from PR 24107 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 7690350eeab865a9731b4b71c2d9b29e58dbad0b into dad7d3cc55a6309bd5a35327bf24e3fb363f4777
  • Loading branch information
SDKAuto committed May 24, 2023
1 parent 74fee8d commit 8ba69df
Show file tree
Hide file tree
Showing 159 changed files with 2,121 additions and 784 deletions.
6 changes: 3 additions & 3 deletions sdk/appcontainers/azure-mgmt-appcontainers/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "3c639105c011765893db51cbb0dda056e34dc994",
"commit": "ab767a0c0c427d79d8558dce5f9cc3d14b6a16e5",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/[email protected].8",
"@autorest/[email protected].12",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/app/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].8 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/app/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].12 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/app/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,35 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param job_name: Job Name. Required.
:type job_name: str
:param job_execution_name: Job execution name. Required.
:type job_execution_name: str
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
def __init__(
self, credential: "TokenCredential", job_name: str, job_execution_name: str, subscription_id: str, **kwargs: Any
) -> None:
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2022-11-01-preview")
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")

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

self.credential = credential
self.job_name = job_name
self.job_execution_name = job_execution_name
self.subscription_id = subscription_id
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
ConnectedEnvironmentsDaprComponentsOperations,
ConnectedEnvironmentsOperations,
ConnectedEnvironmentsStoragesOperations,
ContainerAppsAPIClientOperationsMixin,
ContainerAppsAuthConfigsOperations,
ContainerAppsDiagnosticsOperations,
ContainerAppsOperations,
Expand All @@ -46,7 +47,9 @@
from azure.core.credentials import TokenCredential


class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
class ContainerAppsAPIClient(
ContainerAppsAPIClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""ContainerAppsAPIClient.
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
Expand All @@ -73,10 +76,6 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsStoragesOperations
:ivar container_apps: ContainerAppsOperations operations
:vartype container_apps: azure.mgmt.appcontainers.operations.ContainerAppsOperations
:ivar jobs: JobsOperations operations
:vartype jobs: azure.mgmt.appcontainers.operations.JobsOperations
:ivar jobs_executions: JobsExecutionsOperations operations
:vartype jobs_executions: azure.mgmt.appcontainers.operations.JobsExecutionsOperations
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
:vartype container_apps_revisions:
azure.mgmt.appcontainers.operations.ContainerAppsRevisionsOperations
Expand All @@ -94,6 +93,10 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
azure.mgmt.appcontainers.operations.ManagedEnvironmentsDiagnosticsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.appcontainers.operations.Operations
:ivar jobs: JobsOperations operations
:vartype jobs: azure.mgmt.appcontainers.operations.JobsOperations
:ivar jobs_executions: JobsExecutionsOperations operations
:vartype jobs_executions: azure.mgmt.appcontainers.operations.JobsExecutionsOperations
:ivar managed_environments: ManagedEnvironmentsOperations operations
:vartype managed_environments:
azure.mgmt.appcontainers.operations.ManagedEnvironmentsOperations
Expand All @@ -114,11 +117,15 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
azure.mgmt.appcontainers.operations.ContainerAppsSourceControlsOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param job_name: Job Name. Required.
:type job_name: str
:param job_execution_name: Job execution name. Required.
:type job_execution_name: str
:param subscription_id: The ID of the target subscription. 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 "2022-11-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-04-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 @@ -128,12 +135,18 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
def __init__(
self,
credential: "TokenCredential",
job_name: str,
job_execution_name: str,
subscription_id: str,
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = ContainerAppsAPIClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
credential=credential,
job_name=job_name,
job_execution_name=job_execution_name,
subscription_id=subscription_id,
**kwargs
)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

Expand Down Expand Up @@ -161,8 +174,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_revisions = ContainerAppsRevisionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand All @@ -179,6 +190,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_environments = ManagedEnvironmentsOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import List, cast
from abc import ABC
from typing import List, TYPE_CHECKING, cast

from azure.core.pipeline.transport import HttpRequest

from ._configuration import ContainerAppsAPIClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core import PipelineClient

from ._serialization import Deserializer, Serializer


def _convert_request(request, files=None):
data = request.content if not files else None
Expand All @@ -28,3 +37,12 @@ def _format_url_section(template, **kwargs):
formatted_components = cast(List[str], template.split("/"))
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
template = "/".join(components)


class ContainerAppsAPIClientMixinABC(ABC):
"""DO NOT use this class. It is for internal typing use only."""

_client: "PipelineClient"
_config: ContainerAppsAPIClientConfiguration
_serialize: "Serializer"
_deserialize: "Deserializer"
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 = "3.0.0b1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,40 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param job_name: Job Name. Required.
:type job_name: str
:param job_execution_name: Job execution name. Required.
:type job_execution_name: str
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
def __init__(
self,
credential: "AsyncTokenCredential",
job_name: str,
job_execution_name: str,
subscription_id: str,
**kwargs: Any
) -> None:
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2022-11-01-preview")
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")

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

self.credential = credential
self.job_name = job_name
self.job_execution_name = job_execution_name
self.subscription_id = subscription_id
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
ConnectedEnvironmentsDaprComponentsOperations,
ConnectedEnvironmentsOperations,
ConnectedEnvironmentsStoragesOperations,
ContainerAppsAPIClientOperationsMixin,
ContainerAppsAuthConfigsOperations,
ContainerAppsDiagnosticsOperations,
ContainerAppsOperations,
Expand All @@ -46,7 +47,9 @@
from azure.core.credentials_async import AsyncTokenCredential


class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
class ContainerAppsAPIClient(
ContainerAppsAPIClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""ContainerAppsAPIClient.
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
Expand All @@ -73,10 +76,6 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
azure.mgmt.appcontainers.aio.operations.ConnectedEnvironmentsStoragesOperations
:ivar container_apps: ContainerAppsOperations operations
:vartype container_apps: azure.mgmt.appcontainers.aio.operations.ContainerAppsOperations
:ivar jobs: JobsOperations operations
:vartype jobs: azure.mgmt.appcontainers.aio.operations.JobsOperations
:ivar jobs_executions: JobsExecutionsOperations operations
:vartype jobs_executions: azure.mgmt.appcontainers.aio.operations.JobsExecutionsOperations
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
:vartype container_apps_revisions:
azure.mgmt.appcontainers.aio.operations.ContainerAppsRevisionsOperations
Expand All @@ -94,6 +93,10 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentsDiagnosticsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.appcontainers.aio.operations.Operations
:ivar jobs: JobsOperations operations
:vartype jobs: azure.mgmt.appcontainers.aio.operations.JobsOperations
:ivar jobs_executions: JobsExecutionsOperations operations
:vartype jobs_executions: azure.mgmt.appcontainers.aio.operations.JobsExecutionsOperations
:ivar managed_environments: ManagedEnvironmentsOperations operations
:vartype managed_environments:
azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentsOperations
Expand All @@ -114,11 +117,15 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
azure.mgmt.appcontainers.aio.operations.ContainerAppsSourceControlsOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param job_name: Job Name. Required.
:type job_name: str
:param job_execution_name: Job execution name. Required.
:type job_execution_name: str
:param subscription_id: The ID of the target subscription. 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 "2022-11-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-04-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 @@ -128,12 +135,18 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
def __init__(
self,
credential: "AsyncTokenCredential",
job_name: str,
job_execution_name: str,
subscription_id: str,
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = ContainerAppsAPIClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
credential=credential,
job_name=job_name,
job_execution_name=job_execution_name,
subscription_id=subscription_id,
**kwargs
)
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

Expand Down Expand Up @@ -161,8 +174,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_revisions = ContainerAppsRevisionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand All @@ -179,6 +190,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_environments = ManagedEnvironmentsOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from abc import ABC
from typing import TYPE_CHECKING

from azure.core.pipeline.transport import HttpRequest

from ._configuration import ContainerAppsAPIClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core import AsyncPipelineClient

from .._serialization import Deserializer, Serializer


class ContainerAppsAPIClientMixinABC(ABC):
"""DO NOT use this class. It is for internal typing use only."""

_client: "AsyncPipelineClient"
_config: ContainerAppsAPIClientConfiguration
_serialize: "Serializer"
_deserialize: "Deserializer"
Loading

0 comments on commit 8ba69df

Please sign in to comment.