Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-appcontainers] fix description for endTime in JobExecution #3787

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "3a808f6fdd1f6122e07cdcdf3823db922548a5d5",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.8",
"@autorest/python@6.5.0",
"@autorest/modelerfour@4.24.3"
],
"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/python@6.4.8 --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.5.0 --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 @@ -29,14 +29,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-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:
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.")
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 @@ -118,7 +121,7 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
: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 Down Expand Up @@ -161,8 +164,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 +180,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 @@ -29,14 +29,14 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
: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:
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.")
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 @@ -118,7 +121,7 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
: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 Down Expand Up @@ -161,8 +164,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 +180,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"
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
from ._connected_environments_dapr_components_operations import ConnectedEnvironmentsDaprComponentsOperations
from ._connected_environments_storages_operations import ConnectedEnvironmentsStoragesOperations
from ._container_apps_operations import ContainerAppsOperations
from ._jobs_operations import JobsOperations
from ._jobs_executions_operations import JobsExecutionsOperations
from ._container_apps_revisions_operations import ContainerAppsRevisionsOperations
from ._container_apps_revision_replicas_operations import ContainerAppsRevisionReplicasOperations
from ._container_apps_diagnostics_operations import ContainerAppsDiagnosticsOperations
from ._managed_environment_diagnostics_operations import ManagedEnvironmentDiagnosticsOperations
from ._managed_environments_diagnostics_operations import ManagedEnvironmentsDiagnosticsOperations
from ._operations import Operations
from ._jobs_operations import JobsOperations
from ._jobs_executions_operations import JobsExecutionsOperations
from ._container_apps_api_client_operations import ContainerAppsAPIClientOperationsMixin
from ._managed_environments_operations import ManagedEnvironmentsOperations
from ._certificates_operations import CertificatesOperations
from ._managed_certificates_operations import ManagedCertificatesOperations
Expand All @@ -43,14 +44,15 @@
"ConnectedEnvironmentsDaprComponentsOperations",
"ConnectedEnvironmentsStoragesOperations",
"ContainerAppsOperations",
"JobsOperations",
"JobsExecutionsOperations",
"ContainerAppsRevisionsOperations",
"ContainerAppsRevisionReplicasOperations",
"ContainerAppsDiagnosticsOperations",
"ManagedEnvironmentDiagnosticsOperations",
"ManagedEnvironmentsDiagnosticsOperations",
"Operations",
"JobsOperations",
"JobsExecutionsOperations",
"ContainerAppsAPIClientOperationsMixin",
"ManagedEnvironmentsOperations",
"CertificatesOperations",
"ManagedCertificatesOperations",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._available_workload_profiles_operations import build_get_request
from .._vendor import ContainerAppsAPIClientMixinABC

T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._billing_meters_operations import build_get_request
from .._vendor import ContainerAppsAPIClientMixinABC

T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
import urllib.parse

Expand Down Expand Up @@ -35,6 +36,7 @@
build_list_request,
build_update_request,
)
from .._vendor import ContainerAppsAPIClientMixinABC

T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand Down Expand Up @@ -338,7 +340,7 @@ async def create_or_update(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(certificate_envelope, (IO, bytes)):
if isinstance(certificate_envelope, (IOBase, bytes)):
_content = certificate_envelope
else:
if certificate_envelope is not None:
Expand Down Expand Up @@ -566,7 +568,7 @@ async def update(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(certificate_envelope, (IO, bytes)):
if isinstance(certificate_envelope, (IOBase, bytes)):
_content = certificate_envelope
else:
_json = self._serialize.body(certificate_envelope, "CertificatePatch")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
import urllib.parse

Expand Down Expand Up @@ -35,6 +36,7 @@
build_list_request,
build_update_request,
)
from .._vendor import ContainerAppsAPIClientMixinABC

T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand Down Expand Up @@ -338,7 +340,7 @@ async def create_or_update(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(certificate_envelope, (IO, bytes)):
if isinstance(certificate_envelope, (IOBase, bytes)):
_content = certificate_envelope
else:
if certificate_envelope is not None:
Expand Down Expand Up @@ -566,7 +568,7 @@ async def update(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(certificate_envelope, (IO, bytes)):
if isinstance(certificate_envelope, (IOBase, bytes)):
_content = certificate_envelope
else:
_json = self._serialize.body(certificate_envelope, "CertificatePatch")
Expand Down
Loading