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 containerregistry/resource-manager] Renamed BuildTask to FileTask and RunTask to EncodedTask in Azure Container registry Build GA swagger #3210

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2017-03-01: :mod:`v2017_03_01.models<azure.mgmt.containerregistry.v2017_03_01.models>`
* 2017-10-01: :mod:`v2017_10_01.models<azure.mgmt.containerregistry.v2017_10_01.models>`
* 2017-10-01: :mod:`v2018_02_01_preview.models<azure.mgmt.containerregistry.v2018_02_01_preview.models>`
* 2017-10-01: :mod:`v2018_09_01.models<azure.mgmt.containerregistry.v2018_09_01.models>`
"""
if api_version == '2017-03-01':
from .v2017_03_01 import models
Expand All @@ -108,6 +109,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2017-10-01':
from .v2018_02_01_preview import models
return models
elif api_version == '2017-10-01':
from .v2018_09_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -156,6 +160,7 @@ def operations(self):
* 2017-03-01: :class:`Operations<azure.mgmt.containerregistry.v2017_03_01.operations.Operations>`
* 2017-10-01: :class:`Operations<azure.mgmt.containerregistry.v2017_10_01.operations.Operations>`
* 2017-10-01: :class:`Operations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.Operations>`
* 2017-10-01: :class:`Operations<azure.mgmt.containerregistry.v2018_09_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-03-01':
Expand All @@ -164,6 +169,8 @@ def operations(self):
from .v2017_10_01.operations import Operations as OperationClass
elif api_version == '2017-10-01':
from .v2018_02_01_preview.operations import Operations as OperationClass
elif api_version == '2017-10-01':
from .v2018_09_01.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -175,6 +182,7 @@ def registries(self):
* 2017-03-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2017_03_01.operations.RegistriesOperations>`
* 2017-10-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2017_10_01.operations.RegistriesOperations>`
* 2017-10-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.RegistriesOperations>`
* 2017-10-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2018_09_01.operations.RegistriesOperations>`
"""
api_version = self._get_api_version('registries')
if api_version == '2017-03-01':
Expand All @@ -183,6 +191,8 @@ def registries(self):
from .v2017_10_01.operations import RegistriesOperations as OperationClass
elif api_version == '2017-10-01':
from .v2018_02_01_preview.operations import RegistriesOperations as OperationClass
elif api_version == '2017-10-01':
from .v2018_09_01.operations import RegistriesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -193,12 +203,41 @@ def replications(self):

* 2017-10-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2017_10_01.operations.ReplicationsOperations>`
* 2017-10-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.ReplicationsOperations>`
* 2017-10-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2018_09_01.operations.ReplicationsOperations>`
"""
api_version = self._get_api_version('replications')
if api_version == '2017-10-01':
from .v2017_10_01.operations import ReplicationsOperations as OperationClass
elif api_version == '2017-10-01':
from .v2018_02_01_preview.operations import ReplicationsOperations as OperationClass
elif api_version == '2017-10-01':
from .v2018_09_01.operations import ReplicationsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def runs(self):
"""Instance depends on the API version:

* 2017-10-01: :class:`RunsOperations<azure.mgmt.containerregistry.v2018_09_01.operations.RunsOperations>`
"""
api_version = self._get_api_version('runs')
if api_version == '2017-10-01':
from .v2018_09_01.operations import RunsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def tasks(self):
"""Instance depends on the API version:

* 2017-10-01: :class:`TasksOperations<azure.mgmt.containerregistry.v2018_09_01.operations.TasksOperations>`
"""
api_version = self._get_api_version('tasks')
if api_version == '2017-10-01':
from .v2018_09_01.operations import TasksOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -209,12 +248,15 @@ def webhooks(self):

* 2017-10-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2017_10_01.operations.WebhooksOperations>`
* 2017-10-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.WebhooksOperations>`
* 2017-10-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2018_09_01.operations.WebhooksOperations>`
"""
api_version = self._get_api_version('webhooks')
if api_version == '2017-10-01':
from .v2017_10_01.operations import WebhooksOperations as OperationClass
elif api_version == '2017-10-01':
from .v2018_02_01_preview.operations import WebhooksOperations as OperationClass
elif api_version == '2017-10-01':
from .v2018_09_01.operations import WebhooksOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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 .container_registry_management_client import ContainerRegistryManagementClient
from .version import VERSION

__all__ = ['ContainerRegistryManagementClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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 msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.registries_operations import RegistriesOperations
from .operations.operations import Operations
from .operations.replications_operations import ReplicationsOperations
from .operations.webhooks_operations import WebhooksOperations
from .operations.runs_operations import RunsOperations
from .operations.tasks_operations import TasksOperations
from . import models


class ContainerRegistryManagementClientConfiguration(AzureConfiguration):
"""Configuration for ContainerRegistryManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The Microsoft Azure subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(ContainerRegistryManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-containerregistry/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class ContainerRegistryManagementClient(SDKClient):
"""ContainerRegistryManagementClient

:ivar config: Configuration for client.
:vartype config: ContainerRegistryManagementClientConfiguration

:ivar registries: Registries operations
:vartype registries: azure.mgmt.containerregistry.v2018_09_01.operations.RegistriesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.containerregistry.v2018_09_01.operations.Operations
:ivar replications: Replications operations
:vartype replications: azure.mgmt.containerregistry.v2018_09_01.operations.ReplicationsOperations
:ivar webhooks: Webhooks operations
:vartype webhooks: azure.mgmt.containerregistry.v2018_09_01.operations.WebhooksOperations
:ivar runs: Runs operations
:vartype runs: azure.mgmt.containerregistry.v2018_09_01.operations.RunsOperations
:ivar tasks: Tasks operations
:vartype tasks: azure.mgmt.containerregistry.v2018_09_01.operations.TasksOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The Microsoft Azure subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = ContainerRegistryManagementClientConfiguration(credentials, subscription_id, base_url)
super(ContainerRegistryManagementClient, self).__init__(self.config.credentials, self.config)

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.registries = RegistriesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.replications = ReplicationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.webhooks = WebhooksOperations(
self._client, self.config, self._serialize, self._deserialize)
self.runs = RunsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.tasks = TasksOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading