Skip to content

Commit

Permalink
CodeGen from PR 21683 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Release app microsoft.app 2022 10 01 (Azure#21683)

* Adds base for updating Microsoft.App from version preview/2022-06-01-preview to version 2022-10-01

* Updates readme

* Updates API version in new specs and examples

* Add AppState and LatestReadyRevisionName (Azure#21034)

* Add new props

* add defaults

* Add swagger for client cert & CORS policy (Azure#21126)

* Fix password format of env domain for 2022-10-01 (Azure#21463)

* fix

* fix

* Remove AppState property as we decided to postpone it (Azure#21483)

* Remove AppState property as we decided to postpone it

* Fix swagger issues

* More swagger fixes

* s360 swagger correctness fixes (Azure#21472)

Co-authored-by: Nan Jiang <naji@microsoft.com>

* Add kind for managed environment (Azure#21589)

* add

* fix

* fix (Azure#21730)

* fix (Azure#21747)

Co-authored-by: p-bouchon <107427816+p-bouchon@users.noreply.github.com>
Co-authored-by: Ruslan Yakushev <1664475+ruslany@users.noreply.github.com>
Co-authored-by: zhenqxuMSFT <zhenqxu@microsoft.com>
Co-authored-by: najian <jiangnan8924@gmail.com>
Co-authored-by: Nan Jiang <naji@microsoft.com>
  • Loading branch information
6 people committed Dec 8, 2022
1 parent 3ab4d2b commit 36860f7
Show file tree
Hide file tree
Showing 133 changed files with 6,631 additions and 1,653 deletions.
8 changes: 4 additions & 4 deletions sdk/appcontainers/azure-mgmt-appcontainers/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "df77748f7dff3fe12c13b7262e9b307c719e6918",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.1.9",
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
],
"commit": "339675bcbc8172eacbe283470405e1e578632afc",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/app/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.9 --use=@autorest/modelerfour@4.24.3 --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/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --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 @@ -13,12 +13,14 @@

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
from ._patch import * # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = ["ContainerAppsAPIClient"]
__all__ = [
"ContainerAppsAPIClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# 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 @@ -14,6 +15,11 @@

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 @@ -29,14 +35,14 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2022-10-01". 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:
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop("api_version", "2022-06-01-preview") # type: str
api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -50,10 +56,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
kwargs.setdefault("sdk_moniker", "mgmt-appcontainers/{}".format(VERSION))
self._configure(**kwargs)

def _configure(
self, **kwargs # type: Any
):
# type: (...) -> None
def _configure(self, **kwargs: Any) -> None:
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient

from . import models
from . import models as _models
from ._configuration import ContainerAppsAPIClientConfiguration
from ._serialization import Deserializer, Serializer
from .operations import (
Expand Down Expand Up @@ -49,6 +49,25 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
:vartype container_apps_auth_configs:
azure.mgmt.appcontainers.operations.ContainerAppsAuthConfigsOperations
:ivar available_workload_profiles: AvailableWorkloadProfilesOperations operations
:vartype available_workload_profiles:
azure.mgmt.appcontainers.operations.AvailableWorkloadProfilesOperations
:ivar billing_meters: BillingMetersOperations operations
:vartype billing_meters: azure.mgmt.appcontainers.operations.BillingMetersOperations
:ivar connected_environments: ConnectedEnvironmentsOperations operations
:vartype connected_environments:
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsOperations
:ivar connected_environments_certificates: ConnectedEnvironmentsCertificatesOperations
operations
:vartype connected_environments_certificates:
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsCertificatesOperations
:ivar connected_environments_dapr_components: ConnectedEnvironmentsDaprComponentsOperations
operations
:vartype connected_environments_dapr_components:
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsDaprComponentsOperations
:ivar connected_environments_storages: ConnectedEnvironmentsStoragesOperations operations
:vartype connected_environments_storages:
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsStoragesOperations
:ivar container_apps: ContainerAppsOperations operations
:vartype container_apps: azure.mgmt.appcontainers.operations.ContainerAppsOperations
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
Expand All @@ -57,8 +76,6 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
:ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations
:vartype container_apps_revision_replicas:
azure.mgmt.appcontainers.operations.ContainerAppsRevisionReplicasOperations
:ivar dapr_components: DaprComponentsOperations operations
:vartype dapr_components: azure.mgmt.appcontainers.operations.DaprComponentsOperations
:ivar container_apps_diagnostics: ContainerAppsDiagnosticsOperations operations
:vartype container_apps_diagnostics:
azure.mgmt.appcontainers.operations.ContainerAppsDiagnosticsOperations
Expand All @@ -77,39 +94,22 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
:vartype certificates: azure.mgmt.appcontainers.operations.CertificatesOperations
:ivar namespaces: NamespacesOperations operations
:vartype namespaces: azure.mgmt.appcontainers.operations.NamespacesOperations
:ivar dapr_components: DaprComponentsOperations operations
:vartype dapr_components: azure.mgmt.appcontainers.operations.DaprComponentsOperations
:ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations
:vartype managed_environments_storages:
azure.mgmt.appcontainers.operations.ManagedEnvironmentsStoragesOperations
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
:vartype container_apps_source_controls:
azure.mgmt.appcontainers.operations.ContainerAppsSourceControlsOperations
:ivar connected_environments: ConnectedEnvironmentsOperations operations
:vartype connected_environments:
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsOperations
:ivar connected_environments_certificates: ConnectedEnvironmentsCertificatesOperations
operations
:vartype connected_environments_certificates:
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsCertificatesOperations
:ivar connected_environments_dapr_components: ConnectedEnvironmentsDaprComponentsOperations
operations
:vartype connected_environments_dapr_components:
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsDaprComponentsOperations
:ivar connected_environments_storages: ConnectedEnvironmentsStoragesOperations operations
:vartype connected_environments_storages:
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsStoragesOperations
:ivar available_workload_profiles: AvailableWorkloadProfilesOperations operations
:vartype available_workload_profiles:
azure.mgmt.appcontainers.operations.AvailableWorkloadProfilesOperations
:ivar billing_meters: BillingMetersOperations operations
:vartype billing_meters: azure.mgmt.appcontainers.operations.BillingMetersOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
: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-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2022-10-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 @@ -127,21 +127,36 @@ def __init__(
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
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.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.available_workload_profiles = AvailableWorkloadProfilesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.billing_meters = BillingMetersOperations(self._client, self._config, self._serialize, self._deserialize)
self.connected_environments = ConnectedEnvironmentsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.connected_environments_certificates = ConnectedEnvironmentsCertificatesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.connected_environments_dapr_components = ConnectedEnvironmentsDaprComponentsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.connected_environments_storages = ConnectedEnvironmentsStoragesOperations(
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
)
Expand All @@ -157,28 +172,13 @@ def __init__(
)
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
self.dapr_components = DaprComponentsOperations(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
)
self.connected_environments = ConnectedEnvironmentsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.connected_environments_certificates = ConnectedEnvironmentsCertificatesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.connected_environments_dapr_components = ConnectedEnvironmentsDaprComponentsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.connected_environments_storages = ConnectedEnvironmentsStoragesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.available_workload_profiles = AvailableWorkloadProfilesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.billing_meters = BillingMetersOperations(self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand All @@ -202,15 +202,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)

def close(self):
# type: () -> None
def close(self) -> None:
self._client.close()

def __enter__(self):
# type: () -> ContainerAppsAPIClient
def __enter__(self) -> "ContainerAppsAPIClient":
self._client.__enter__()
return self

def __exit__(self, *exc_details):
# type: (Any) -> None
def __exit__(self, *exc_details) -> None:
self._client.__exit__(*exc_details)
Loading

0 comments on commit 36860f7

Please sign in to comment.