Skip to content

Commit

Permalink
CodeGen from PR 19054 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 24b33bae899053f1eef920d9b07962acce55cbe5 into a33bd39771914b2f62d2a422af044a32e54a86b1
  • Loading branch information
SDKAuto committed May 13, 2022
1 parent 8c7d2c8 commit 38e766e
Show file tree
Hide file tree
Showing 40 changed files with 5,594 additions and 1,850 deletions.
6 changes: 3 additions & 3 deletions sdk/app/azure-mgmt-app/_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.13.0",
"@autorest/[email protected]"
],
"commit": "4ac6be1b22f88bfbb6ca3e294e73538bcac90b49",
"commit": "0a2381601a52cb94dac0f9ec8b15ba8a5f479548",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/app/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/[email protected] --version=3.7.2",
"autorest_command": "autorest specification/app/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/app/resource-manager/readme.md"
}
9 changes: 7 additions & 2 deletions sdk/app/azure-mgmt-app/azure/mgmt/app/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials import TokenCredential


class ContainerAppsAPIClientConfiguration(Configuration):
class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for ContainerAppsAPIClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,6 +29,9 @@ class ContainerAppsAPIClientConfiguration(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 "2022-05-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(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-05-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 = "2022-01-01-preview"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-app/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
73 changes: 45 additions & 28 deletions sdk/app/azure-mgmt-app/azure/mgmt/app/_container_apps_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,68 @@
# --------------------------------------------------------------------------

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 ContainerAppsAPIClientConfiguration
from .operations import CertificatesOperations, ContainerAppsAuthConfigsOperations, ContainerAppsOperations, ContainerAppsRevisionReplicasOperations, ContainerAppsRevisionsOperations, ContainerAppsSourceControlsOperations, DaprComponentsOperations, ManagedEnvironmentsOperations, ManagedEnvironmentsStoragesOperations, Operations
from .operations import CertificatesOperations, ContainerAppsAuthConfigsOperations, ContainerAppsDiagnosticsOperations, ContainerAppsOperations, ContainerAppsRevisionReplicasOperations, ContainerAppsRevisionsOperations, ContainerAppsSourceControlsOperations, DaprComponentsOperations, ManagedEnvironmentDiagnosticsOperations, ManagedEnvironmentsDiagnosticsOperations, ManagedEnvironmentsOperations, ManagedEnvironmentsStoragesOperations, NamespacesOperations, Operations

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

class ContainerAppsAPIClient:
class ContainerAppsAPIClient: # pylint: disable=too-many-instance-attributes
"""ContainerAppsAPIClient.
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
:vartype container_apps_auth_configs:
azure.mgmt.app.operations.ContainerAppsAuthConfigsOperations
:ivar container_apps: ContainerAppsOperations operations
:vartype container_apps: container_apps_api_client.operations.ContainerAppsOperations
:vartype container_apps: azure.mgmt.app.operations.ContainerAppsOperations
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
:vartype container_apps_revisions:
container_apps_api_client.operations.ContainerAppsRevisionsOperations
:vartype container_apps_revisions: azure.mgmt.app.operations.ContainerAppsRevisionsOperations
:ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations
:vartype container_apps_revision_replicas:
container_apps_api_client.operations.ContainerAppsRevisionReplicasOperations
azure.mgmt.app.operations.ContainerAppsRevisionReplicasOperations
:ivar dapr_components: DaprComponentsOperations operations
:vartype dapr_components: azure.mgmt.app.operations.DaprComponentsOperations
:ivar container_apps_diagnostics: ContainerAppsDiagnosticsOperations operations
:vartype container_apps_diagnostics:
azure.mgmt.app.operations.ContainerAppsDiagnosticsOperations
:ivar managed_environment_diagnostics: ManagedEnvironmentDiagnosticsOperations operations
:vartype managed_environment_diagnostics:
azure.mgmt.app.operations.ManagedEnvironmentDiagnosticsOperations
:ivar managed_environments_diagnostics: ManagedEnvironmentsDiagnosticsOperations operations
:vartype managed_environments_diagnostics:
azure.mgmt.app.operations.ManagedEnvironmentsDiagnosticsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.app.operations.Operations
:ivar managed_environments: ManagedEnvironmentsOperations operations
:vartype managed_environments:
container_apps_api_client.operations.ManagedEnvironmentsOperations
:vartype managed_environments: azure.mgmt.app.operations.ManagedEnvironmentsOperations
:ivar certificates: CertificatesOperations operations
:vartype certificates: container_apps_api_client.operations.CertificatesOperations
:ivar operations: Operations operations
:vartype operations: container_apps_api_client.operations.Operations
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
:vartype container_apps_source_controls:
container_apps_api_client.operations.ContainerAppsSourceControlsOperations
:ivar dapr_components: DaprComponentsOperations operations
:vartype dapr_components: container_apps_api_client.operations.DaprComponentsOperations
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
:vartype container_apps_auth_configs:
container_apps_api_client.operations.ContainerAppsAuthConfigsOperations
:vartype certificates: azure.mgmt.app.operations.CertificatesOperations
:ivar namespaces: NamespacesOperations operations
:vartype namespaces: azure.mgmt.app.operations.NamespacesOperations
:ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations
:vartype managed_environments_storages:
container_apps_api_client.operations.ManagedEnvironmentsStoragesOperations
azure.mgmt.app.operations.ManagedEnvironmentsStoragesOperations
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
:vartype container_apps_source_controls:
azure.mgmt.app.operations.ContainerAppsSourceControlsOperations
: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 "2022-05-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 @@ -74,21 +87,25 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_revisions = ContainerAppsRevisionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(self._client, self._config, self._serialize, self._deserialize)
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_diagnostics = ContainerAppsDiagnosticsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_environment_diagnostics = ManagedEnvironmentDiagnosticsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_environments_diagnostics = ManagedEnvironmentsDiagnosticsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.managed_environments = ManagedEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(self._client, self._config, self._serialize, self._deserialize)
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize)
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(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
22 changes: 13 additions & 9 deletions sdk/app/azure-mgmt-app/azure/mgmt/app/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2022-01-01-preview",
"total_api_version_list": ["2022-01-01-preview"],
"chosen_version": "2022-05-01",
"total_api_version_list": ["2022-05-01"],
"client": {
"name": "ContainerAppsAPIClient",
"filename": "_container_apps_api_client",
Expand All @@ -10,8 +10,8 @@
"azure_arm": 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\": [\"ContainerAppsAPIClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ContainerAppsAPIClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ContainerAppsAPIClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ContainerAppsAPIClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -97,15 +97,19 @@
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"container_apps_auth_configs": "ContainerAppsAuthConfigsOperations",
"container_apps": "ContainerAppsOperations",
"container_apps_revisions": "ContainerAppsRevisionsOperations",
"container_apps_revision_replicas": "ContainerAppsRevisionReplicasOperations",
"dapr_components": "DaprComponentsOperations",
"container_apps_diagnostics": "ContainerAppsDiagnosticsOperations",
"managed_environment_diagnostics": "ManagedEnvironmentDiagnosticsOperations",
"managed_environments_diagnostics": "ManagedEnvironmentsDiagnosticsOperations",
"operations": "Operations",
"managed_environments": "ManagedEnvironmentsOperations",
"certificates": "CertificatesOperations",
"operations": "Operations",
"container_apps_source_controls": "ContainerAppsSourceControlsOperations",
"dapr_components": "DaprComponentsOperations",
"container_apps_auth_configs": "ContainerAppsAuthConfigsOperations",
"managed_environments_storages": "ManagedEnvironmentsStoragesOperations"
"namespaces": "NamespacesOperations",
"managed_environments_storages": "ManagedEnvironmentsStoragesOperations",
"container_apps_source_controls": "ContainerAppsSourceControlsOperations"
}
}
2 changes: 1 addition & 1 deletion sdk/app/azure-mgmt-app/azure/mgmt/app/_version.py
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.0b2"
VERSION = "1.0.0b1"
9 changes: 7 additions & 2 deletions sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials_async import AsyncTokenCredential


class ContainerAppsAPIClientConfiguration(Configuration):
class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for ContainerAppsAPIClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,6 +29,9 @@ class ContainerAppsAPIClientConfiguration(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 "2022-05-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(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-05-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 = "2022-01-01-preview"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-app/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Loading

0 comments on commit 38e766e

Please sign in to comment.