diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py index 6cc46c2522ff..46a16fb7e898 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py @@ -97,7 +97,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2017-03-01: :mod:`v2017_03_01.models` * 2017-10-01: :mod:`v2017_10_01.models` - * 2018-02-01-preview: :mod:`v2018_02_01_preview.models` + * 2017-10-01: :mod:`v2018_02_01_preview.models` + * 2017-10-01: :mod:`v2018_09_01.models` """ if api_version == '2017-03-01': from .v2017_03_01 import models @@ -105,19 +106,22 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2017-10-01': from .v2017_10_01 import models return models - elif api_version == '2018-02-01-preview': + 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 def build_steps(self): """Instance depends on the API version: - * 2018-02-01-preview: :class:`BuildStepsOperations` + * 2017-10-01: :class:`BuildStepsOperations` """ api_version = self._get_api_version('build_steps') - if api_version == '2018-02-01-preview': + if api_version == '2017-10-01': from .v2018_02_01_preview.operations import BuildStepsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) @@ -127,10 +131,10 @@ def build_steps(self): def build_tasks(self): """Instance depends on the API version: - * 2018-02-01-preview: :class:`BuildTasksOperations` + * 2017-10-01: :class:`BuildTasksOperations` """ api_version = self._get_api_version('build_tasks') - if api_version == '2018-02-01-preview': + if api_version == '2017-10-01': from .v2018_02_01_preview.operations import BuildTasksOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) @@ -140,10 +144,10 @@ def build_tasks(self): def builds(self): """Instance depends on the API version: - * 2018-02-01-preview: :class:`BuildsOperations` + * 2017-10-01: :class:`BuildsOperations` """ api_version = self._get_api_version('builds') - if api_version == '2018-02-01-preview': + if api_version == '2017-10-01': from .v2018_02_01_preview.operations import BuildsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) @@ -155,15 +159,18 @@ def operations(self): * 2017-03-01: :class:`Operations` * 2017-10-01: :class:`Operations` - * 2018-02-01-preview: :class:`Operations` + * 2017-10-01: :class:`Operations` + * 2017-10-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2017-03-01': from .v2017_03_01.operations import Operations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import Operations as OperationClass - elif api_version == '2018-02-01-preview': + 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))) @@ -174,15 +181,18 @@ def registries(self): * 2017-03-01: :class:`RegistriesOperations` * 2017-10-01: :class:`RegistriesOperations` - * 2018-02-01-preview: :class:`RegistriesOperations` + * 2017-10-01: :class:`RegistriesOperations` + * 2017-10-01: :class:`RegistriesOperations` """ api_version = self._get_api_version('registries') if api_version == '2017-03-01': from .v2017_03_01.operations import RegistriesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import RegistriesOperations as OperationClass - elif api_version == '2018-02-01-preview': + 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))) @@ -192,13 +202,42 @@ def replications(self): """Instance depends on the API version: * 2017-10-01: :class:`ReplicationsOperations` - * 2018-02-01-preview: :class:`ReplicationsOperations` + * 2017-10-01: :class:`ReplicationsOperations` + * 2017-10-01: :class:`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 == '2018-02-01-preview': + 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` + """ + 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` + """ + 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))) @@ -208,13 +247,16 @@ def webhooks(self): """Instance depends on the API version: * 2017-10-01: :class:`WebhooksOperations` - * 2018-02-01-preview: :class:`WebhooksOperations` + * 2017-10-01: :class:`WebhooksOperations` + * 2017-10-01: :class:`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 == '2018-02-01-preview': + 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))) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/operations.py index d7fb26f84728..3fdb96944162 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/operations.py @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py index f5d1d26d17fd..3fbd85a74e49 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py @@ -73,6 +73,7 @@ def check_name_availability( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -85,9 +86,8 @@ def check_name_availability( body_content = self._serialize.body(registry_name_check_request, 'RegistryNameCheckRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -140,7 +140,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -149,8 +149,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -187,6 +187,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -199,9 +200,8 @@ def _create_initial( body_content = self._serialize.body(registry_create_parameters, 'RegistryCreateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -305,7 +305,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -314,8 +313,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -365,6 +364,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -377,9 +377,8 @@ def update( body_content = self._serialize.body(registry_update_parameters, 'RegistryUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -436,7 +435,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -445,9 +444,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -501,7 +499,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -510,9 +508,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -568,7 +565,7 @@ def list_credentials( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -577,8 +574,8 @@ def list_credentials( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -641,6 +638,7 @@ def regenerate_credential( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -653,9 +651,8 @@ def regenerate_credential( body_content = self._serialize.body(regenerate_credential_parameters, 'RegenerateCredentialParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/import_source.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/import_source.py index 828a6e5ca30e..4df86c249a2d 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/import_source.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/import_source.py @@ -17,9 +17,11 @@ class ImportSource(Model): All required parameters must be populated in order to send to Azure. - :param resource_id: Required. The resource identifier of the target Azure - Container Registry. + :param resource_id: The resource identifier of the source Azure Container + Registry. :type resource_id: str + :param registry_uri: The address of the source registry. + :type registry_uri: str :param source_image: Required. Repository name of the source image. Specify an image by repository ('hello-world'). This will use the 'latest' tag. @@ -30,16 +32,17 @@ class ImportSource(Model): """ _validation = { - 'resource_id': {'required': True}, 'source_image': {'required': True}, } _attribute_map = { 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'registry_uri': {'key': 'registryUri', 'type': 'str'}, 'source_image': {'key': 'sourceImage', 'type': 'str'}, } def __init__(self, **kwargs): super(ImportSource, self).__init__(**kwargs) self.resource_id = kwargs.get('resource_id', None) + self.registry_uri = kwargs.get('registry_uri', None) self.source_image = kwargs.get('source_image', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/import_source_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/import_source_py3.py index e70cc202fe9e..b64a01b46a79 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/import_source_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/import_source_py3.py @@ -17,9 +17,11 @@ class ImportSource(Model): All required parameters must be populated in order to send to Azure. - :param resource_id: Required. The resource identifier of the target Azure - Container Registry. + :param resource_id: The resource identifier of the source Azure Container + Registry. :type resource_id: str + :param registry_uri: The address of the source registry. + :type registry_uri: str :param source_image: Required. Repository name of the source image. Specify an image by repository ('hello-world'). This will use the 'latest' tag. @@ -30,16 +32,17 @@ class ImportSource(Model): """ _validation = { - 'resource_id': {'required': True}, 'source_image': {'required': True}, } _attribute_map = { 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'registry_uri': {'key': 'registryUri', 'type': 'str'}, 'source_image': {'key': 'sourceImage', 'type': 'str'}, } - def __init__(self, *, resource_id: str, source_image: str, **kwargs) -> None: + def __init__(self, *, source_image: str, resource_id: str=None, registry_uri: str=None, **kwargs) -> None: super(ImportSource, self).__init__(**kwargs) self.resource_id = resource_id + self.registry_uri = registry_uri self.source_image = source_image diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/operations.py index fe098496de23..5a7cc0c5c02b 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/operations.py @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py index b5a5e7b2dde2..9221a98c7052 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py @@ -69,9 +69,8 @@ def _import_image_initial( body_content = self._serialize.body(parameters, 'ImportImageParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -164,6 +163,7 @@ def check_name_availability( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -176,9 +176,8 @@ def check_name_availability( body_content = self._serialize.body(registry_name_check_request, 'RegistryNameCheckRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -231,7 +230,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -240,8 +239,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -278,6 +277,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -290,9 +290,8 @@ def _create_initial( body_content = self._serialize.body(registry, 'Registry') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -382,7 +381,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -391,8 +389,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -463,6 +461,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -475,9 +474,8 @@ def _update_initial( body_content = self._serialize.body(registry_update_parameters, 'RegistryUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -588,7 +586,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -597,9 +595,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -653,7 +650,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -662,9 +659,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -720,7 +716,7 @@ def list_credentials( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -729,8 +725,8 @@ def list_credentials( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -793,6 +789,7 @@ def regenerate_credential( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -805,9 +802,8 @@ def regenerate_credential( body_content = self._serialize.body(regenerate_credential_parameters, 'RegenerateCredentialParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -861,7 +857,7 @@ def list_usages( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -870,8 +866,8 @@ def list_usages( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -925,7 +921,7 @@ def list_policies( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -934,8 +930,8 @@ def list_policies( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -974,6 +970,7 @@ def _update_policies_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -986,9 +983,8 @@ def _update_policies_initial( body_content = self._serialize.body(registry_policies_update_parameters, 'RegistryPolicies') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py index 9293f57f62fc..2df735992f62 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py @@ -76,7 +76,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -85,8 +85,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -126,6 +126,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -138,9 +139,8 @@ def _create_initial( body_content = self._serialize.body(replication, 'Replication') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -238,7 +238,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -247,8 +246,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -325,6 +324,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -337,9 +337,8 @@ def _update_initial( body_content = self._serialize.body(replication_update_parameters, 'ReplicationUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -455,7 +454,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -464,9 +463,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py index 7424d54d20f3..b5f3f1e35f23 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py @@ -76,7 +76,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -85,8 +85,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -124,6 +124,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -136,9 +137,8 @@ def _create_initial( body_content = self._serialize.body(webhook_create_parameters, 'WebhookCreateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -234,7 +234,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -243,8 +242,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -319,6 +318,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -331,9 +331,8 @@ def _update_initial( body_content = self._serialize.body(webhook_update_parameters, 'WebhookUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -450,7 +449,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -459,9 +458,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -518,7 +516,7 @@ def ping( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -527,8 +525,8 @@ def ping( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -586,7 +584,7 @@ def get_callback_config( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -595,8 +593,8 @@ def get_callback_config( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -659,7 +657,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -668,9 +666,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/import_source.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/import_source.py index 828a6e5ca30e..4df86c249a2d 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/import_source.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/import_source.py @@ -17,9 +17,11 @@ class ImportSource(Model): All required parameters must be populated in order to send to Azure. - :param resource_id: Required. The resource identifier of the target Azure - Container Registry. + :param resource_id: The resource identifier of the source Azure Container + Registry. :type resource_id: str + :param registry_uri: The address of the source registry. + :type registry_uri: str :param source_image: Required. Repository name of the source image. Specify an image by repository ('hello-world'). This will use the 'latest' tag. @@ -30,16 +32,17 @@ class ImportSource(Model): """ _validation = { - 'resource_id': {'required': True}, 'source_image': {'required': True}, } _attribute_map = { 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'registry_uri': {'key': 'registryUri', 'type': 'str'}, 'source_image': {'key': 'sourceImage', 'type': 'str'}, } def __init__(self, **kwargs): super(ImportSource, self).__init__(**kwargs) self.resource_id = kwargs.get('resource_id', None) + self.registry_uri = kwargs.get('registry_uri', None) self.source_image = kwargs.get('source_image', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/import_source_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/import_source_py3.py index e70cc202fe9e..b64a01b46a79 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/import_source_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/import_source_py3.py @@ -17,9 +17,11 @@ class ImportSource(Model): All required parameters must be populated in order to send to Azure. - :param resource_id: Required. The resource identifier of the target Azure - Container Registry. + :param resource_id: The resource identifier of the source Azure Container + Registry. :type resource_id: str + :param registry_uri: The address of the source registry. + :type registry_uri: str :param source_image: Required. Repository name of the source image. Specify an image by repository ('hello-world'). This will use the 'latest' tag. @@ -30,16 +32,17 @@ class ImportSource(Model): """ _validation = { - 'resource_id': {'required': True}, 'source_image': {'required': True}, } _attribute_map = { 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'registry_uri': {'key': 'registryUri', 'type': 'str'}, 'source_image': {'key': 'sourceImage', 'type': 'str'}, } - def __init__(self, *, resource_id: str, source_image: str, **kwargs) -> None: + def __init__(self, *, source_image: str, resource_id: str=None, registry_uri: str=None, **kwargs) -> None: super(ImportSource, self).__init__(**kwargs) self.resource_id = resource_id + self.registry_uri = registry_uri self.source_image = source_image diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/build_steps_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/build_steps_operations.py index 638000eb398a..af710eb2efaa 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/build_steps_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/build_steps_operations.py @@ -83,7 +83,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -92,9 +92,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -156,7 +155,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -165,8 +164,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -207,6 +206,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -219,9 +219,8 @@ def _create_initial( body_content = self._serialize.body(build_step_create_parameters, 'BuildStep') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -320,7 +319,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -329,8 +327,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -412,6 +410,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -424,9 +423,8 @@ def _update_initial( body_content = self._serialize.body(build_step_update_parameters, 'BuildStepUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -556,7 +554,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -565,9 +563,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/build_tasks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/build_tasks_operations.py index 5a73ba76358e..f8a5af8876c0 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/build_tasks_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/build_tasks_operations.py @@ -89,7 +89,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -98,9 +98,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -158,7 +157,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -167,8 +166,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -206,6 +205,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -218,9 +218,8 @@ def _create_initial( body_content = self._serialize.body(build_task_create_parameters, 'BuildTask') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -316,7 +315,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -325,8 +323,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -401,6 +399,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -413,9 +412,8 @@ def _update_initial( body_content = self._serialize.body(build_task_update_parameters, 'BuildTaskUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -529,7 +527,7 @@ def list_source_repository_properties( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -538,8 +536,8 @@ def list_source_repository_properties( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/builds_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/builds_operations.py index 32e086d6f674..ff51ad18f0f5 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/builds_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/builds_operations.py @@ -94,7 +94,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -103,9 +103,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -162,7 +161,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -171,8 +170,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -212,6 +211,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -224,9 +224,8 @@ def _update_initial( body_content = self._serialize.body(build_update_parameters, 'BuildUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -339,7 +338,7 @@ def get_log_link( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -348,8 +347,8 @@ def get_log_link( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -387,7 +386,6 @@ def _cancel_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -396,8 +394,8 @@ def _cancel_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/operations.py index 47a1a7b6b3a0..669c5097c928 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/operations.py @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py index c7a73f8e0c2c..2c848bd0dcd6 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py @@ -69,9 +69,8 @@ def _import_image_initial( body_content = self._serialize.body(parameters, 'ImportImageParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -166,6 +165,7 @@ def check_name_availability( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -178,9 +178,8 @@ def check_name_availability( body_content = self._serialize.body(registry_name_check_request, 'RegistryNameCheckRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -236,7 +235,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -245,8 +244,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -285,6 +284,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -297,9 +297,8 @@ def _create_initial( body_content = self._serialize.body(registry, 'Registry') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -391,7 +390,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -400,8 +398,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -474,6 +472,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -486,9 +485,8 @@ def _update_initial( body_content = self._serialize.body(registry_update_parameters, 'RegistryUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -601,7 +599,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -610,9 +608,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -668,7 +665,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -677,9 +674,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -737,7 +733,7 @@ def list_credentials( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -746,8 +742,8 @@ def list_credentials( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -812,6 +808,7 @@ def regenerate_credential( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -824,9 +821,8 @@ def regenerate_credential( body_content = self._serialize.body(regenerate_credential_parameters, 'RegenerateCredentialParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -882,7 +878,7 @@ def list_usages( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -891,8 +887,8 @@ def list_usages( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -948,7 +944,7 @@ def list_policies( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -957,8 +953,8 @@ def list_policies( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -999,6 +995,7 @@ def _update_policies_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -1011,9 +1008,8 @@ def _update_policies_initial( body_content = self._serialize.body(registry_policies_update_parameters, 'RegistryPolicies') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -1109,6 +1105,7 @@ def _queue_build_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -1121,9 +1118,8 @@ def _queue_build_initial( body_content = self._serialize.body(build_request, 'QueueBuildRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -1231,7 +1227,7 @@ def get_build_source_upload_url( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -1240,8 +1236,8 @@ def get_build_source_upload_url( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/replications_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/replications_operations.py index b56be794ce86..5dee662e59d2 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/replications_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/replications_operations.py @@ -77,7 +77,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -86,8 +86,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -127,6 +127,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -139,9 +140,8 @@ def _create_initial( body_content = self._serialize.body(replication, 'Replication') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -239,7 +239,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -248,8 +247,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -326,6 +325,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -338,9 +338,8 @@ def _update_initial( body_content = self._serialize.body(replication_update_parameters, 'ReplicationUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -456,7 +455,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -465,9 +464,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/webhooks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/webhooks_operations.py index 66a56f0d2cc9..6ff7bf1352c4 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/webhooks_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/webhooks_operations.py @@ -77,7 +77,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -86,8 +86,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -125,6 +125,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -137,9 +138,8 @@ def _create_initial( body_content = self._serialize.body(webhook_create_parameters, 'WebhookCreateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -235,7 +235,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -244,8 +243,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -320,6 +319,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -332,9 +332,8 @@ def _update_initial( body_content = self._serialize.body(webhook_update_parameters, 'WebhookUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -451,7 +450,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -460,9 +459,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -520,7 +518,7 @@ def ping( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -529,8 +527,8 @@ def ping( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -588,7 +586,7 @@ def get_callback_config( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -597,8 +595,8 @@ def get_callback_config( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -661,7 +659,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -670,9 +668,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/__init__.py new file mode 100644 index 000000000000..511d3d37a4aa --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/__init__.py @@ -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 + diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/container_registry_management_client.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/container_registry_management_client.py new file mode 100644 index 000000000000..b97b1dce5e4e --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/container_registry_management_client.py @@ -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` + :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` + :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) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/__init__.py new file mode 100644 index 000000000000..9a72c9115d0c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/__init__.py @@ -0,0 +1,307 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from .import_source_py3 import ImportSource + from .import_image_parameters_py3 import ImportImageParameters + from .registry_name_check_request_py3 import RegistryNameCheckRequest + from .registry_name_status_py3 import RegistryNameStatus + from .operation_display_definition_py3 import OperationDisplayDefinition + from .operation_metric_specification_definition_py3 import OperationMetricSpecificationDefinition + from .operation_service_specification_definition_py3 import OperationServiceSpecificationDefinition + from .operation_definition_py3 import OperationDefinition + from .sku_py3 import Sku + from .status_py3 import Status + from .storage_account_properties_py3 import StorageAccountProperties + from .registry_py3 import Registry + from .registry_update_parameters_py3 import RegistryUpdateParameters + from .registry_password_py3 import RegistryPassword + from .registry_list_credentials_result_py3 import RegistryListCredentialsResult + from .regenerate_credential_parameters_py3 import RegenerateCredentialParameters + from .registry_usage_py3 import RegistryUsage + from .registry_usage_list_result_py3 import RegistryUsageListResult + from .quarantine_policy_py3 import QuarantinePolicy + from .trust_policy_py3 import TrustPolicy + from .registry_policies_py3 import RegistryPolicies + from .replication_py3 import Replication + from .replication_update_parameters_py3 import ReplicationUpdateParameters + from .webhook_py3 import Webhook + from .webhook_create_parameters_py3 import WebhookCreateParameters + from .webhook_update_parameters_py3 import WebhookUpdateParameters + from .event_info_py3 import EventInfo + from .callback_config_py3 import CallbackConfig + from .target_py3 import Target + from .request_py3 import Request + from .actor_py3 import Actor + from .source_py3 import Source + from .event_content_py3 import EventContent + from .event_request_message_py3 import EventRequestMessage + from .event_response_message_py3 import EventResponseMessage + from .event_py3 import Event + from .resource_py3 import Resource + from .run_request_py3 import RunRequest + from .image_descriptor_py3 import ImageDescriptor + from .image_update_trigger_py3 import ImageUpdateTrigger + from .source_trigger_descriptor_py3 import SourceTriggerDescriptor + from .platform_properties_py3 import PlatformProperties + from .agent_properties_py3 import AgentProperties + from .run_py3 import Run + from .source_upload_definition_py3 import SourceUploadDefinition + from .run_filter_py3 import RunFilter + from .run_update_parameters_py3 import RunUpdateParameters + from .run_get_log_result_py3 import RunGetLogResult + from .base_image_dependency_py3 import BaseImageDependency + from .task_step_properties_py3 import TaskStepProperties + from .auth_info_py3 import AuthInfo + from .source_properties_py3 import SourceProperties + from .source_trigger_py3 import SourceTrigger + from .base_image_trigger_py3 import BaseImageTrigger + from .trigger_properties_py3 import TriggerProperties + from .task_py3 import Task + from .platform_update_parameters_py3 import PlatformUpdateParameters + from .task_step_update_parameters_py3 import TaskStepUpdateParameters + from .auth_info_update_parameters_py3 import AuthInfoUpdateParameters + from .source_update_parameters_py3 import SourceUpdateParameters + from .source_trigger_update_parameters_py3 import SourceTriggerUpdateParameters + from .base_image_trigger_update_parameters_py3 import BaseImageTriggerUpdateParameters + from .trigger_update_parameters_py3 import TriggerUpdateParameters + from .task_update_parameters_py3 import TaskUpdateParameters + from .proxy_resource_py3 import ProxyResource + from .argument_py3 import Argument + from .docker_build_request_py3 import DockerBuildRequest + from .set_value_py3 import SetValue + from .build_task_request_py3 import BuildTaskRequest + from .task_run_request_py3 import TaskRunRequest + from .quick_task_run_request_py3 import QuickTaskRunRequest + from .docker_build_step_py3 import DockerBuildStep + from .build_task_step_py3 import BuildTaskStep + from .run_task_step_py3 import RunTaskStep + from .docker_build_step_update_parameters_py3 import DockerBuildStepUpdateParameters + from .build_task_step_update_parameters_py3 import BuildTaskStepUpdateParameters + from .run_task_step_update_parameters_py3 import RunTaskStepUpdateParameters +except (SyntaxError, ImportError): + from .import_source import ImportSource + from .import_image_parameters import ImportImageParameters + from .registry_name_check_request import RegistryNameCheckRequest + from .registry_name_status import RegistryNameStatus + from .operation_display_definition import OperationDisplayDefinition + from .operation_metric_specification_definition import OperationMetricSpecificationDefinition + from .operation_service_specification_definition import OperationServiceSpecificationDefinition + from .operation_definition import OperationDefinition + from .sku import Sku + from .status import Status + from .storage_account_properties import StorageAccountProperties + from .registry import Registry + from .registry_update_parameters import RegistryUpdateParameters + from .registry_password import RegistryPassword + from .registry_list_credentials_result import RegistryListCredentialsResult + from .regenerate_credential_parameters import RegenerateCredentialParameters + from .registry_usage import RegistryUsage + from .registry_usage_list_result import RegistryUsageListResult + from .quarantine_policy import QuarantinePolicy + from .trust_policy import TrustPolicy + from .registry_policies import RegistryPolicies + from .replication import Replication + from .replication_update_parameters import ReplicationUpdateParameters + from .webhook import Webhook + from .webhook_create_parameters import WebhookCreateParameters + from .webhook_update_parameters import WebhookUpdateParameters + from .event_info import EventInfo + from .callback_config import CallbackConfig + from .target import Target + from .request import Request + from .actor import Actor + from .source import Source + from .event_content import EventContent + from .event_request_message import EventRequestMessage + from .event_response_message import EventResponseMessage + from .event import Event + from .resource import Resource + from .run_request import RunRequest + from .image_descriptor import ImageDescriptor + from .image_update_trigger import ImageUpdateTrigger + from .source_trigger_descriptor import SourceTriggerDescriptor + from .platform_properties import PlatformProperties + from .agent_properties import AgentProperties + from .run import Run + from .source_upload_definition import SourceUploadDefinition + from .run_filter import RunFilter + from .run_update_parameters import RunUpdateParameters + from .run_get_log_result import RunGetLogResult + from .base_image_dependency import BaseImageDependency + from .task_step_properties import TaskStepProperties + from .auth_info import AuthInfo + from .source_properties import SourceProperties + from .source_trigger import SourceTrigger + from .base_image_trigger import BaseImageTrigger + from .trigger_properties import TriggerProperties + from .task import Task + from .platform_update_parameters import PlatformUpdateParameters + from .task_step_update_parameters import TaskStepUpdateParameters + from .auth_info_update_parameters import AuthInfoUpdateParameters + from .source_update_parameters import SourceUpdateParameters + from .source_trigger_update_parameters import SourceTriggerUpdateParameters + from .base_image_trigger_update_parameters import BaseImageTriggerUpdateParameters + from .trigger_update_parameters import TriggerUpdateParameters + from .task_update_parameters import TaskUpdateParameters + from .proxy_resource import ProxyResource + from .argument import Argument + from .docker_build_request import DockerBuildRequest + from .set_value import SetValue + from .build_task_request import BuildTaskRequest + from .task_run_request import TaskRunRequest + from .quick_task_run_request import QuickTaskRunRequest + from .docker_build_step import DockerBuildStep + from .build_task_step import BuildTaskStep + from .run_task_step import RunTaskStep + from .docker_build_step_update_parameters import DockerBuildStepUpdateParameters + from .build_task_step_update_parameters import BuildTaskStepUpdateParameters + from .run_task_step_update_parameters import RunTaskStepUpdateParameters +from .registry_paged import RegistryPaged +from .operation_definition_paged import OperationDefinitionPaged +from .replication_paged import ReplicationPaged +from .webhook_paged import WebhookPaged +from .event_paged import EventPaged +from .run_paged import RunPaged +from .task_paged import TaskPaged +from .container_registry_management_client_enums import ( + ImportMode, + SkuName, + SkuTier, + ProvisioningState, + PasswordName, + RegistryUsageUnit, + PolicyStatus, + TrustPolicyType, + WebhookStatus, + WebhookAction, + RunStatus, + RunType, + OS, + Architecture, + Variant, + TaskStatus, + BaseImageDependencyType, + SourceControlType, + TokenType, + SourceTriggerEvent, + TriggerStatus, + BaseImageTriggerType, +) + +__all__ = [ + 'ImportSource', + 'ImportImageParameters', + 'RegistryNameCheckRequest', + 'RegistryNameStatus', + 'OperationDisplayDefinition', + 'OperationMetricSpecificationDefinition', + 'OperationServiceSpecificationDefinition', + 'OperationDefinition', + 'Sku', + 'Status', + 'StorageAccountProperties', + 'Registry', + 'RegistryUpdateParameters', + 'RegistryPassword', + 'RegistryListCredentialsResult', + 'RegenerateCredentialParameters', + 'RegistryUsage', + 'RegistryUsageListResult', + 'QuarantinePolicy', + 'TrustPolicy', + 'RegistryPolicies', + 'Replication', + 'ReplicationUpdateParameters', + 'Webhook', + 'WebhookCreateParameters', + 'WebhookUpdateParameters', + 'EventInfo', + 'CallbackConfig', + 'Target', + 'Request', + 'Actor', + 'Source', + 'EventContent', + 'EventRequestMessage', + 'EventResponseMessage', + 'Event', + 'Resource', + 'RunRequest', + 'ImageDescriptor', + 'ImageUpdateTrigger', + 'SourceTriggerDescriptor', + 'PlatformProperties', + 'AgentProperties', + 'Run', + 'SourceUploadDefinition', + 'RunFilter', + 'RunUpdateParameters', + 'RunGetLogResult', + 'BaseImageDependency', + 'TaskStepProperties', + 'AuthInfo', + 'SourceProperties', + 'SourceTrigger', + 'BaseImageTrigger', + 'TriggerProperties', + 'Task', + 'PlatformUpdateParameters', + 'TaskStepUpdateParameters', + 'AuthInfoUpdateParameters', + 'SourceUpdateParameters', + 'SourceTriggerUpdateParameters', + 'BaseImageTriggerUpdateParameters', + 'TriggerUpdateParameters', + 'TaskUpdateParameters', + 'ProxyResource', + 'Argument', + 'DockerBuildRequest', + 'SetValue', + 'BuildTaskRequest', + 'TaskRunRequest', + 'QuickTaskRunRequest', + 'DockerBuildStep', + 'BuildTaskStep', + 'RunTaskStep', + 'DockerBuildStepUpdateParameters', + 'BuildTaskStepUpdateParameters', + 'RunTaskStepUpdateParameters', + 'RegistryPaged', + 'OperationDefinitionPaged', + 'ReplicationPaged', + 'WebhookPaged', + 'EventPaged', + 'RunPaged', + 'TaskPaged', + 'ImportMode', + 'SkuName', + 'SkuTier', + 'ProvisioningState', + 'PasswordName', + 'RegistryUsageUnit', + 'PolicyStatus', + 'TrustPolicyType', + 'WebhookStatus', + 'WebhookAction', + 'RunStatus', + 'RunType', + 'OS', + 'Architecture', + 'Variant', + 'TaskStatus', + 'BaseImageDependencyType', + 'SourceControlType', + 'TokenType', + 'SourceTriggerEvent', + 'TriggerStatus', + 'BaseImageTriggerType', +] diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/actor.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/actor.py new file mode 100644 index 000000000000..a662f9008a31 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/actor.py @@ -0,0 +1,30 @@ +# 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.serialization import Model + + +class Actor(Model): + """The agent that initiated the event. For most situations, this could be from + the authorization context of the request. + + :param name: The subject or username associated with the request context + that generated the event. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Actor, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/actor_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/actor_py3.py new file mode 100644 index 000000000000..fdd8b96dda52 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/actor_py3.py @@ -0,0 +1,30 @@ +# 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.serialization import Model + + +class Actor(Model): + """The agent that initiated the event. For most situations, this could be from + the authorization context of the request. + + :param name: The subject or username associated with the request context + that generated the event. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(Actor, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/agent_properties.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/agent_properties.py new file mode 100644 index 000000000000..c002042a921b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/agent_properties.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class AgentProperties(Model): + """The properties that determine the run agent configuration. + + :param cpu: The CPU configuration in terms of number of cores required for + the run. + :type cpu: int + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AgentProperties, self).__init__(**kwargs) + self.cpu = kwargs.get('cpu', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/agent_properties_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/agent_properties_py3.py new file mode 100644 index 000000000000..055a36946db8 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/agent_properties_py3.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class AgentProperties(Model): + """The properties that determine the run agent configuration. + + :param cpu: The CPU configuration in terms of number of cores required for + the run. + :type cpu: int + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'int'}, + } + + def __init__(self, *, cpu: int=None, **kwargs) -> None: + super(AgentProperties, self).__init__(**kwargs) + self.cpu = cpu diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/argument.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/argument.py new file mode 100644 index 000000000000..d081a86245b0 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/argument.py @@ -0,0 +1,44 @@ +# 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.serialization import Model + + +class Argument(Model): + """The properties of a run argument. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the argument. + :type name: str + :param value: Required. The value of the argument. + :type value: str + :param is_secret: Flag to indicate whether the argument represents a + secret and want to be removed from build logs. Default value: False . + :type is_secret: bool + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Argument, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.is_secret = kwargs.get('is_secret', False) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/argument_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/argument_py3.py new file mode 100644 index 000000000000..1f520368d006 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/argument_py3.py @@ -0,0 +1,44 @@ +# 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.serialization import Model + + +class Argument(Model): + """The properties of a run argument. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the argument. + :type name: str + :param value: Required. The value of the argument. + :type value: str + :param is_secret: Flag to indicate whether the argument represents a + secret and want to be removed from build logs. Default value: False . + :type is_secret: bool + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + } + + def __init__(self, *, name: str, value: str, is_secret: bool=False, **kwargs) -> None: + super(Argument, self).__init__(**kwargs) + self.name = name + self.value = value + self.is_secret = is_secret diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info.py new file mode 100644 index 000000000000..cdba1a96d363 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info.py @@ -0,0 +1,54 @@ +# 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.serialization import Model + + +class AuthInfo(Model): + """The authorization properties for accessing the source code repository. + + All required parameters must be populated in order to send to Azure. + + :param token_type: Required. The type of Auth token. Possible values + include: 'PAT', 'OAuth' + :type token_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TokenType + :param token: Required. The access token used to access the source control + provider. + :type token: str + :param refresh_token: The refresh token used to refresh the access token. + :type refresh_token: str + :param scope: The scope of the access token. + :type scope: str + :param expires_in: Time in seconds that the token remains valid + :type expires_in: int + """ + + _validation = { + 'token_type': {'required': True}, + 'token': {'required': True}, + } + + _attribute_map = { + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AuthInfo, self).__init__(**kwargs) + self.token_type = kwargs.get('token_type', None) + self.token = kwargs.get('token', None) + self.refresh_token = kwargs.get('refresh_token', None) + self.scope = kwargs.get('scope', None) + self.expires_in = kwargs.get('expires_in', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info_py3.py new file mode 100644 index 000000000000..cb0ae645585d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info_py3.py @@ -0,0 +1,54 @@ +# 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.serialization import Model + + +class AuthInfo(Model): + """The authorization properties for accessing the source code repository. + + All required parameters must be populated in order to send to Azure. + + :param token_type: Required. The type of Auth token. Possible values + include: 'PAT', 'OAuth' + :type token_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TokenType + :param token: Required. The access token used to access the source control + provider. + :type token: str + :param refresh_token: The refresh token used to refresh the access token. + :type refresh_token: str + :param scope: The scope of the access token. + :type scope: str + :param expires_in: Time in seconds that the token remains valid + :type expires_in: int + """ + + _validation = { + 'token_type': {'required': True}, + 'token': {'required': True}, + } + + _attribute_map = { + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + } + + def __init__(self, *, token_type, token: str, refresh_token: str=None, scope: str=None, expires_in: int=None, **kwargs) -> None: + super(AuthInfo, self).__init__(**kwargs) + self.token_type = token_type + self.token = token + self.refresh_token = refresh_token + self.scope = scope + self.expires_in = expires_in diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info_update_parameters.py new file mode 100644 index 000000000000..5af5cdd4de54 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info_update_parameters.py @@ -0,0 +1,46 @@ +# 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.serialization import Model + + +class AuthInfoUpdateParameters(Model): + """The authorization properties for accessing the source code repository. + + :param token_type: The type of Auth token. Possible values include: 'PAT', + 'OAuth' + :type token_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TokenType + :param token: The access token used to access the source control provider. + :type token: str + :param refresh_token: The refresh token used to refresh the access token. + :type refresh_token: str + :param scope: The scope of the access token. + :type scope: str + :param expires_in: Time in seconds that the token remains valid + :type expires_in: int + """ + + _attribute_map = { + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AuthInfoUpdateParameters, self).__init__(**kwargs) + self.token_type = kwargs.get('token_type', None) + self.token = kwargs.get('token', None) + self.refresh_token = kwargs.get('refresh_token', None) + self.scope = kwargs.get('scope', None) + self.expires_in = kwargs.get('expires_in', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info_update_parameters_py3.py new file mode 100644 index 000000000000..1c938ff2c7e1 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/auth_info_update_parameters_py3.py @@ -0,0 +1,46 @@ +# 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.serialization import Model + + +class AuthInfoUpdateParameters(Model): + """The authorization properties for accessing the source code repository. + + :param token_type: The type of Auth token. Possible values include: 'PAT', + 'OAuth' + :type token_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TokenType + :param token: The access token used to access the source control provider. + :type token: str + :param refresh_token: The refresh token used to refresh the access token. + :type refresh_token: str + :param scope: The scope of the access token. + :type scope: str + :param expires_in: Time in seconds that the token remains valid + :type expires_in: int + """ + + _attribute_map = { + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + } + + def __init__(self, *, token_type=None, token: str=None, refresh_token: str=None, scope: str=None, expires_in: int=None, **kwargs) -> None: + super(AuthInfoUpdateParameters, self).__init__(**kwargs) + self.token_type = token_type + self.token = token + self.refresh_token = refresh_token + self.scope = scope + self.expires_in = expires_in diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_dependency.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_dependency.py new file mode 100644 index 000000000000..9591b5f9c6c6 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_dependency.py @@ -0,0 +1,46 @@ +# 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.serialization import Model + + +class BaseImageDependency(Model): + """Properties that describe a base image dependency. + + :param type: The type of the base image dependency. Possible values + include: 'BuildTime', 'RunTime' + :type type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependencyType + :param registry: The registry login server. + :type registry: str + :param repository: The repository name. + :type repository: str + :param tag: The tag name. + :type tag: str + :param digest: The sha256-based digest of the image manifest. + :type digest: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'registry': {'key': 'registry', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'digest': {'key': 'digest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BaseImageDependency, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.registry = kwargs.get('registry', None) + self.repository = kwargs.get('repository', None) + self.tag = kwargs.get('tag', None) + self.digest = kwargs.get('digest', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_dependency_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_dependency_py3.py new file mode 100644 index 000000000000..d603b0047521 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_dependency_py3.py @@ -0,0 +1,46 @@ +# 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.serialization import Model + + +class BaseImageDependency(Model): + """Properties that describe a base image dependency. + + :param type: The type of the base image dependency. Possible values + include: 'BuildTime', 'RunTime' + :type type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependencyType + :param registry: The registry login server. + :type registry: str + :param repository: The repository name. + :type repository: str + :param tag: The tag name. + :type tag: str + :param digest: The sha256-based digest of the image manifest. + :type digest: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'registry': {'key': 'registry', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'digest': {'key': 'digest', 'type': 'str'}, + } + + def __init__(self, *, type=None, registry: str=None, repository: str=None, tag: str=None, digest: str=None, **kwargs) -> None: + super(BaseImageDependency, self).__init__(**kwargs) + self.type = type + self.registry = registry + self.repository = repository + self.tag = tag + self.digest = digest diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger.py new file mode 100644 index 000000000000..aaea429c8800 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class BaseImageTrigger(Model): + """The trigger based on base image dependency. + + All required parameters must be populated in order to send to Azure. + + :param base_image_trigger_type: Required. The type of the auto trigger for + base image dependency updates. Possible values include: 'All', 'Runtime' + :type base_image_trigger_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerType + :param status: The current status of build trigger. Possible values + include: 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus + :param name: Required. The name of the trigger. + :type name: str + """ + + _validation = { + 'base_image_trigger_type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'base_image_trigger_type': {'key': 'baseImageTriggerType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BaseImageTrigger, self).__init__(**kwargs) + self.base_image_trigger_type = kwargs.get('base_image_trigger_type', None) + self.status = kwargs.get('status', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger_py3.py new file mode 100644 index 000000000000..03397305990d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger_py3.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class BaseImageTrigger(Model): + """The trigger based on base image dependency. + + All required parameters must be populated in order to send to Azure. + + :param base_image_trigger_type: Required. The type of the auto trigger for + base image dependency updates. Possible values include: 'All', 'Runtime' + :type base_image_trigger_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerType + :param status: The current status of build trigger. Possible values + include: 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus + :param name: Required. The name of the trigger. + :type name: str + """ + + _validation = { + 'base_image_trigger_type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'base_image_trigger_type': {'key': 'baseImageTriggerType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, base_image_trigger_type, name: str, status=None, **kwargs) -> None: + super(BaseImageTrigger, self).__init__(**kwargs) + self.base_image_trigger_type = base_image_trigger_type + self.status = status + self.name = name diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger_update_parameters.py new file mode 100644 index 000000000000..e4d06acff54c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger_update_parameters.py @@ -0,0 +1,46 @@ +# 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.serialization import Model + + +class BaseImageTriggerUpdateParameters(Model): + """The properties for updating base image dependency trigger. + + All required parameters must be populated in order to send to Azure. + + :param base_image_trigger_type: The type of the auto trigger for base + image dependency updates. Possible values include: 'All', 'Runtime' + :type base_image_trigger_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerType + :param status: The current status of build trigger. Possible values + include: 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus + :param name: Required. The name of the trigger. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'base_image_trigger_type': {'key': 'baseImageTriggerType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BaseImageTriggerUpdateParameters, self).__init__(**kwargs) + self.base_image_trigger_type = kwargs.get('base_image_trigger_type', None) + self.status = kwargs.get('status', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger_update_parameters_py3.py new file mode 100644 index 000000000000..4e651aa8dff6 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/base_image_trigger_update_parameters_py3.py @@ -0,0 +1,46 @@ +# 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.serialization import Model + + +class BaseImageTriggerUpdateParameters(Model): + """The properties for updating base image dependency trigger. + + All required parameters must be populated in order to send to Azure. + + :param base_image_trigger_type: The type of the auto trigger for base + image dependency updates. Possible values include: 'All', 'Runtime' + :type base_image_trigger_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerType + :param status: The current status of build trigger. Possible values + include: 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus + :param name: Required. The name of the trigger. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'base_image_trigger_type': {'key': 'baseImageTriggerType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, base_image_trigger_type=None, status=None, **kwargs) -> None: + super(BaseImageTriggerUpdateParameters, self).__init__(**kwargs) + self.base_image_trigger_type = base_image_trigger_type + self.status = status + self.name = name diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_request.py new file mode 100644 index 000000000000..ddcb3e715934 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_request.py @@ -0,0 +1,81 @@ +# 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 .run_request import RunRequest + + +class BuildTaskRequest(RunRequest): + """The request parameters for a quick task build. + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + :param definition_file_path: Required. The template/definition file path + relative to the source. + :type definition_file_path: str + :param values_file_path: The values/parameters file path relative to the + source. + :type values_file_path: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + :param source_location: Required. The URL(absolute or relative) of the + source that needs to be built. For Docker build, it can be an URL to a tar + or github repoistory as supported by Docker. + If it is relative URL, the relative path should be obtained from calling + getSourceUploadUrl API. + :type source_location: str + :param timeout: Build timeout in seconds. Default value: 3600 . + :type timeout: int + :param platform: Required. The platform properties against which the build + will happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the build agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + """ + + _validation = { + 'type': {'required': True}, + 'definition_file_path': {'required': True}, + 'source_location': {'required': True}, + 'timeout': {'maximum': 28800, 'minimum': 300}, + 'platform': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'definition_file_path': {'key': 'definitionFilePath', 'type': 'str'}, + 'values_file_path': {'key': 'valuesFilePath', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + 'source_location': {'key': 'sourceLocation', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + 'platform': {'key': 'platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'}, + } + + def __init__(self, **kwargs): + super(BuildTaskRequest, self).__init__(**kwargs) + self.definition_file_path = kwargs.get('definition_file_path', None) + self.values_file_path = kwargs.get('values_file_path', None) + self.values = kwargs.get('values', None) + self.source_location = kwargs.get('source_location', None) + self.timeout = kwargs.get('timeout', 3600) + self.platform = kwargs.get('platform', None) + self.agent_configuration = kwargs.get('agent_configuration', None) + self.type = 'BuildTaskRequest' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_request_py3.py new file mode 100644 index 000000000000..d1b2eca906b6 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_request_py3.py @@ -0,0 +1,81 @@ +# 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 .run_request_py3 import RunRequest + + +class BuildTaskRequest(RunRequest): + """The request parameters for a quick task build. + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + :param definition_file_path: Required. The template/definition file path + relative to the source. + :type definition_file_path: str + :param values_file_path: The values/parameters file path relative to the + source. + :type values_file_path: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + :param source_location: Required. The URL(absolute or relative) of the + source that needs to be built. For Docker build, it can be an URL to a tar + or github repoistory as supported by Docker. + If it is relative URL, the relative path should be obtained from calling + getSourceUploadUrl API. + :type source_location: str + :param timeout: Build timeout in seconds. Default value: 3600 . + :type timeout: int + :param platform: Required. The platform properties against which the build + will happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the build agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + """ + + _validation = { + 'type': {'required': True}, + 'definition_file_path': {'required': True}, + 'source_location': {'required': True}, + 'timeout': {'maximum': 28800, 'minimum': 300}, + 'platform': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'definition_file_path': {'key': 'definitionFilePath', 'type': 'str'}, + 'values_file_path': {'key': 'valuesFilePath', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + 'source_location': {'key': 'sourceLocation', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + 'platform': {'key': 'platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'}, + } + + def __init__(self, *, definition_file_path: str, source_location: str, platform, is_archive_enabled: bool=False, values_file_path: str=None, values=None, timeout: int=3600, agent_configuration=None, **kwargs) -> None: + super(BuildTaskRequest, self).__init__(is_archive_enabled=is_archive_enabled, **kwargs) + self.definition_file_path = definition_file_path + self.values_file_path = values_file_path + self.values = values + self.source_location = source_location + self.timeout = timeout + self.platform = platform + self.agent_configuration = agent_configuration + self.type = 'BuildTaskRequest' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step.py new file mode 100644 index 000000000000..446b2058ff3d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step.py @@ -0,0 +1,66 @@ +# 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 .task_step_properties import TaskStepProperties + + +class BuildTaskStep(TaskStepProperties): + """The properties of a build task step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar base_image_dependencies: List of base image dependencies for a step. + :vartype base_image_dependencies: + list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency] + :param type: Required. Constant filled by server. + :type type: str + :param definition_file_path: Required. The build task template/definition + file path relative to the source context. + :type definition_file_path: str + :param values_file_path: The task values/parameters file path relative to + the source context. + :type values_file_path: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + :param context_path: The URL(absolute or relative) of the source context + for the build task. + If it is relative, the context will be relative to the source repository + URL of the build task. + :type context_path: str + """ + + _validation = { + 'base_image_dependencies': {'readonly': True}, + 'type': {'required': True}, + 'definition_file_path': {'required': True}, + } + + _attribute_map = { + 'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'definition_file_path': {'key': 'definitionFilePath', 'type': 'str'}, + 'values_file_path': {'key': 'valuesFilePath', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + 'context_path': {'key': 'contextPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BuildTaskStep, self).__init__(**kwargs) + self.definition_file_path = kwargs.get('definition_file_path', None) + self.values_file_path = kwargs.get('values_file_path', None) + self.values = kwargs.get('values', None) + self.context_path = kwargs.get('context_path', None) + self.type = 'BuildTask' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step_py3.py new file mode 100644 index 000000000000..a22e6042460e --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step_py3.py @@ -0,0 +1,66 @@ +# 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 .task_step_properties_py3 import TaskStepProperties + + +class BuildTaskStep(TaskStepProperties): + """The properties of a build task step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar base_image_dependencies: List of base image dependencies for a step. + :vartype base_image_dependencies: + list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency] + :param type: Required. Constant filled by server. + :type type: str + :param definition_file_path: Required. The build task template/definition + file path relative to the source context. + :type definition_file_path: str + :param values_file_path: The task values/parameters file path relative to + the source context. + :type values_file_path: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + :param context_path: The URL(absolute or relative) of the source context + for the build task. + If it is relative, the context will be relative to the source repository + URL of the build task. + :type context_path: str + """ + + _validation = { + 'base_image_dependencies': {'readonly': True}, + 'type': {'required': True}, + 'definition_file_path': {'required': True}, + } + + _attribute_map = { + 'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'definition_file_path': {'key': 'definitionFilePath', 'type': 'str'}, + 'values_file_path': {'key': 'valuesFilePath', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + 'context_path': {'key': 'contextPath', 'type': 'str'}, + } + + def __init__(self, *, definition_file_path: str, values_file_path: str=None, values=None, context_path: str=None, **kwargs) -> None: + super(BuildTaskStep, self).__init__(**kwargs) + self.definition_file_path = definition_file_path + self.values_file_path = values_file_path + self.values = values + self.context_path = context_path + self.type = 'BuildTask' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step_update_parameters.py new file mode 100644 index 000000000000..05de12e3de43 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step_update_parameters.py @@ -0,0 +1,57 @@ +# 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 .task_step_update_parameters import TaskStepUpdateParameters + + +class BuildTaskStepUpdateParameters(TaskStepUpdateParameters): + """The properties of updating a build task step. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param definition_file_path: The build task template/definition file path + relative to the source context. + :type definition_file_path: str + :param values_file_path: The task values/parameters file path relative to + the source context. + :type values_file_path: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + :param context_path: The URL(absolute or relative) of the source context + for the build task. + If it is relative, the context will be relative to the source repository + URL of the build task. + :type context_path: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'definition_file_path': {'key': 'definitionFilePath', 'type': 'str'}, + 'values_file_path': {'key': 'valuesFilePath', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + 'context_path': {'key': 'contextPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BuildTaskStepUpdateParameters, self).__init__(**kwargs) + self.definition_file_path = kwargs.get('definition_file_path', None) + self.values_file_path = kwargs.get('values_file_path', None) + self.values = kwargs.get('values', None) + self.context_path = kwargs.get('context_path', None) + self.type = 'BuildTask' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step_update_parameters_py3.py new file mode 100644 index 000000000000..7adbd702540f --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/build_task_step_update_parameters_py3.py @@ -0,0 +1,57 @@ +# 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 .task_step_update_parameters_py3 import TaskStepUpdateParameters + + +class BuildTaskStepUpdateParameters(TaskStepUpdateParameters): + """The properties of updating a build task step. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param definition_file_path: The build task template/definition file path + relative to the source context. + :type definition_file_path: str + :param values_file_path: The task values/parameters file path relative to + the source context. + :type values_file_path: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + :param context_path: The URL(absolute or relative) of the source context + for the build task. + If it is relative, the context will be relative to the source repository + URL of the build task. + :type context_path: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'definition_file_path': {'key': 'definitionFilePath', 'type': 'str'}, + 'values_file_path': {'key': 'valuesFilePath', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + 'context_path': {'key': 'contextPath', 'type': 'str'}, + } + + def __init__(self, *, definition_file_path: str=None, values_file_path: str=None, values=None, context_path: str=None, **kwargs) -> None: + super(BuildTaskStepUpdateParameters, self).__init__(**kwargs) + self.definition_file_path = definition_file_path + self.values_file_path = values_file_path + self.values = values + self.context_path = context_path + self.type = 'BuildTask' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/callback_config.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/callback_config.py new file mode 100644 index 000000000000..8ad43a9f785a --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/callback_config.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class CallbackConfig(Model): + """The configuration of service URI and custom headers for the webhook. + + All required parameters must be populated in order to send to Azure. + + :param service_uri: Required. The service URI for the webhook to post + notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook + notifications. + :type custom_headers: dict[str, str] + """ + + _validation = { + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'customHeaders', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(CallbackConfig, self).__init__(**kwargs) + self.service_uri = kwargs.get('service_uri', None) + self.custom_headers = kwargs.get('custom_headers', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/callback_config_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/callback_config_py3.py new file mode 100644 index 000000000000..27ffc7825431 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/callback_config_py3.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class CallbackConfig(Model): + """The configuration of service URI and custom headers for the webhook. + + All required parameters must be populated in order to send to Azure. + + :param service_uri: Required. The service URI for the webhook to post + notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook + notifications. + :type custom_headers: dict[str, str] + """ + + _validation = { + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'customHeaders', 'type': '{str}'}, + } + + def __init__(self, *, service_uri: str, custom_headers=None, **kwargs) -> None: + super(CallbackConfig, self).__init__(**kwargs) + self.service_uri = service_uri + self.custom_headers = custom_headers diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/container_registry_management_client_enums.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/container_registry_management_client_enums.py new file mode 100644 index 000000000000..59e9e9f63955 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/container_registry_management_client_enums.py @@ -0,0 +1,159 @@ +# 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 enum import Enum + + +class ImportMode(str, Enum): + + no_force = "NoForce" + force = "Force" + + +class SkuName(str, Enum): + + classic = "Classic" + basic = "Basic" + standard = "Standard" + premium = "Premium" + + +class SkuTier(str, Enum): + + classic = "Classic" + basic = "Basic" + standard = "Standard" + premium = "Premium" + + +class ProvisioningState(str, Enum): + + creating = "Creating" + updating = "Updating" + deleting = "Deleting" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + + +class PasswordName(str, Enum): + + password = "password" + password2 = "password2" + + +class RegistryUsageUnit(str, Enum): + + count = "Count" + bytes = "Bytes" + + +class PolicyStatus(str, Enum): + + enabled = "enabled" + disabled = "disabled" + + +class TrustPolicyType(str, Enum): + + notary = "Notary" + + +class WebhookStatus(str, Enum): + + enabled = "enabled" + disabled = "disabled" + + +class WebhookAction(str, Enum): + + push = "push" + delete = "delete" + quarantine = "quarantine" + + +class RunStatus(str, Enum): + + queued = "Queued" + started = "Started" + running = "Running" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + error = "Error" + timeout = "Timeout" + + +class RunType(str, Enum): + + quick_build = "QuickBuild" + auto_build = "AutoBuild" + + +class OS(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class Architecture(str, Enum): + + amd64 = "amd64" + x86 = "x86" + arm = "arm" + + +class Variant(str, Enum): + + v6 = "v6" + v7 = "v7" + v8 = "v8" + + +class TaskStatus(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class BaseImageDependencyType(str, Enum): + + build_time = "BuildTime" + run_time = "RunTime" + + +class SourceControlType(str, Enum): + + github = "Github" + visual_studio_team_service = "VisualStudioTeamService" + + +class TokenType(str, Enum): + + pat = "PAT" + oauth = "OAuth" + + +class SourceTriggerEvent(str, Enum): + + commit = "commit" + + +class TriggerStatus(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class BaseImageTriggerType(str, Enum): + + all = "All" + runtime = "Runtime" diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request.py new file mode 100644 index 000000000000..143ef75c7de6 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request.py @@ -0,0 +1,91 @@ +# 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 .run_request import RunRequest + + +class DockerBuildRequest(RunRequest): + """The parameters for a docker quick build. + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + :param image_names: The fully qualified image names including the + repository and tag. + :type image_names: list[str] + :param is_push_enabled: The value of this property indicates whether the + image built should be pushed to the registry or not. Default value: True . + :type is_push_enabled: bool + :param no_cache: The value of this property indicates whether the image + cache is enabled or not. Default value: False . + :type no_cache: bool + :param docker_file_path: Required. The Docker file path relative to the + source location. + :type docker_file_path: str + :param arguments: The collection of override arguments to be used when + executing the run. + :type arguments: + list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument] + :param source_location: Required. The URL(absolute or relative) of the + source that needs to be built. For Docker build, it can be an URL to a tar + or github repoistory as supported by Docker. + If it is relative URL, the relative path should be obtained from calling + getSourceUploadUrl API. + :type source_location: str + :param timeout: Build timeout in seconds. Default value: 3600 . + :type timeout: int + :param platform: Required. The platform properties against which the build + will happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the build agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + """ + + _validation = { + 'type': {'required': True}, + 'docker_file_path': {'required': True}, + 'source_location': {'required': True}, + 'timeout': {'maximum': 28800, 'minimum': 300}, + 'platform': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'image_names': {'key': 'imageNames', 'type': '[str]'}, + 'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'}, + 'no_cache': {'key': 'noCache', 'type': 'bool'}, + 'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '[Argument]'}, + 'source_location': {'key': 'sourceLocation', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + 'platform': {'key': 'platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'}, + } + + def __init__(self, **kwargs): + super(DockerBuildRequest, self).__init__(**kwargs) + self.image_names = kwargs.get('image_names', None) + self.is_push_enabled = kwargs.get('is_push_enabled', True) + self.no_cache = kwargs.get('no_cache', False) + self.docker_file_path = kwargs.get('docker_file_path', None) + self.arguments = kwargs.get('arguments', None) + self.source_location = kwargs.get('source_location', None) + self.timeout = kwargs.get('timeout', 3600) + self.platform = kwargs.get('platform', None) + self.agent_configuration = kwargs.get('agent_configuration', None) + self.type = 'DockerBuildRequest' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request_py3.py new file mode 100644 index 000000000000..5f4b4f10cbcf --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request_py3.py @@ -0,0 +1,91 @@ +# 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 .run_request_py3 import RunRequest + + +class DockerBuildRequest(RunRequest): + """The parameters for a docker quick build. + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + :param image_names: The fully qualified image names including the + repository and tag. + :type image_names: list[str] + :param is_push_enabled: The value of this property indicates whether the + image built should be pushed to the registry or not. Default value: True . + :type is_push_enabled: bool + :param no_cache: The value of this property indicates whether the image + cache is enabled or not. Default value: False . + :type no_cache: bool + :param docker_file_path: Required. The Docker file path relative to the + source location. + :type docker_file_path: str + :param arguments: The collection of override arguments to be used when + executing the run. + :type arguments: + list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument] + :param source_location: Required. The URL(absolute or relative) of the + source that needs to be built. For Docker build, it can be an URL to a tar + or github repoistory as supported by Docker. + If it is relative URL, the relative path should be obtained from calling + getSourceUploadUrl API. + :type source_location: str + :param timeout: Build timeout in seconds. Default value: 3600 . + :type timeout: int + :param platform: Required. The platform properties against which the build + will happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the build agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + """ + + _validation = { + 'type': {'required': True}, + 'docker_file_path': {'required': True}, + 'source_location': {'required': True}, + 'timeout': {'maximum': 28800, 'minimum': 300}, + 'platform': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'image_names': {'key': 'imageNames', 'type': '[str]'}, + 'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'}, + 'no_cache': {'key': 'noCache', 'type': 'bool'}, + 'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '[Argument]'}, + 'source_location': {'key': 'sourceLocation', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + 'platform': {'key': 'platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'}, + } + + def __init__(self, *, docker_file_path: str, source_location: str, platform, is_archive_enabled: bool=False, image_names=None, is_push_enabled: bool=True, no_cache: bool=False, arguments=None, timeout: int=3600, agent_configuration=None, **kwargs) -> None: + super(DockerBuildRequest, self).__init__(is_archive_enabled=is_archive_enabled, **kwargs) + self.image_names = image_names + self.is_push_enabled = is_push_enabled + self.no_cache = no_cache + self.docker_file_path = docker_file_path + self.arguments = arguments + self.source_location = source_location + self.timeout = timeout + self.platform = platform + self.agent_configuration = agent_configuration + self.type = 'DockerBuildRequest' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step.py new file mode 100644 index 000000000000..3164f98a078d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step.py @@ -0,0 +1,76 @@ +# 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 .task_step_properties import TaskStepProperties + + +class DockerBuildStep(TaskStepProperties): + """The Docker build step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar base_image_dependencies: List of base image dependencies for a step. + :vartype base_image_dependencies: + list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency] + :param type: Required. Constant filled by server. + :type type: str + :param image_names: The fully qualified image names including the + repository and tag. + :type image_names: list[str] + :param is_push_enabled: The value of this property indicates whether the + image built should be pushed to the registry or not. Default value: True . + :type is_push_enabled: bool + :param no_cache: The value of this property indicates whether the image + cache is enabled or not. Default value: False . + :type no_cache: bool + :param docker_file_path: Required. The Docker file path relative to the + source context. + :type docker_file_path: str + :param arguments: The collection of override arguments to be used when + executing this build step. + :type arguments: + list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument] + :param context_path: The URL(absolute or relative) of the source context + for the build task. + If it is relative, the context will be relative to the source repository + URL of the build task. + :type context_path: str + """ + + _validation = { + 'base_image_dependencies': {'readonly': True}, + 'type': {'required': True}, + 'docker_file_path': {'required': True}, + } + + _attribute_map = { + 'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'image_names': {'key': 'imageNames', 'type': '[str]'}, + 'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'}, + 'no_cache': {'key': 'noCache', 'type': 'bool'}, + 'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '[Argument]'}, + 'context_path': {'key': 'contextPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DockerBuildStep, self).__init__(**kwargs) + self.image_names = kwargs.get('image_names', None) + self.is_push_enabled = kwargs.get('is_push_enabled', True) + self.no_cache = kwargs.get('no_cache', False) + self.docker_file_path = kwargs.get('docker_file_path', None) + self.arguments = kwargs.get('arguments', None) + self.context_path = kwargs.get('context_path', None) + self.type = 'Docker' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step_py3.py new file mode 100644 index 000000000000..7c052812cc6e --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step_py3.py @@ -0,0 +1,76 @@ +# 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 .task_step_properties_py3 import TaskStepProperties + + +class DockerBuildStep(TaskStepProperties): + """The Docker build step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar base_image_dependencies: List of base image dependencies for a step. + :vartype base_image_dependencies: + list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency] + :param type: Required. Constant filled by server. + :type type: str + :param image_names: The fully qualified image names including the + repository and tag. + :type image_names: list[str] + :param is_push_enabled: The value of this property indicates whether the + image built should be pushed to the registry or not. Default value: True . + :type is_push_enabled: bool + :param no_cache: The value of this property indicates whether the image + cache is enabled or not. Default value: False . + :type no_cache: bool + :param docker_file_path: Required. The Docker file path relative to the + source context. + :type docker_file_path: str + :param arguments: The collection of override arguments to be used when + executing this build step. + :type arguments: + list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument] + :param context_path: The URL(absolute or relative) of the source context + for the build task. + If it is relative, the context will be relative to the source repository + URL of the build task. + :type context_path: str + """ + + _validation = { + 'base_image_dependencies': {'readonly': True}, + 'type': {'required': True}, + 'docker_file_path': {'required': True}, + } + + _attribute_map = { + 'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'image_names': {'key': 'imageNames', 'type': '[str]'}, + 'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'}, + 'no_cache': {'key': 'noCache', 'type': 'bool'}, + 'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '[Argument]'}, + 'context_path': {'key': 'contextPath', 'type': 'str'}, + } + + def __init__(self, *, docker_file_path: str, image_names=None, is_push_enabled: bool=True, no_cache: bool=False, arguments=None, context_path: str=None, **kwargs) -> None: + super(DockerBuildStep, self).__init__(**kwargs) + self.image_names = image_names + self.is_push_enabled = is_push_enabled + self.no_cache = no_cache + self.docker_file_path = docker_file_path + self.arguments = arguments + self.context_path = context_path + self.type = 'Docker' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step_update_parameters.py new file mode 100644 index 000000000000..1f89fbeb1561 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step_update_parameters.py @@ -0,0 +1,67 @@ +# 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 .task_step_update_parameters import TaskStepUpdateParameters + + +class DockerBuildStepUpdateParameters(TaskStepUpdateParameters): + """The properties for updating a docker build step. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param image_names: The fully qualified image names including the + repository and tag. + :type image_names: list[str] + :param is_push_enabled: The value of this property indicates whether the + image built should be pushed to the registry or not. + :type is_push_enabled: bool + :param no_cache: The value of this property indicates whether the image + cache is enabled or not. + :type no_cache: bool + :param docker_file_path: The Docker file path relative to the source + context. + :type docker_file_path: str + :param arguments: The collection of override arguments to be used when + executing this build step. + :type arguments: + list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument] + :param context_path: The URL(absolute or relative) of the source context + for the build task. + If it is relative, the context will be relative to the source repository + URL of the build task. + :type context_path: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'image_names': {'key': 'imageNames', 'type': '[str]'}, + 'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'}, + 'no_cache': {'key': 'noCache', 'type': 'bool'}, + 'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '[Argument]'}, + 'context_path': {'key': 'contextPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DockerBuildStepUpdateParameters, self).__init__(**kwargs) + self.image_names = kwargs.get('image_names', None) + self.is_push_enabled = kwargs.get('is_push_enabled', None) + self.no_cache = kwargs.get('no_cache', None) + self.docker_file_path = kwargs.get('docker_file_path', None) + self.arguments = kwargs.get('arguments', None) + self.context_path = kwargs.get('context_path', None) + self.type = 'Docker' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step_update_parameters_py3.py new file mode 100644 index 000000000000..e2ac5b1a859e --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_step_update_parameters_py3.py @@ -0,0 +1,67 @@ +# 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 .task_step_update_parameters_py3 import TaskStepUpdateParameters + + +class DockerBuildStepUpdateParameters(TaskStepUpdateParameters): + """The properties for updating a docker build step. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param image_names: The fully qualified image names including the + repository and tag. + :type image_names: list[str] + :param is_push_enabled: The value of this property indicates whether the + image built should be pushed to the registry or not. + :type is_push_enabled: bool + :param no_cache: The value of this property indicates whether the image + cache is enabled or not. + :type no_cache: bool + :param docker_file_path: The Docker file path relative to the source + context. + :type docker_file_path: str + :param arguments: The collection of override arguments to be used when + executing this build step. + :type arguments: + list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument] + :param context_path: The URL(absolute or relative) of the source context + for the build task. + If it is relative, the context will be relative to the source repository + URL of the build task. + :type context_path: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'image_names': {'key': 'imageNames', 'type': '[str]'}, + 'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'}, + 'no_cache': {'key': 'noCache', 'type': 'bool'}, + 'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '[Argument]'}, + 'context_path': {'key': 'contextPath', 'type': 'str'}, + } + + def __init__(self, *, image_names=None, is_push_enabled: bool=None, no_cache: bool=None, docker_file_path: str=None, arguments=None, context_path: str=None, **kwargs) -> None: + super(DockerBuildStepUpdateParameters, self).__init__(**kwargs) + self.image_names = image_names + self.is_push_enabled = is_push_enabled + self.no_cache = no_cache + self.docker_file_path = docker_file_path + self.arguments = arguments + self.context_path = context_path + self.type = 'Docker' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event.py new file mode 100644 index 000000000000..9894bf03331b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event.py @@ -0,0 +1,39 @@ +# 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 .event_info import EventInfo + + +class Event(EventInfo): + """The event for a webhook. + + :param id: The event ID. + :type id: str + :param event_request_message: The event request message sent to the + service URI. + :type event_request_message: + ~azure.mgmt.containerregistry.v2018_09_01.models.EventRequestMessage + :param event_response_message: The event response message received from + the service URI. + :type event_response_message: + ~azure.mgmt.containerregistry.v2018_09_01.models.EventResponseMessage + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'event_request_message': {'key': 'eventRequestMessage', 'type': 'EventRequestMessage'}, + 'event_response_message': {'key': 'eventResponseMessage', 'type': 'EventResponseMessage'}, + } + + def __init__(self, **kwargs): + super(Event, self).__init__(**kwargs) + self.event_request_message = kwargs.get('event_request_message', None) + self.event_response_message = kwargs.get('event_response_message', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_content.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_content.py new file mode 100644 index 000000000000..1585c43a8dfd --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_content.py @@ -0,0 +1,54 @@ +# 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.serialization import Model + + +class EventContent(Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.mgmt.containerregistry.v2018_09_01.models.Target + :param request: The request that generated the event. + :type request: ~azure.mgmt.containerregistry.v2018_09_01.models.Request + :param actor: The agent that initiated the event. For most situations, + this could be from the authorization context of the request. + :type actor: ~azure.mgmt.containerregistry.v2018_09_01.models.Actor + :param source: The registry node that generated the event. Put + differently, while the actor initiates the event, the source generates it. + :type source: ~azure.mgmt.containerregistry.v2018_09_01.models.Source + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'Target'}, + 'request': {'key': 'request', 'type': 'Request'}, + 'actor': {'key': 'actor', 'type': 'Actor'}, + 'source': {'key': 'source', 'type': 'Source'}, + } + + def __init__(self, **kwargs): + super(EventContent, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.timestamp = kwargs.get('timestamp', None) + self.action = kwargs.get('action', None) + self.target = kwargs.get('target', None) + self.request = kwargs.get('request', None) + self.actor = kwargs.get('actor', None) + self.source = kwargs.get('source', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_content_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_content_py3.py new file mode 100644 index 000000000000..36c725a24f05 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_content_py3.py @@ -0,0 +1,54 @@ +# 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.serialization import Model + + +class EventContent(Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.mgmt.containerregistry.v2018_09_01.models.Target + :param request: The request that generated the event. + :type request: ~azure.mgmt.containerregistry.v2018_09_01.models.Request + :param actor: The agent that initiated the event. For most situations, + this could be from the authorization context of the request. + :type actor: ~azure.mgmt.containerregistry.v2018_09_01.models.Actor + :param source: The registry node that generated the event. Put + differently, while the actor initiates the event, the source generates it. + :type source: ~azure.mgmt.containerregistry.v2018_09_01.models.Source + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'Target'}, + 'request': {'key': 'request', 'type': 'Request'}, + 'actor': {'key': 'actor', 'type': 'Actor'}, + 'source': {'key': 'source', 'type': 'Source'}, + } + + def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: + super(EventContent, self).__init__(**kwargs) + self.id = id + self.timestamp = timestamp + self.action = action + self.target = target + self.request = request + self.actor = actor + self.source = source diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_info.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_info.py new file mode 100644 index 000000000000..7199044b2e39 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_info.py @@ -0,0 +1,28 @@ +# 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.serialization import Model + + +class EventInfo(Model): + """The basic information of an event. + + :param id: The event ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_info_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_info_py3.py new file mode 100644 index 000000000000..192990067407 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_info_py3.py @@ -0,0 +1,28 @@ +# 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.serialization import Model + + +class EventInfo(Model): + """The basic information of an event. + + :param id: The event ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(EventInfo, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_paged.py new file mode 100644 index 000000000000..c185ea7b023b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class EventPaged(Paged): + """ + A paging container for iterating over a list of :class:`Event ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Event]'} + } + + def __init__(self, *args, **kwargs): + + super(EventPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_py3.py new file mode 100644 index 000000000000..e28e63f22ed2 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_py3.py @@ -0,0 +1,39 @@ +# 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 .event_info_py3 import EventInfo + + +class Event(EventInfo): + """The event for a webhook. + + :param id: The event ID. + :type id: str + :param event_request_message: The event request message sent to the + service URI. + :type event_request_message: + ~azure.mgmt.containerregistry.v2018_09_01.models.EventRequestMessage + :param event_response_message: The event response message received from + the service URI. + :type event_response_message: + ~azure.mgmt.containerregistry.v2018_09_01.models.EventResponseMessage + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'event_request_message': {'key': 'eventRequestMessage', 'type': 'EventRequestMessage'}, + 'event_response_message': {'key': 'eventResponseMessage', 'type': 'EventResponseMessage'}, + } + + def __init__(self, *, id: str=None, event_request_message=None, event_response_message=None, **kwargs) -> None: + super(Event, self).__init__(id=id, **kwargs) + self.event_request_message = event_request_message + self.event_response_message = event_response_message diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_request_message.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_request_message.py new file mode 100644 index 000000000000..2f8feb93426f --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_request_message.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class EventRequestMessage(Model): + """The event request message sent to the service URI. + + :param content: The content of the event request message. + :type content: + ~azure.mgmt.containerregistry.v2018_09_01.models.EventContent + :param headers: The headers of the event request message. + :type headers: dict[str, str] + :param method: The HTTP method used to send the event request message. + :type method: str + :param request_uri: The URI used to send the event request message. + :type request_uri: str + :param version: The HTTP message version. + :type version: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'EventContent'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + 'method': {'key': 'method', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventRequestMessage, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + self.headers = kwargs.get('headers', None) + self.method = kwargs.get('method', None) + self.request_uri = kwargs.get('request_uri', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_request_message_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_request_message_py3.py new file mode 100644 index 000000000000..d954d9085355 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_request_message_py3.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class EventRequestMessage(Model): + """The event request message sent to the service URI. + + :param content: The content of the event request message. + :type content: + ~azure.mgmt.containerregistry.v2018_09_01.models.EventContent + :param headers: The headers of the event request message. + :type headers: dict[str, str] + :param method: The HTTP method used to send the event request message. + :type method: str + :param request_uri: The URI used to send the event request message. + :type request_uri: str + :param version: The HTTP message version. + :type version: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'EventContent'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + 'method': {'key': 'method', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, content=None, headers=None, method: str=None, request_uri: str=None, version: str=None, **kwargs) -> None: + super(EventRequestMessage, self).__init__(**kwargs) + self.content = content + self.headers = headers + self.method = method + self.request_uri = request_uri + self.version = version diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_response_message.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_response_message.py new file mode 100644 index 000000000000..ffb8feb12a1e --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_response_message.py @@ -0,0 +1,44 @@ +# 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.serialization import Model + + +class EventResponseMessage(Model): + """The event response message received from the service URI. + + :param content: The content of the event response message. + :type content: str + :param headers: The headers of the event response message. + :type headers: dict[str, str] + :param reason_phrase: The reason phrase of the event response message. + :type reason_phrase: str + :param status_code: The status code of the event response message. + :type status_code: str + :param version: The HTTP message version. + :type version: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + 'reason_phrase': {'key': 'reasonPhrase', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventResponseMessage, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + self.headers = kwargs.get('headers', None) + self.reason_phrase = kwargs.get('reason_phrase', None) + self.status_code = kwargs.get('status_code', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_response_message_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_response_message_py3.py new file mode 100644 index 000000000000..4b1351377b4b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/event_response_message_py3.py @@ -0,0 +1,44 @@ +# 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.serialization import Model + + +class EventResponseMessage(Model): + """The event response message received from the service URI. + + :param content: The content of the event response message. + :type content: str + :param headers: The headers of the event response message. + :type headers: dict[str, str] + :param reason_phrase: The reason phrase of the event response message. + :type reason_phrase: str + :param status_code: The status code of the event response message. + :type status_code: str + :param version: The HTTP message version. + :type version: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + 'reason_phrase': {'key': 'reasonPhrase', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, content: str=None, headers=None, reason_phrase: str=None, status_code: str=None, version: str=None, **kwargs) -> None: + super(EventResponseMessage, self).__init__(**kwargs) + self.content = content + self.headers = headers + self.reason_phrase = reason_phrase + self.status_code = status_code + self.version = version diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_descriptor.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_descriptor.py new file mode 100644 index 000000000000..1cfd03ed778c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_descriptor.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class ImageDescriptor(Model): + """Properties for a registry image. + + :param registry: The registry login server. + :type registry: str + :param repository: The repository name. + :type repository: str + :param tag: The tag name. + :type tag: str + :param digest: The sha256-based digest of the image manifest. + :type digest: str + """ + + _attribute_map = { + 'registry': {'key': 'registry', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'digest': {'key': 'digest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageDescriptor, self).__init__(**kwargs) + self.registry = kwargs.get('registry', None) + self.repository = kwargs.get('repository', None) + self.tag = kwargs.get('tag', None) + self.digest = kwargs.get('digest', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_descriptor_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_descriptor_py3.py new file mode 100644 index 000000000000..72928cf47326 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_descriptor_py3.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class ImageDescriptor(Model): + """Properties for a registry image. + + :param registry: The registry login server. + :type registry: str + :param repository: The repository name. + :type repository: str + :param tag: The tag name. + :type tag: str + :param digest: The sha256-based digest of the image manifest. + :type digest: str + """ + + _attribute_map = { + 'registry': {'key': 'registry', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'digest': {'key': 'digest', 'type': 'str'}, + } + + def __init__(self, *, registry: str=None, repository: str=None, tag: str=None, digest: str=None, **kwargs) -> None: + super(ImageDescriptor, self).__init__(**kwargs) + self.registry = registry + self.repository = repository + self.tag = tag + self.digest = digest diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_update_trigger.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_update_trigger.py new file mode 100644 index 000000000000..4203ee9e26f6 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_update_trigger.py @@ -0,0 +1,37 @@ +# 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.serialization import Model + + +class ImageUpdateTrigger(Model): + """The image update trigger that caused a build. + + :param id: The unique ID of the trigger. + :type id: str + :param timestamp: The timestamp when the image update happened. + :type timestamp: datetime + :param images: The list of image updates that caused the build. + :type images: + list[~azure.mgmt.containerregistry.v2018_09_01.models.ImageDescriptor] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'images': {'key': 'images', 'type': '[ImageDescriptor]'}, + } + + def __init__(self, **kwargs): + super(ImageUpdateTrigger, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.timestamp = kwargs.get('timestamp', None) + self.images = kwargs.get('images', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_update_trigger_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_update_trigger_py3.py new file mode 100644 index 000000000000..64c62ad9f07c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/image_update_trigger_py3.py @@ -0,0 +1,37 @@ +# 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.serialization import Model + + +class ImageUpdateTrigger(Model): + """The image update trigger that caused a build. + + :param id: The unique ID of the trigger. + :type id: str + :param timestamp: The timestamp when the image update happened. + :type timestamp: datetime + :param images: The list of image updates that caused the build. + :type images: + list[~azure.mgmt.containerregistry.v2018_09_01.models.ImageDescriptor] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'images': {'key': 'images', 'type': '[ImageDescriptor]'}, + } + + def __init__(self, *, id: str=None, timestamp=None, images=None, **kwargs) -> None: + super(ImageUpdateTrigger, self).__init__(**kwargs) + self.id = id + self.timestamp = timestamp + self.images = images diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_image_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_image_parameters.py new file mode 100644 index 000000000000..d82648d8e186 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_image_parameters.py @@ -0,0 +1,54 @@ +# 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.serialization import Model + + +class ImportImageParameters(Model): + """ImportImageParameters. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The source of the image. + :type source: + ~azure.mgmt.containerregistry.v2018_09_01.models.ImportSource + :param target_tags: List of strings of the form repo[:tag]. When tag is + omitted the source will be used (or 'latest' if source tag is also + omitted). + :type target_tags: list[str] + :param untagged_target_repositories: List of strings of repository names + to do a manifest only copy. No tag will be created. + :type untagged_target_repositories: list[str] + :param mode: When Force, any existing target tags will be overwritten. + When NoForce, any existing target tags will fail the operation before any + copying begins. Possible values include: 'NoForce', 'Force'. Default + value: "NoForce" . + :type mode: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ImportMode + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ImportSource'}, + 'target_tags': {'key': 'targetTags', 'type': '[str]'}, + 'untagged_target_repositories': {'key': 'untaggedTargetRepositories', 'type': '[str]'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportImageParameters, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.target_tags = kwargs.get('target_tags', None) + self.untagged_target_repositories = kwargs.get('untagged_target_repositories', None) + self.mode = kwargs.get('mode', "NoForce") diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_image_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_image_parameters_py3.py new file mode 100644 index 000000000000..fe050e50b1e0 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_image_parameters_py3.py @@ -0,0 +1,54 @@ +# 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.serialization import Model + + +class ImportImageParameters(Model): + """ImportImageParameters. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The source of the image. + :type source: + ~azure.mgmt.containerregistry.v2018_09_01.models.ImportSource + :param target_tags: List of strings of the form repo[:tag]. When tag is + omitted the source will be used (or 'latest' if source tag is also + omitted). + :type target_tags: list[str] + :param untagged_target_repositories: List of strings of repository names + to do a manifest only copy. No tag will be created. + :type untagged_target_repositories: list[str] + :param mode: When Force, any existing target tags will be overwritten. + When NoForce, any existing target tags will fail the operation before any + copying begins. Possible values include: 'NoForce', 'Force'. Default + value: "NoForce" . + :type mode: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ImportMode + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ImportSource'}, + 'target_tags': {'key': 'targetTags', 'type': '[str]'}, + 'untagged_target_repositories': {'key': 'untaggedTargetRepositories', 'type': '[str]'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__(self, *, source, target_tags=None, untagged_target_repositories=None, mode="NoForce", **kwargs) -> None: + super(ImportImageParameters, self).__init__(**kwargs) + self.source = source + self.target_tags = target_tags + self.untagged_target_repositories = untagged_target_repositories + self.mode = mode diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_source.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_source.py new file mode 100644 index 000000000000..4df86c249a2d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_source.py @@ -0,0 +1,48 @@ +# 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.serialization import Model + + +class ImportSource(Model): + """ImportSource. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: The resource identifier of the source Azure Container + Registry. + :type resource_id: str + :param registry_uri: The address of the source registry. + :type registry_uri: str + :param source_image: Required. Repository name of the source image. + Specify an image by repository ('hello-world'). This will use the 'latest' + tag. + Specify an image by tag ('hello-world:latest'). + Specify an image by sha256-based manifest digest + ('hello-world@sha256:abc123'). + :type source_image: str + """ + + _validation = { + 'source_image': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'registry_uri': {'key': 'registryUri', 'type': 'str'}, + 'source_image': {'key': 'sourceImage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportSource, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.registry_uri = kwargs.get('registry_uri', None) + self.source_image = kwargs.get('source_image', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_source_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_source_py3.py new file mode 100644 index 000000000000..b64a01b46a79 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/import_source_py3.py @@ -0,0 +1,48 @@ +# 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.serialization import Model + + +class ImportSource(Model): + """ImportSource. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: The resource identifier of the source Azure Container + Registry. + :type resource_id: str + :param registry_uri: The address of the source registry. + :type registry_uri: str + :param source_image: Required. Repository name of the source image. + Specify an image by repository ('hello-world'). This will use the 'latest' + tag. + Specify an image by tag ('hello-world:latest'). + Specify an image by sha256-based manifest digest + ('hello-world@sha256:abc123'). + :type source_image: str + """ + + _validation = { + 'source_image': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'registry_uri': {'key': 'registryUri', 'type': 'str'}, + 'source_image': {'key': 'sourceImage', 'type': 'str'}, + } + + def __init__(self, *, source_image: str, resource_id: str=None, registry_uri: str=None, **kwargs) -> None: + super(ImportSource, self).__init__(**kwargs) + self.resource_id = resource_id + self.registry_uri = registry_uri + self.source_image = source_image diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_definition.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_definition.py new file mode 100644 index 000000000000..76a26bc63300 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_definition.py @@ -0,0 +1,43 @@ +# 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.serialization import Model + + +class OperationDefinition(Model): + """The definition of a container registry operation. + + :param origin: The origin information of the container registry operation. + :type origin: str + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The display information for the container registry + operation. + :type display: + ~azure.mgmt.containerregistry.v2018_09_01.models.OperationDisplayDefinition + :param service_specification: The definition of Azure Monitoring service. + :type service_specification: + ~azure.mgmt.containerregistry.v2018_09_01.models.OperationServiceSpecificationDefinition + """ + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayDefinition'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecificationDefinition'}, + } + + def __init__(self, **kwargs): + super(OperationDefinition, self).__init__(**kwargs) + self.origin = kwargs.get('origin', None) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.service_specification = kwargs.get('service_specification', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_definition_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_definition_paged.py new file mode 100644 index 000000000000..e22ddb00e48c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_definition_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class OperationDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_definition_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_definition_py3.py new file mode 100644 index 000000000000..a7539e326744 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_definition_py3.py @@ -0,0 +1,43 @@ +# 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.serialization import Model + + +class OperationDefinition(Model): + """The definition of a container registry operation. + + :param origin: The origin information of the container registry operation. + :type origin: str + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The display information for the container registry + operation. + :type display: + ~azure.mgmt.containerregistry.v2018_09_01.models.OperationDisplayDefinition + :param service_specification: The definition of Azure Monitoring service. + :type service_specification: + ~azure.mgmt.containerregistry.v2018_09_01.models.OperationServiceSpecificationDefinition + """ + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayDefinition'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecificationDefinition'}, + } + + def __init__(self, *, origin: str=None, name: str=None, display=None, service_specification=None, **kwargs) -> None: + super(OperationDefinition, self).__init__(**kwargs) + self.origin = origin + self.name = name + self.display = display + self.service_specification = service_specification diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_display_definition.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_display_definition.py new file mode 100644 index 000000000000..6cb8463b21fc --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_display_definition.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class OperationDisplayDefinition(Model): + """The display information for a container registry operation. + + :param provider: The resource provider name: Microsoft.ContainerRegistry. + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation that users can perform. + :type operation: str + :param description: The description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplayDefinition, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_display_definition_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_display_definition_py3.py new file mode 100644 index 000000000000..98abb699335c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_display_definition_py3.py @@ -0,0 +1,40 @@ +# 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.serialization import Model + + +class OperationDisplayDefinition(Model): + """The display information for a container registry operation. + + :param provider: The resource provider name: Microsoft.ContainerRegistry. + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation that users can perform. + :type operation: str + :param description: The description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplayDefinition, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_metric_specification_definition.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_metric_specification_definition.py new file mode 100644 index 000000000000..8b40b3b4d6f1 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_metric_specification_definition.py @@ -0,0 +1,48 @@ +# 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.serialization import Model + + +class OperationMetricSpecificationDefinition(Model): + """The definition of Azure Monitoring metric. + + :param name: Metric name. + :type name: str + :param display_name: Metric display name. + :type display_name: str + :param display_description: Metric description. + :type display_description: str + :param unit: Metric unit. + :type unit: str + :param aggregation_type: Metric aggregation type. + :type aggregation_type: str + :param internal_metric_name: Internal metric name. + :type internal_metric_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationMetricSpecificationDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.internal_metric_name = kwargs.get('internal_metric_name', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_metric_specification_definition_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_metric_specification_definition_py3.py new file mode 100644 index 000000000000..db4f31c14a17 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_metric_specification_definition_py3.py @@ -0,0 +1,48 @@ +# 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.serialization import Model + + +class OperationMetricSpecificationDefinition(Model): + """The definition of Azure Monitoring metric. + + :param name: Metric name. + :type name: str + :param display_name: Metric display name. + :type display_name: str + :param display_description: Metric description. + :type display_description: str + :param unit: Metric unit. + :type unit: str + :param aggregation_type: Metric aggregation type. + :type aggregation_type: str + :param internal_metric_name: Internal metric name. + :type internal_metric_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, internal_metric_name: str=None, **kwargs) -> None: + super(OperationMetricSpecificationDefinition, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.internal_metric_name = internal_metric_name diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_service_specification_definition.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_service_specification_definition.py new file mode 100644 index 000000000000..a687b3dec8ff --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_service_specification_definition.py @@ -0,0 +1,30 @@ +# 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.serialization import Model + + +class OperationServiceSpecificationDefinition(Model): + """The definition of Azure Monitoring metrics list. + + :param metric_specifications: A list of Azure Monitoring metrics + definition. + :type metric_specifications: + list[~azure.mgmt.containerregistry.v2018_09_01.models.OperationMetricSpecificationDefinition] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'}, + } + + def __init__(self, **kwargs): + super(OperationServiceSpecificationDefinition, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_service_specification_definition_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_service_specification_definition_py3.py new file mode 100644 index 000000000000..cd6cdd8969a8 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/operation_service_specification_definition_py3.py @@ -0,0 +1,30 @@ +# 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.serialization import Model + + +class OperationServiceSpecificationDefinition(Model): + """The definition of Azure Monitoring metrics list. + + :param metric_specifications: A list of Azure Monitoring metrics + definition. + :type metric_specifications: + list[~azure.mgmt.containerregistry.v2018_09_01.models.OperationMetricSpecificationDefinition] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(OperationServiceSpecificationDefinition, self).__init__(**kwargs) + self.metric_specifications = metric_specifications diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_properties.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_properties.py new file mode 100644 index 000000000000..a6316f429d93 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_properties.py @@ -0,0 +1,48 @@ +# 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.serialization import Model + + +class PlatformProperties(Model): + """The platform properties against which the run has to happen. + + All required parameters must be populated in order to send to Azure. + + :param os: Required. The operating system type required for the run. + Possible values include: 'Windows', 'Linux' + :type os: str or ~azure.mgmt.containerregistry.v2018_09_01.models.OS + :param architecture: Required. The OS architecture. Possible values + include: 'amd64', 'x86', 'arm' + :type architecture: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Architecture + :param variant: Variant of the CPU. Possible values include: 'v6', 'v7', + 'v8' + :type variant: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Variant + """ + + _validation = { + 'os': {'required': True}, + 'architecture': {'required': True}, + } + + _attribute_map = { + 'os': {'key': 'os', 'type': 'str'}, + 'architecture': {'key': 'architecture', 'type': 'str'}, + 'variant': {'key': 'variant', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PlatformProperties, self).__init__(**kwargs) + self.os = kwargs.get('os', None) + self.architecture = kwargs.get('architecture', None) + self.variant = kwargs.get('variant', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_properties_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_properties_py3.py new file mode 100644 index 000000000000..35086849a25c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_properties_py3.py @@ -0,0 +1,48 @@ +# 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.serialization import Model + + +class PlatformProperties(Model): + """The platform properties against which the run has to happen. + + All required parameters must be populated in order to send to Azure. + + :param os: Required. The operating system type required for the run. + Possible values include: 'Windows', 'Linux' + :type os: str or ~azure.mgmt.containerregistry.v2018_09_01.models.OS + :param architecture: Required. The OS architecture. Possible values + include: 'amd64', 'x86', 'arm' + :type architecture: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Architecture + :param variant: Variant of the CPU. Possible values include: 'v6', 'v7', + 'v8' + :type variant: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Variant + """ + + _validation = { + 'os': {'required': True}, + 'architecture': {'required': True}, + } + + _attribute_map = { + 'os': {'key': 'os', 'type': 'str'}, + 'architecture': {'key': 'architecture', 'type': 'str'}, + 'variant': {'key': 'variant', 'type': 'str'}, + } + + def __init__(self, *, os, architecture, variant=None, **kwargs) -> None: + super(PlatformProperties, self).__init__(**kwargs) + self.os = os + self.architecture = architecture + self.variant = variant diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_update_parameters.py new file mode 100644 index 000000000000..c6ab1705597c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_update_parameters.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class PlatformUpdateParameters(Model): + """The properties for updating the platform configuration. + + :param os: The operating system type required for the run. Possible values + include: 'Windows', 'Linux' + :type os: str or ~azure.mgmt.containerregistry.v2018_09_01.models.OS + :param architecture: The OS architecture. Possible values include: + 'amd64', 'x86', 'arm' + :type architecture: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Architecture + :param variant: Variant of the CPU. Possible values include: 'v6', 'v7', + 'v8' + :type variant: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Variant + """ + + _attribute_map = { + 'os': {'key': 'os', 'type': 'str'}, + 'architecture': {'key': 'architecture', 'type': 'str'}, + 'variant': {'key': 'variant', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PlatformUpdateParameters, self).__init__(**kwargs) + self.os = kwargs.get('os', None) + self.architecture = kwargs.get('architecture', None) + self.variant = kwargs.get('variant', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_update_parameters_py3.py new file mode 100644 index 000000000000..f02f2504c2f2 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/platform_update_parameters_py3.py @@ -0,0 +1,41 @@ +# 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.serialization import Model + + +class PlatformUpdateParameters(Model): + """The properties for updating the platform configuration. + + :param os: The operating system type required for the run. Possible values + include: 'Windows', 'Linux' + :type os: str or ~azure.mgmt.containerregistry.v2018_09_01.models.OS + :param architecture: The OS architecture. Possible values include: + 'amd64', 'x86', 'arm' + :type architecture: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Architecture + :param variant: Variant of the CPU. Possible values include: 'v6', 'v7', + 'v8' + :type variant: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Variant + """ + + _attribute_map = { + 'os': {'key': 'os', 'type': 'str'}, + 'architecture': {'key': 'architecture', 'type': 'str'}, + 'variant': {'key': 'variant', 'type': 'str'}, + } + + def __init__(self, *, os=None, architecture=None, variant=None, **kwargs) -> None: + super(PlatformUpdateParameters, self).__init__(**kwargs) + self.os = os + self.architecture = architecture + self.variant = variant diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/proxy_resource.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/proxy_resource.py new file mode 100644 index 000000000000..5c52aad9de10 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/proxy_resource.py @@ -0,0 +1,46 @@ +# 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.serialization import Model + + +class ProxyResource(Model): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/proxy_resource_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/proxy_resource_py3.py new file mode 100644 index 000000000000..d310c7cbf9b1 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/proxy_resource_py3.py @@ -0,0 +1,46 @@ +# 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.serialization import Model + + +class ProxyResource(Model): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quarantine_policy.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quarantine_policy.py new file mode 100644 index 000000000000..c4ccf93a7e6b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quarantine_policy.py @@ -0,0 +1,30 @@ +# 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.serialization import Model + + +class QuarantinePolicy(Model): + """An object that represents quarantine policy for a container registry. + + :param status: The value that indicates whether the policy is enabled or + not. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.PolicyStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QuarantinePolicy, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quarantine_policy_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quarantine_policy_py3.py new file mode 100644 index 000000000000..33810811b758 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quarantine_policy_py3.py @@ -0,0 +1,30 @@ +# 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.serialization import Model + + +class QuarantinePolicy(Model): + """An object that represents quarantine policy for a container registry. + + :param status: The value that indicates whether the policy is enabled or + not. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.PolicyStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(QuarantinePolicy, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quick_task_run_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quick_task_run_request.py new file mode 100644 index 000000000000..af2bbf8792e3 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quick_task_run_request.py @@ -0,0 +1,72 @@ +# 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 .run_request import RunRequest + + +class QuickTaskRunRequest(RunRequest): + """The parameters for a quick task run request. + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + :param task_definition_content: Required. Base64 encoded value of the + template/definition file content. + :type task_definition_content: str + :param values_content: Base64 encoded value of the parameters/values file + content. + :type values_content: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + :param timeout: Build timeout in seconds. Default value: 3600 . + :type timeout: int + :param platform: Required. The platform properties against which the build + will happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the build agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + """ + + _validation = { + 'type': {'required': True}, + 'task_definition_content': {'required': True}, + 'timeout': {'maximum': 28800, 'minimum': 300}, + 'platform': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'task_definition_content': {'key': 'taskDefinitionContent', 'type': 'str'}, + 'values_content': {'key': 'valuesContent', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + 'platform': {'key': 'platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'}, + } + + def __init__(self, **kwargs): + super(QuickTaskRunRequest, self).__init__(**kwargs) + self.task_definition_content = kwargs.get('task_definition_content', None) + self.values_content = kwargs.get('values_content', None) + self.values = kwargs.get('values', None) + self.timeout = kwargs.get('timeout', 3600) + self.platform = kwargs.get('platform', None) + self.agent_configuration = kwargs.get('agent_configuration', None) + self.type = 'QuickTaskRunRequest' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quick_task_run_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quick_task_run_request_py3.py new file mode 100644 index 000000000000..4fd62bb603b3 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/quick_task_run_request_py3.py @@ -0,0 +1,72 @@ +# 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 .run_request_py3 import RunRequest + + +class QuickTaskRunRequest(RunRequest): + """The parameters for a quick task run request. + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + :param task_definition_content: Required. Base64 encoded value of the + template/definition file content. + :type task_definition_content: str + :param values_content: Base64 encoded value of the parameters/values file + content. + :type values_content: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + :param timeout: Build timeout in seconds. Default value: 3600 . + :type timeout: int + :param platform: Required. The platform properties against which the build + will happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the build agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + """ + + _validation = { + 'type': {'required': True}, + 'task_definition_content': {'required': True}, + 'timeout': {'maximum': 28800, 'minimum': 300}, + 'platform': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'task_definition_content': {'key': 'taskDefinitionContent', 'type': 'str'}, + 'values_content': {'key': 'valuesContent', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + 'platform': {'key': 'platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'}, + } + + def __init__(self, *, task_definition_content: str, platform, is_archive_enabled: bool=False, values_content: str=None, values=None, timeout: int=3600, agent_configuration=None, **kwargs) -> None: + super(QuickTaskRunRequest, self).__init__(is_archive_enabled=is_archive_enabled, **kwargs) + self.task_definition_content = task_definition_content + self.values_content = values_content + self.values = values + self.timeout = timeout + self.platform = platform + self.agent_configuration = agent_configuration + self.type = 'QuickTaskRunRequest' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/regenerate_credential_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/regenerate_credential_parameters.py new file mode 100644 index 000000000000..621e21598fd1 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/regenerate_credential_parameters.py @@ -0,0 +1,37 @@ +# 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.serialization import Model + + +class RegenerateCredentialParameters(Model): + """The parameters used to regenerate the login credential. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Specifies name of the password which should be + regenerated -- password or password2. Possible values include: 'password', + 'password2' + :type name: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.PasswordName + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'PasswordName'}, + } + + def __init__(self, **kwargs): + super(RegenerateCredentialParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/regenerate_credential_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/regenerate_credential_parameters_py3.py new file mode 100644 index 000000000000..d860cd10fc97 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/regenerate_credential_parameters_py3.py @@ -0,0 +1,37 @@ +# 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.serialization import Model + + +class RegenerateCredentialParameters(Model): + """The parameters used to regenerate the login credential. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Specifies name of the password which should be + regenerated -- password or password2. Possible values include: 'password', + 'password2' + :type name: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.PasswordName + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'PasswordName'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(RegenerateCredentialParameters, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry.py new file mode 100644 index 000000000000..620129cafebf --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry.py @@ -0,0 +1,94 @@ +# 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 .resource import Resource + + +class Registry(Resource): + """An object that represents a container registry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param sku: Required. The SKU of the container registry. + :type sku: ~azure.mgmt.containerregistry.v2018_09_01.models.Sku + :ivar login_server: The URL that can be used to log into the container + registry. + :vartype login_server: str + :ivar creation_date: The creation date of the container registry in + ISO8601 format. + :vartype creation_date: datetime + :ivar provisioning_state: The provisioning state of the container registry + at the time the operation was called. Possible values include: 'Creating', + 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + :ivar status: The status of the container registry at the time the + operation was called. + :vartype status: ~azure.mgmt.containerregistry.v2018_09_01.models.Status + :param admin_user_enabled: The value that indicates whether the admin user + is enabled. Default value: False . + :type admin_user_enabled: bool + :param storage_account: The properties of the storage account for the + container registry. Only applicable to Classic SKU. + :type storage_account: + ~azure.mgmt.containerregistry.v2018_09_01.models.StorageAccountProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + 'login_server': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'login_server': {'key': 'properties.loginServer', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + } + + def __init__(self, **kwargs): + super(Registry, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.login_server = None + self.creation_date = None + self.provisioning_state = None + self.status = None + self.admin_user_enabled = kwargs.get('admin_user_enabled', False) + self.storage_account = kwargs.get('storage_account', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_list_credentials_result.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_list_credentials_result.py new file mode 100644 index 000000000000..5b48b116175b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_list_credentials_result.py @@ -0,0 +1,33 @@ +# 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.serialization import Model + + +class RegistryListCredentialsResult(Model): + """The response from the ListCredentials operation. + + :param username: The username for a container registry. + :type username: str + :param passwords: The list of passwords for a container registry. + :type passwords: + list[~azure.mgmt.containerregistry.v2018_09_01.models.RegistryPassword] + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[RegistryPassword]'}, + } + + def __init__(self, **kwargs): + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.passwords = kwargs.get('passwords', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_list_credentials_result_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_list_credentials_result_py3.py new file mode 100644 index 000000000000..7b59229be4dd --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_list_credentials_result_py3.py @@ -0,0 +1,33 @@ +# 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.serialization import Model + + +class RegistryListCredentialsResult(Model): + """The response from the ListCredentials operation. + + :param username: The username for a container registry. + :type username: str + :param passwords: The list of passwords for a container registry. + :type passwords: + list[~azure.mgmt.containerregistry.v2018_09_01.models.RegistryPassword] + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[RegistryPassword]'}, + } + + def __init__(self, *, username: str=None, passwords=None, **kwargs) -> None: + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.username = username + self.passwords = passwords diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_check_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_check_request.py new file mode 100644 index 000000000000..9d4a575eac04 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_check_request.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class RegistryNameCheckRequest(Model): + """A request to check whether a container registry name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the container registry. + :type name: str + :ivar type: Required. The resource type of the container registry. This + field must be set to 'Microsoft.ContainerRegistry/registries'. Default + value: "Microsoft.ContainerRegistry/registries" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': r'^[a-zA-Z0-9]*$'}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.ContainerRegistry/registries" + + def __init__(self, **kwargs): + super(RegistryNameCheckRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_check_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_check_request_py3.py new file mode 100644 index 000000000000..67f5ff9be671 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_check_request_py3.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class RegistryNameCheckRequest(Model): + """A request to check whether a container registry name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the container registry. + :type name: str + :ivar type: Required. The resource type of the container registry. This + field must be set to 'Microsoft.ContainerRegistry/registries'. Default + value: "Microsoft.ContainerRegistry/registries" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': r'^[a-zA-Z0-9]*$'}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.ContainerRegistry/registries" + + def __init__(self, *, name: str, **kwargs) -> None: + super(RegistryNameCheckRequest, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_status.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_status.py new file mode 100644 index 000000000000..94345ba6d549 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_status.py @@ -0,0 +1,39 @@ +# 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.serialization import Model + + +class RegistryNameStatus(Model): + """The result of a request to check the availability of a container registry + name. + + :param name_available: The value that indicates whether the name is + available. + :type name_available: bool + :param reason: If any, the reason that the name is not available. + :type reason: str + :param message: If any, the error message that provides more detail for + the reason that the name is not available. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistryNameStatus, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_status_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_status_py3.py new file mode 100644 index 000000000000..8b7b264c2d0d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_name_status_py3.py @@ -0,0 +1,39 @@ +# 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.serialization import Model + + +class RegistryNameStatus(Model): + """The result of a request to check the availability of a container registry + name. + + :param name_available: The value that indicates whether the name is + available. + :type name_available: bool + :param reason: If any, the reason that the name is not available. + :type reason: str + :param message: If any, the error message that provides more detail for + the reason that the name is not available. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + super(RegistryNameStatus, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_paged.py new file mode 100644 index 000000000000..ff498337cb67 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class RegistryPaged(Paged): + """ + A paging container for iterating over a list of :class:`Registry ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Registry]'} + } + + def __init__(self, *args, **kwargs): + + super(RegistryPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_password.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_password.py new file mode 100644 index 000000000000..eda69d0e626f --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_password.py @@ -0,0 +1,34 @@ +# 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.serialization import Model + + +class RegistryPassword(Model): + """The login password for the container registry. + + :param name: The password name. Possible values include: 'password', + 'password2' + :type name: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.PasswordName + :param value: The password value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'PasswordName'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistryPassword, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_password_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_password_py3.py new file mode 100644 index 000000000000..8bbbb90f7ce0 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_password_py3.py @@ -0,0 +1,34 @@ +# 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.serialization import Model + + +class RegistryPassword(Model): + """The login password for the container registry. + + :param name: The password name. Possible values include: 'password', + 'password2' + :type name: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.PasswordName + :param value: The password value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'PasswordName'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name=None, value: str=None, **kwargs) -> None: + super(RegistryPassword, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_policies.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_policies.py new file mode 100644 index 000000000000..0dd49dfe55d6 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_policies.py @@ -0,0 +1,36 @@ +# 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.serialization import Model + + +class RegistryPolicies(Model): + """An object that represents policies for a container registry. + + :param quarantine_policy: An object that represents quarantine policy for + a container registry. + :type quarantine_policy: + ~azure.mgmt.containerregistry.v2018_09_01.models.QuarantinePolicy + :param trust_policy: An object that represents content trust policy for a + container registry. + :type trust_policy: + ~azure.mgmt.containerregistry.v2018_09_01.models.TrustPolicy + """ + + _attribute_map = { + 'quarantine_policy': {'key': 'quarantinePolicy', 'type': 'QuarantinePolicy'}, + 'trust_policy': {'key': 'trustPolicy', 'type': 'TrustPolicy'}, + } + + def __init__(self, **kwargs): + super(RegistryPolicies, self).__init__(**kwargs) + self.quarantine_policy = kwargs.get('quarantine_policy', None) + self.trust_policy = kwargs.get('trust_policy', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_policies_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_policies_py3.py new file mode 100644 index 000000000000..a229cd295473 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_policies_py3.py @@ -0,0 +1,36 @@ +# 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.serialization import Model + + +class RegistryPolicies(Model): + """An object that represents policies for a container registry. + + :param quarantine_policy: An object that represents quarantine policy for + a container registry. + :type quarantine_policy: + ~azure.mgmt.containerregistry.v2018_09_01.models.QuarantinePolicy + :param trust_policy: An object that represents content trust policy for a + container registry. + :type trust_policy: + ~azure.mgmt.containerregistry.v2018_09_01.models.TrustPolicy + """ + + _attribute_map = { + 'quarantine_policy': {'key': 'quarantinePolicy', 'type': 'QuarantinePolicy'}, + 'trust_policy': {'key': 'trustPolicy', 'type': 'TrustPolicy'}, + } + + def __init__(self, *, quarantine_policy=None, trust_policy=None, **kwargs) -> None: + super(RegistryPolicies, self).__init__(**kwargs) + self.quarantine_policy = quarantine_policy + self.trust_policy = trust_policy diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_py3.py new file mode 100644 index 000000000000..049a2b708dcb --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_py3.py @@ -0,0 +1,94 @@ +# 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 .resource_py3 import Resource + + +class Registry(Resource): + """An object that represents a container registry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param sku: Required. The SKU of the container registry. + :type sku: ~azure.mgmt.containerregistry.v2018_09_01.models.Sku + :ivar login_server: The URL that can be used to log into the container + registry. + :vartype login_server: str + :ivar creation_date: The creation date of the container registry in + ISO8601 format. + :vartype creation_date: datetime + :ivar provisioning_state: The provisioning state of the container registry + at the time the operation was called. Possible values include: 'Creating', + 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + :ivar status: The status of the container registry at the time the + operation was called. + :vartype status: ~azure.mgmt.containerregistry.v2018_09_01.models.Status + :param admin_user_enabled: The value that indicates whether the admin user + is enabled. Default value: False . + :type admin_user_enabled: bool + :param storage_account: The properties of the storage account for the + container registry. Only applicable to Classic SKU. + :type storage_account: + ~azure.mgmt.containerregistry.v2018_09_01.models.StorageAccountProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + 'login_server': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'login_server': {'key': 'properties.loginServer', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + } + + def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=False, storage_account=None, **kwargs) -> None: + super(Registry, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.login_server = None + self.creation_date = None + self.provisioning_state = None + self.status = None + self.admin_user_enabled = admin_user_enabled + self.storage_account = storage_account diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters.py new file mode 100644 index 000000000000..fa3786ebd673 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class RegistryUpdateParameters(Model): + """The parameters for updating a container registry. + + :param tags: The tags for the container registry. + :type tags: dict[str, str] + :param sku: The SKU of the container registry. + :type sku: ~azure.mgmt.containerregistry.v2018_09_01.models.Sku + :param admin_user_enabled: The value that indicates whether the admin user + is enabled. + :type admin_user_enabled: bool + :param storage_account: The parameters of a storage account for the + container registry. Only applicable to Classic SKU. If specified, the + storage account must be in the same physical location as the container + registry. + :type storage_account: + ~azure.mgmt.containerregistry.v2018_09_01.models.StorageAccountProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + } + + def __init__(self, **kwargs): + super(RegistryUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.admin_user_enabled = kwargs.get('admin_user_enabled', None) + self.storage_account = kwargs.get('storage_account', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters_py3.py new file mode 100644 index 000000000000..c487af741eff --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters_py3.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class RegistryUpdateParameters(Model): + """The parameters for updating a container registry. + + :param tags: The tags for the container registry. + :type tags: dict[str, str] + :param sku: The SKU of the container registry. + :type sku: ~azure.mgmt.containerregistry.v2018_09_01.models.Sku + :param admin_user_enabled: The value that indicates whether the admin user + is enabled. + :type admin_user_enabled: bool + :param storage_account: The parameters of a storage account for the + container registry. Only applicable to Classic SKU. If specified, the + storage account must be in the same physical location as the container + registry. + :type storage_account: + ~azure.mgmt.containerregistry.v2018_09_01.models.StorageAccountProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + } + + def __init__(self, *, tags=None, sku=None, admin_user_enabled: bool=None, storage_account=None, **kwargs) -> None: + super(RegistryUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + self.admin_user_enabled = admin_user_enabled + self.storage_account = storage_account diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage.py new file mode 100644 index 000000000000..8d196c7711f8 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage.py @@ -0,0 +1,42 @@ +# 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.serialization import Model + + +class RegistryUsage(Model): + """The quota usage for a container registry. + + :param name: The name of the usage. + :type name: str + :param limit: The limit of the usage. + :type limit: long + :param current_value: The current value of the usage. + :type current_value: long + :param unit: The unit of measurement. Possible values include: 'Count', + 'Bytes' + :type unit: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryUsageUnit + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistryUsage, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.limit = kwargs.get('limit', None) + self.current_value = kwargs.get('current_value', None) + self.unit = kwargs.get('unit', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage_list_result.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage_list_result.py new file mode 100644 index 000000000000..bb2cddc211f3 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage_list_result.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class RegistryUsageListResult(Model): + """The result of a request to get container registry quota usages. + + :param value: The list of container registry quota usages. + :type value: + list[~azure.mgmt.containerregistry.v2018_09_01.models.RegistryUsage] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RegistryUsage]'}, + } + + def __init__(self, **kwargs): + super(RegistryUsageListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage_list_result_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage_list_result_py3.py new file mode 100644 index 000000000000..7c29c148e01c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage_list_result_py3.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class RegistryUsageListResult(Model): + """The result of a request to get container registry quota usages. + + :param value: The list of container registry quota usages. + :type value: + list[~azure.mgmt.containerregistry.v2018_09_01.models.RegistryUsage] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RegistryUsage]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(RegistryUsageListResult, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage_py3.py new file mode 100644 index 000000000000..4580c01f22c3 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_usage_py3.py @@ -0,0 +1,42 @@ +# 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.serialization import Model + + +class RegistryUsage(Model): + """The quota usage for a container registry. + + :param name: The name of the usage. + :type name: str + :param limit: The limit of the usage. + :type limit: long + :param current_value: The current value of the usage. + :type current_value: long + :param unit: The unit of measurement. Possible values include: 'Count', + 'Bytes' + :type unit: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryUsageUnit + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, limit: int=None, current_value: int=None, unit=None, **kwargs) -> None: + super(RegistryUsage, self).__init__(**kwargs) + self.name = name + self.limit = limit + self.current_value = current_value + self.unit = unit diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication.py new file mode 100644 index 000000000000..dc224cae74df --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication.py @@ -0,0 +1,66 @@ +# 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 .resource import Resource + + +class Replication(Resource): + """An object that represents a replication for a container registry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar provisioning_state: The provisioning state of the replication at the + time the operation was called. Possible values include: 'Creating', + 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + :ivar status: The status of the replication at the time the operation was + called. + :vartype status: ~azure.mgmt.containerregistry.v2018_09_01.models.Status + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + } + + def __init__(self, **kwargs): + super(Replication, self).__init__(**kwargs) + self.provisioning_state = None + self.status = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_paged.py new file mode 100644 index 000000000000..8f088e8f72f6 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class ReplicationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Replication ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Replication]'} + } + + def __init__(self, *args, **kwargs): + + super(ReplicationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_py3.py new file mode 100644 index 000000000000..73bebd419cdb --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_py3.py @@ -0,0 +1,66 @@ +# 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 .resource_py3 import Resource + + +class Replication(Resource): + """An object that represents a replication for a container registry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar provisioning_state: The provisioning state of the replication at the + time the operation was called. Possible values include: 'Creating', + 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + :ivar status: The status of the replication at the time the operation was + called. + :vartype status: ~azure.mgmt.containerregistry.v2018_09_01.models.Status + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Replication, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.status = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_update_parameters.py new file mode 100644 index 000000000000..003b15583a55 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_update_parameters.py @@ -0,0 +1,28 @@ +# 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.serialization import Model + + +class ReplicationUpdateParameters(Model): + """The parameters for updating a replication. + + :param tags: The tags for the replication. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ReplicationUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_update_parameters_py3.py new file mode 100644 index 000000000000..5497bcdbc1f7 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/replication_update_parameters_py3.py @@ -0,0 +1,28 @@ +# 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.serialization import Model + + +class ReplicationUpdateParameters(Model): + """The parameters for updating a replication. + + :param tags: The tags for the replication. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ReplicationUpdateParameters, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/request.py new file mode 100644 index 000000000000..e08090f53205 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/request.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class Request(Model): + """The request that generated the event. + + :param id: The ID of the request that initiated the event. + :type id: str + :param addr: The IP or hostname and possibly port of the client connection + that initiated the event. This is the RemoteAddr from the standard http + request. + :type addr: str + :param host: The externally accessible hostname of the registry instance, + as specified by the http host header on incoming requests. + :type host: str + :param method: The request method that generated the event. + :type method: str + :param useragent: The user agent header of the request. + :type useragent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'addr': {'key': 'addr', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'useragent': {'key': 'useragent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Request, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.addr = kwargs.get('addr', None) + self.host = kwargs.get('host', None) + self.method = kwargs.get('method', None) + self.useragent = kwargs.get('useragent', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/request_py3.py new file mode 100644 index 000000000000..f42dae28c955 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/request_py3.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class Request(Model): + """The request that generated the event. + + :param id: The ID of the request that initiated the event. + :type id: str + :param addr: The IP or hostname and possibly port of the client connection + that initiated the event. This is the RemoteAddr from the standard http + request. + :type addr: str + :param host: The externally accessible hostname of the registry instance, + as specified by the http host header on incoming requests. + :type host: str + :param method: The request method that generated the event. + :type method: str + :param useragent: The user agent header of the request. + :type useragent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'addr': {'key': 'addr', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'useragent': {'key': 'useragent', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, addr: str=None, host: str=None, method: str=None, useragent: str=None, **kwargs) -> None: + super(Request, self).__init__(**kwargs) + self.id = id + self.addr = addr + self.host = host + self.method = method + self.useragent = useragent diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/resource.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/resource.py new file mode 100644 index 000000000000..3965a6f0cf40 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/resource.py @@ -0,0 +1,57 @@ +# 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.serialization import Model + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/resource_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/resource_py3.py new file mode 100644 index 000000000000..3a1d4bc4edd1 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/resource_py3.py @@ -0,0 +1,57 @@ +# 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.serialization import Model + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run.py new file mode 100644 index 000000000000..37939d0b4251 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run.py @@ -0,0 +1,119 @@ +# 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 .proxy_resource import ProxyResource + + +class Run(ProxyResource): + """Run resource properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param run_id: The unique identifier for the run. + :type run_id: str + :param status: The current status of the run. Possible values include: + 'Queued', 'Started', 'Running', 'Succeeded', 'Failed', 'Canceled', + 'Error', 'Timeout' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RunStatus + :param last_updated_time: The last updated time for the run. + :type last_updated_time: datetime + :param run_type: The type of run. Possible values include: 'QuickBuild', + 'AutoBuild' + :type run_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RunType + :param create_time: The time the run was scheduled. + :type create_time: datetime + :param start_time: The time the run started. + :type start_time: datetime + :param finish_time: The time the run finished. + :type finish_time: datetime + :param output_images: The list of all images that were generated from the + run. This is applicable if the run is of type Build. + :type output_images: + list[~azure.mgmt.containerregistry.v2018_09_01.models.ImageDescriptor] + :param task: The task against which run was scheduled. + :type task: str + :param image_update_trigger: The image update trigger that caused the run. + This is applicable if the task is of build type. + :type image_update_trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.ImageUpdateTrigger + :param source_trigger: The source trigger that caused the run. + :type source_trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceTriggerDescriptor + :param is_archive_enabled: The value that indicates whether archiving is + enabled or not. Default value: False . + :type is_archive_enabled: bool + :param platform: The platform properties against which the run will + happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the run agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + :param provisioning_state: The provisioning state of a run. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', + 'Canceled' + :type provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'run_id': {'key': 'properties.runId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + 'run_type': {'key': 'properties.runType', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'finish_time': {'key': 'properties.finishTime', 'type': 'iso-8601'}, + 'output_images': {'key': 'properties.outputImages', 'type': '[ImageDescriptor]'}, + 'task': {'key': 'properties.task', 'type': 'str'}, + 'image_update_trigger': {'key': 'properties.imageUpdateTrigger', 'type': 'ImageUpdateTrigger'}, + 'source_trigger': {'key': 'properties.sourceTrigger', 'type': 'SourceTriggerDescriptor'}, + 'is_archive_enabled': {'key': 'properties.isArchiveEnabled', 'type': 'bool'}, + 'platform': {'key': 'properties.platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentProperties'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Run, self).__init__(**kwargs) + self.run_id = kwargs.get('run_id', None) + self.status = kwargs.get('status', None) + self.last_updated_time = kwargs.get('last_updated_time', None) + self.run_type = kwargs.get('run_type', None) + self.create_time = kwargs.get('create_time', None) + self.start_time = kwargs.get('start_time', None) + self.finish_time = kwargs.get('finish_time', None) + self.output_images = kwargs.get('output_images', None) + self.task = kwargs.get('task', None) + self.image_update_trigger = kwargs.get('image_update_trigger', None) + self.source_trigger = kwargs.get('source_trigger', None) + self.is_archive_enabled = kwargs.get('is_archive_enabled', False) + self.platform = kwargs.get('platform', None) + self.agent_configuration = kwargs.get('agent_configuration', None) + self.provisioning_state = kwargs.get('provisioning_state', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_filter.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_filter.py new file mode 100644 index 000000000000..636dbfa86891 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_filter.py @@ -0,0 +1,64 @@ +# 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.serialization import Model + + +class RunFilter(Model): + """Properties that are enabled for Odata querying on runs. + + :param run_id: The unique identifier for the run. + :type run_id: str + :param run_type: The type of run. Possible values include: 'QuickBuild', + 'AutoBuild' + :type run_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RunType + :param status: The current status of the run. Possible values include: + 'Queued', 'Started', 'Running', 'Succeeded', 'Failed', 'Canceled', + 'Error', 'Timeout' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RunStatus + :param create_time: The create time for a run. + :type create_time: datetime + :param finish_time: The time the run finished. + :type finish_time: datetime + :param output_image_manifests: The list of comma-separated image manifests + that were generated from the run. This is applicable if the run is of + build type. + :type output_image_manifests: str + :param is_archive_enabled: The value that indicates whether archiving is + enabled or not. + :type is_archive_enabled: bool + :param task_name: The name of the task that the run corresponds to. + :type task_name: str + """ + + _attribute_map = { + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_type': {'key': 'runType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'output_image_manifests': {'key': 'outputImageManifests', 'type': 'str'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunFilter, self).__init__(**kwargs) + self.run_id = kwargs.get('run_id', None) + self.run_type = kwargs.get('run_type', None) + self.status = kwargs.get('status', None) + self.create_time = kwargs.get('create_time', None) + self.finish_time = kwargs.get('finish_time', None) + self.output_image_manifests = kwargs.get('output_image_manifests', None) + self.is_archive_enabled = kwargs.get('is_archive_enabled', None) + self.task_name = kwargs.get('task_name', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_filter_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_filter_py3.py new file mode 100644 index 000000000000..41534281efba --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_filter_py3.py @@ -0,0 +1,64 @@ +# 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.serialization import Model + + +class RunFilter(Model): + """Properties that are enabled for Odata querying on runs. + + :param run_id: The unique identifier for the run. + :type run_id: str + :param run_type: The type of run. Possible values include: 'QuickBuild', + 'AutoBuild' + :type run_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RunType + :param status: The current status of the run. Possible values include: + 'Queued', 'Started', 'Running', 'Succeeded', 'Failed', 'Canceled', + 'Error', 'Timeout' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RunStatus + :param create_time: The create time for a run. + :type create_time: datetime + :param finish_time: The time the run finished. + :type finish_time: datetime + :param output_image_manifests: The list of comma-separated image manifests + that were generated from the run. This is applicable if the run is of + build type. + :type output_image_manifests: str + :param is_archive_enabled: The value that indicates whether archiving is + enabled or not. + :type is_archive_enabled: bool + :param task_name: The name of the task that the run corresponds to. + :type task_name: str + """ + + _attribute_map = { + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_type': {'key': 'runType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'output_image_manifests': {'key': 'outputImageManifests', 'type': 'str'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__(self, *, run_id: str=None, run_type=None, status=None, create_time=None, finish_time=None, output_image_manifests: str=None, is_archive_enabled: bool=None, task_name: str=None, **kwargs) -> None: + super(RunFilter, self).__init__(**kwargs) + self.run_id = run_id + self.run_type = run_type + self.status = status + self.create_time = create_time + self.finish_time = finish_time + self.output_image_manifests = output_image_manifests + self.is_archive_enabled = is_archive_enabled + self.task_name = task_name diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_get_log_result.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_get_log_result.py new file mode 100644 index 000000000000..bfe07c60ccee --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_get_log_result.py @@ -0,0 +1,28 @@ +# 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.serialization import Model + + +class RunGetLogResult(Model): + """The result of get log link operation. + + :param log_link: The link to logs for a run on a azure container registry. + :type log_link: str + """ + + _attribute_map = { + 'log_link': {'key': 'logLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunGetLogResult, self).__init__(**kwargs) + self.log_link = kwargs.get('log_link', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_get_log_result_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_get_log_result_py3.py new file mode 100644 index 000000000000..dc68e84d93db --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_get_log_result_py3.py @@ -0,0 +1,28 @@ +# 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.serialization import Model + + +class RunGetLogResult(Model): + """The result of get log link operation. + + :param log_link: The link to logs for a run on a azure container registry. + :type log_link: str + """ + + _attribute_map = { + 'log_link': {'key': 'logLink', 'type': 'str'}, + } + + def __init__(self, *, log_link: str=None, **kwargs) -> None: + super(RunGetLogResult, self).__init__(**kwargs) + self.log_link = log_link diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_paged.py new file mode 100644 index 000000000000..ff11871fbc20 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class RunPaged(Paged): + """ + A paging container for iterating over a list of :class:`Run ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Run]'} + } + + def __init__(self, *args, **kwargs): + + super(RunPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_py3.py new file mode 100644 index 000000000000..7c72e5ba30b1 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_py3.py @@ -0,0 +1,119 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class Run(ProxyResource): + """Run resource properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param run_id: The unique identifier for the run. + :type run_id: str + :param status: The current status of the run. Possible values include: + 'Queued', 'Started', 'Running', 'Succeeded', 'Failed', 'Canceled', + 'Error', 'Timeout' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RunStatus + :param last_updated_time: The last updated time for the run. + :type last_updated_time: datetime + :param run_type: The type of run. Possible values include: 'QuickBuild', + 'AutoBuild' + :type run_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.RunType + :param create_time: The time the run was scheduled. + :type create_time: datetime + :param start_time: The time the run started. + :type start_time: datetime + :param finish_time: The time the run finished. + :type finish_time: datetime + :param output_images: The list of all images that were generated from the + run. This is applicable if the run is of type Build. + :type output_images: + list[~azure.mgmt.containerregistry.v2018_09_01.models.ImageDescriptor] + :param task: The task against which run was scheduled. + :type task: str + :param image_update_trigger: The image update trigger that caused the run. + This is applicable if the task is of build type. + :type image_update_trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.ImageUpdateTrigger + :param source_trigger: The source trigger that caused the run. + :type source_trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceTriggerDescriptor + :param is_archive_enabled: The value that indicates whether archiving is + enabled or not. Default value: False . + :type is_archive_enabled: bool + :param platform: The platform properties against which the run will + happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the run agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + :param provisioning_state: The provisioning state of a run. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', + 'Canceled' + :type provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'run_id': {'key': 'properties.runId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + 'run_type': {'key': 'properties.runType', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'finish_time': {'key': 'properties.finishTime', 'type': 'iso-8601'}, + 'output_images': {'key': 'properties.outputImages', 'type': '[ImageDescriptor]'}, + 'task': {'key': 'properties.task', 'type': 'str'}, + 'image_update_trigger': {'key': 'properties.imageUpdateTrigger', 'type': 'ImageUpdateTrigger'}, + 'source_trigger': {'key': 'properties.sourceTrigger', 'type': 'SourceTriggerDescriptor'}, + 'is_archive_enabled': {'key': 'properties.isArchiveEnabled', 'type': 'bool'}, + 'platform': {'key': 'properties.platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentProperties'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, run_id: str=None, status=None, last_updated_time=None, run_type=None, create_time=None, start_time=None, finish_time=None, output_images=None, task: str=None, image_update_trigger=None, source_trigger=None, is_archive_enabled: bool=False, platform=None, agent_configuration=None, provisioning_state=None, **kwargs) -> None: + super(Run, self).__init__(**kwargs) + self.run_id = run_id + self.status = status + self.last_updated_time = last_updated_time + self.run_type = run_type + self.create_time = create_time + self.start_time = start_time + self.finish_time = finish_time + self.output_images = output_images + self.task = task + self.image_update_trigger = image_update_trigger + self.source_trigger = source_trigger + self.is_archive_enabled = is_archive_enabled + self.platform = platform + self.agent_configuration = agent_configuration + self.provisioning_state = provisioning_state diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_request.py new file mode 100644 index 000000000000..e0ce895246cb --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_request.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class RunRequest(Model): + """The request parameters for scheduling a run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DockerBuildRequest, BuildTaskRequest, TaskRunRequest, + QuickTaskRunRequest + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'DockerBuildRequest': 'DockerBuildRequest', 'BuildTaskRequest': 'BuildTaskRequest', 'TaskRunRequest': 'TaskRunRequest', 'QuickTaskRunRequest': 'QuickTaskRunRequest'} + } + + def __init__(self, **kwargs): + super(RunRequest, self).__init__(**kwargs) + self.is_archive_enabled = kwargs.get('is_archive_enabled', False) + self.type = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_request_py3.py new file mode 100644 index 000000000000..077b8dbdab54 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_request_py3.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class RunRequest(Model): + """The request parameters for scheduling a run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DockerBuildRequest, BuildTaskRequest, TaskRunRequest, + QuickTaskRunRequest + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'DockerBuildRequest': 'DockerBuildRequest', 'BuildTaskRequest': 'BuildTaskRequest', 'TaskRunRequest': 'TaskRunRequest', 'QuickTaskRunRequest': 'QuickTaskRunRequest'} + } + + def __init__(self, *, is_archive_enabled: bool=False, **kwargs) -> None: + super(RunRequest, self).__init__(**kwargs) + self.is_archive_enabled = is_archive_enabled + self.type = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step.py new file mode 100644 index 000000000000..55941e804026 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step.py @@ -0,0 +1,59 @@ +# 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 .task_step_properties import TaskStepProperties + + +class RunTaskStep(TaskStepProperties): + """The properties of a generic task run step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar base_image_dependencies: List of base image dependencies for a step. + :vartype base_image_dependencies: + list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency] + :param type: Required. Constant filled by server. + :type type: str + :param task_definition_content: Required. Base64 encoded value of the + template/definition file content. + :type task_definition_content: str + :param values_content: Base64 encoded value of the parameters/values file + content. + :type values_content: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + """ + + _validation = { + 'base_image_dependencies': {'readonly': True}, + 'type': {'required': True}, + 'task_definition_content': {'required': True}, + } + + _attribute_map = { + 'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'task_definition_content': {'key': 'taskDefinitionContent', 'type': 'str'}, + 'values_content': {'key': 'valuesContent', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + } + + def __init__(self, **kwargs): + super(RunTaskStep, self).__init__(**kwargs) + self.task_definition_content = kwargs.get('task_definition_content', None) + self.values_content = kwargs.get('values_content', None) + self.values = kwargs.get('values', None) + self.type = 'RunTask' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step_py3.py new file mode 100644 index 000000000000..0e4fec566752 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step_py3.py @@ -0,0 +1,59 @@ +# 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 .task_step_properties_py3 import TaskStepProperties + + +class RunTaskStep(TaskStepProperties): + """The properties of a generic task run step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar base_image_dependencies: List of base image dependencies for a step. + :vartype base_image_dependencies: + list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency] + :param type: Required. Constant filled by server. + :type type: str + :param task_definition_content: Required. Base64 encoded value of the + template/definition file content. + :type task_definition_content: str + :param values_content: Base64 encoded value of the parameters/values file + content. + :type values_content: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + """ + + _validation = { + 'base_image_dependencies': {'readonly': True}, + 'type': {'required': True}, + 'task_definition_content': {'required': True}, + } + + _attribute_map = { + 'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'task_definition_content': {'key': 'taskDefinitionContent', 'type': 'str'}, + 'values_content': {'key': 'valuesContent', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + } + + def __init__(self, *, task_definition_content: str, values_content: str=None, values=None, **kwargs) -> None: + super(RunTaskStep, self).__init__(**kwargs) + self.task_definition_content = task_definition_content + self.values_content = values_content + self.values = values + self.type = 'RunTask' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step_update_parameters.py new file mode 100644 index 000000000000..28375a158476 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step_update_parameters.py @@ -0,0 +1,50 @@ +# 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 .task_step_update_parameters import TaskStepUpdateParameters + + +class RunTaskStepUpdateParameters(TaskStepUpdateParameters): + """The properties for updating generic task run step. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param task_definition_content: Base64 encoded value of the + template/definition file content. + :type task_definition_content: str + :param values_content: Base64 encoded value of the parameters/values file + content. + :type values_content: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'task_definition_content': {'key': 'taskDefinitionContent', 'type': 'str'}, + 'values_content': {'key': 'valuesContent', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + } + + def __init__(self, **kwargs): + super(RunTaskStepUpdateParameters, self).__init__(**kwargs) + self.task_definition_content = kwargs.get('task_definition_content', None) + self.values_content = kwargs.get('values_content', None) + self.values = kwargs.get('values', None) + self.type = 'RunTask' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step_update_parameters_py3.py new file mode 100644 index 000000000000..f8e5842c5c4d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_task_step_update_parameters_py3.py @@ -0,0 +1,50 @@ +# 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 .task_step_update_parameters_py3 import TaskStepUpdateParameters + + +class RunTaskStepUpdateParameters(TaskStepUpdateParameters): + """The properties for updating generic task run step. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param task_definition_content: Base64 encoded value of the + template/definition file content. + :type task_definition_content: str + :param values_content: Base64 encoded value of the parameters/values file + content. + :type values_content: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'task_definition_content': {'key': 'taskDefinitionContent', 'type': 'str'}, + 'values_content': {'key': 'valuesContent', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + } + + def __init__(self, *, task_definition_content: str=None, values_content: str=None, values=None, **kwargs) -> None: + super(RunTaskStepUpdateParameters, self).__init__(**kwargs) + self.task_definition_content = task_definition_content + self.values_content = values_content + self.values = values + self.type = 'RunTask' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_update_parameters.py new file mode 100644 index 000000000000..7c99f1e212d0 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_update_parameters.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class RunUpdateParameters(Model): + """The set of run properties that can be updated. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled or not. + :type is_archive_enabled: bool + """ + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RunUpdateParameters, self).__init__(**kwargs) + self.is_archive_enabled = kwargs.get('is_archive_enabled', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_update_parameters_py3.py new file mode 100644 index 000000000000..62bcd0c6f4bd --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/run_update_parameters_py3.py @@ -0,0 +1,29 @@ +# 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.serialization import Model + + +class RunUpdateParameters(Model): + """The set of run properties that can be updated. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled or not. + :type is_archive_enabled: bool + """ + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + } + + def __init__(self, *, is_archive_enabled: bool=None, **kwargs) -> None: + super(RunUpdateParameters, self).__init__(**kwargs) + self.is_archive_enabled = is_archive_enabled diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/set_value.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/set_value.py new file mode 100644 index 000000000000..ec349f6bb414 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/set_value.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class SetValue(Model): + """The properties of a overridable value that can be passed to a task + template. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the overridable value. + :type name: str + :param value: Required. The overridable value. + :type value: str + :param is_secret: Flag to indicate whether the value represents a secret + or not. Default value: False . + :type is_secret: bool + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SetValue, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.is_secret = kwargs.get('is_secret', False) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/set_value_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/set_value_py3.py new file mode 100644 index 000000000000..cce869040a6a --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/set_value_py3.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class SetValue(Model): + """The properties of a overridable value that can be passed to a task + template. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the overridable value. + :type name: str + :param value: Required. The overridable value. + :type value: str + :param is_secret: Flag to indicate whether the value represents a secret + or not. Default value: False . + :type is_secret: bool + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + } + + def __init__(self, *, name: str, value: str, is_secret: bool=False, **kwargs) -> None: + super(SetValue, self).__init__(**kwargs) + self.name = name + self.value = value + self.is_secret = is_secret diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/sku.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/sku.py new file mode 100644 index 000000000000..b8111d63942b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/sku.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class Sku(Model): + """The SKU of a container registry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The SKU name of the container registry. Required + for registry creation. Possible values include: 'Classic', 'Basic', + 'Standard', 'Premium' + :type name: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SkuName + :ivar tier: The SKU tier based on the SKU name. Possible values include: + 'Classic', 'Basic', 'Standard', 'Premium' + :vartype tier: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/sku_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/sku_py3.py new file mode 100644 index 000000000000..7789497c334e --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/sku_py3.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class Sku(Model): + """The SKU of a container registry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The SKU name of the container registry. Required + for registry creation. Possible values include: 'Classic', 'Basic', + 'Standard', 'Premium' + :type name: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SkuName + :ivar tier: The SKU tier based on the SKU name. Possible values include: + 'Classic', 'Basic', 'Standard', 'Premium' + :vartype tier: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source.py new file mode 100644 index 000000000000..132f4b2c1324 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source.py @@ -0,0 +1,36 @@ +# 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.serialization import Model + + +class Source(Model): + """The registry node that generated the event. Put differently, while the + actor initiates the event, the source generates it. + + :param addr: The IP or hostname and the port of the registry node that + generated the event. Generally, this will be resolved by os.Hostname() + along with the running port. + :type addr: str + :param instance_id: The running instance of an application. Changes after + each restart. + :type instance_id: str + """ + + _attribute_map = { + 'addr': {'key': 'addr', 'type': 'str'}, + 'instance_id': {'key': 'instanceID', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Source, self).__init__(**kwargs) + self.addr = kwargs.get('addr', None) + self.instance_id = kwargs.get('instance_id', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties.py new file mode 100644 index 000000000000..bc3e6cd13811 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties.py @@ -0,0 +1,53 @@ +# 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.serialization import Model + + +class SourceProperties(Model): + """The properties of the source code repository. + + All required parameters must be populated in order to send to Azure. + + :param source_control_type: Required. The type of source control service. + Possible values include: 'Github', 'VisualStudioTeamService' + :type source_control_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceControlType + :param repository_url: Required. The full URL to the source code + respository + :type repository_url: str + :param branch: The branch name of the source code. + :type branch: str + :param source_control_auth_properties: The authorization properties for + accessing the source code repository and to set up + webhooks for notifications. + :type source_control_auth_properties: + ~azure.mgmt.containerregistry.v2018_09_01.models.AuthInfo + """ + + _validation = { + 'source_control_type': {'required': True}, + 'repository_url': {'required': True}, + } + + _attribute_map = { + 'source_control_type': {'key': 'sourceControlType', 'type': 'str'}, + 'repository_url': {'key': 'repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'branch', 'type': 'str'}, + 'source_control_auth_properties': {'key': 'sourceControlAuthProperties', 'type': 'AuthInfo'}, + } + + def __init__(self, **kwargs): + super(SourceProperties, self).__init__(**kwargs) + self.source_control_type = kwargs.get('source_control_type', None) + self.repository_url = kwargs.get('repository_url', None) + self.branch = kwargs.get('branch', None) + self.source_control_auth_properties = kwargs.get('source_control_auth_properties', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties_py3.py new file mode 100644 index 000000000000..b98beec8ab31 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties_py3.py @@ -0,0 +1,53 @@ +# 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.serialization import Model + + +class SourceProperties(Model): + """The properties of the source code repository. + + All required parameters must be populated in order to send to Azure. + + :param source_control_type: Required. The type of source control service. + Possible values include: 'Github', 'VisualStudioTeamService' + :type source_control_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceControlType + :param repository_url: Required. The full URL to the source code + respository + :type repository_url: str + :param branch: The branch name of the source code. + :type branch: str + :param source_control_auth_properties: The authorization properties for + accessing the source code repository and to set up + webhooks for notifications. + :type source_control_auth_properties: + ~azure.mgmt.containerregistry.v2018_09_01.models.AuthInfo + """ + + _validation = { + 'source_control_type': {'required': True}, + 'repository_url': {'required': True}, + } + + _attribute_map = { + 'source_control_type': {'key': 'sourceControlType', 'type': 'str'}, + 'repository_url': {'key': 'repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'branch', 'type': 'str'}, + 'source_control_auth_properties': {'key': 'sourceControlAuthProperties', 'type': 'AuthInfo'}, + } + + def __init__(self, *, source_control_type, repository_url: str, branch: str=None, source_control_auth_properties=None, **kwargs) -> None: + super(SourceProperties, self).__init__(**kwargs) + self.source_control_type = source_control_type + self.repository_url = repository_url + self.branch = branch + self.source_control_auth_properties = source_control_auth_properties diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_py3.py new file mode 100644 index 000000000000..5aadcd407862 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_py3.py @@ -0,0 +1,36 @@ +# 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.serialization import Model + + +class Source(Model): + """The registry node that generated the event. Put differently, while the + actor initiates the event, the source generates it. + + :param addr: The IP or hostname and the port of the registry node that + generated the event. Generally, this will be resolved by os.Hostname() + along with the running port. + :type addr: str + :param instance_id: The running instance of an application. Changes after + each restart. + :type instance_id: str + """ + + _attribute_map = { + 'addr': {'key': 'addr', 'type': 'str'}, + 'instance_id': {'key': 'instanceID', 'type': 'str'}, + } + + def __init__(self, *, addr: str=None, instance_id: str=None, **kwargs) -> None: + super(Source, self).__init__(**kwargs) + self.addr = addr + self.instance_id = instance_id diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger.py new file mode 100644 index 000000000000..da78e29a820f --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger.py @@ -0,0 +1,54 @@ +# 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.serialization import Model + + +class SourceTrigger(Model): + """The properties of a source based trigger. + + All required parameters must be populated in order to send to Azure. + + :param source_repository: Required. The properties that describes the + source(code) for the task. + :type source_repository: + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceProperties + :param source_trigger_events: Required. The source event corresponding to + the trigger. + :type source_trigger_events: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceTriggerEvent] + :param status: The current status of build trigger. Possible values + include: 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus + :param name: Required. The name of the trigger. + :type name: str + """ + + _validation = { + 'source_repository': {'required': True}, + 'source_trigger_events': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'source_repository': {'key': 'sourceRepository', 'type': 'SourceProperties'}, + 'source_trigger_events': {'key': 'sourceTriggerEvents', 'type': '[str]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceTrigger, self).__init__(**kwargs) + self.source_repository = kwargs.get('source_repository', None) + self.source_trigger_events = kwargs.get('source_trigger_events', None) + self.status = kwargs.get('status', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_descriptor.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_descriptor.py new file mode 100644 index 000000000000..4ee9a9b20c64 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_descriptor.py @@ -0,0 +1,52 @@ +# 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.serialization import Model + + +class SourceTriggerDescriptor(Model): + """The source trigger that caused a run. + + :param id: The unique ID of the trigger. + :type id: str + :param event_type: The event type of the trigger. + :type event_type: str + :param commit_id: The unique ID that identifies a commit. + :type commit_id: str + :param pull_request_id: The unique ID that identifies pull request. + :type pull_request_id: str + :param repository_url: The repository URL. + :type repository_url: str + :param branch_name: The branch name in the repository. + :type branch_name: str + :param provider_type: The source control provider type. + :type provider_type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'pull_request_id': {'key': 'pullRequestId', 'type': 'str'}, + 'repository_url': {'key': 'repositoryUrl', 'type': 'str'}, + 'branch_name': {'key': 'branchName', 'type': 'str'}, + 'provider_type': {'key': 'providerType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceTriggerDescriptor, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.event_type = kwargs.get('event_type', None) + self.commit_id = kwargs.get('commit_id', None) + self.pull_request_id = kwargs.get('pull_request_id', None) + self.repository_url = kwargs.get('repository_url', None) + self.branch_name = kwargs.get('branch_name', None) + self.provider_type = kwargs.get('provider_type', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_descriptor_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_descriptor_py3.py new file mode 100644 index 000000000000..bb35eb70537d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_descriptor_py3.py @@ -0,0 +1,52 @@ +# 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.serialization import Model + + +class SourceTriggerDescriptor(Model): + """The source trigger that caused a run. + + :param id: The unique ID of the trigger. + :type id: str + :param event_type: The event type of the trigger. + :type event_type: str + :param commit_id: The unique ID that identifies a commit. + :type commit_id: str + :param pull_request_id: The unique ID that identifies pull request. + :type pull_request_id: str + :param repository_url: The repository URL. + :type repository_url: str + :param branch_name: The branch name in the repository. + :type branch_name: str + :param provider_type: The source control provider type. + :type provider_type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'pull_request_id': {'key': 'pullRequestId', 'type': 'str'}, + 'repository_url': {'key': 'repositoryUrl', 'type': 'str'}, + 'branch_name': {'key': 'branchName', 'type': 'str'}, + 'provider_type': {'key': 'providerType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, event_type: str=None, commit_id: str=None, pull_request_id: str=None, repository_url: str=None, branch_name: str=None, provider_type: str=None, **kwargs) -> None: + super(SourceTriggerDescriptor, self).__init__(**kwargs) + self.id = id + self.event_type = event_type + self.commit_id = commit_id + self.pull_request_id = pull_request_id + self.repository_url = repository_url + self.branch_name = branch_name + self.provider_type = provider_type diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_py3.py new file mode 100644 index 000000000000..95f9e06a0f2a --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_py3.py @@ -0,0 +1,54 @@ +# 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.serialization import Model + + +class SourceTrigger(Model): + """The properties of a source based trigger. + + All required parameters must be populated in order to send to Azure. + + :param source_repository: Required. The properties that describes the + source(code) for the task. + :type source_repository: + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceProperties + :param source_trigger_events: Required. The source event corresponding to + the trigger. + :type source_trigger_events: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceTriggerEvent] + :param status: The current status of build trigger. Possible values + include: 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus + :param name: Required. The name of the trigger. + :type name: str + """ + + _validation = { + 'source_repository': {'required': True}, + 'source_trigger_events': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'source_repository': {'key': 'sourceRepository', 'type': 'SourceProperties'}, + 'source_trigger_events': {'key': 'sourceTriggerEvents', 'type': '[str]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, source_repository, source_trigger_events, name: str, status=None, **kwargs) -> None: + super(SourceTrigger, self).__init__(**kwargs) + self.source_repository = source_repository + self.source_trigger_events = source_trigger_events + self.status = status + self.name = name diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_update_parameters.py new file mode 100644 index 000000000000..e0773c1ec253 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_update_parameters.py @@ -0,0 +1,52 @@ +# 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.serialization import Model + + +class SourceTriggerUpdateParameters(Model): + """The properties for updating a source based trigger. + + All required parameters must be populated in order to send to Azure. + + :param source_repository: The properties that describes the source(code) + for the task. + :type source_repository: + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceUpdateParameters + :param source_trigger_events: The source event corresponding to the + trigger. + :type source_trigger_events: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceTriggerEvent] + :param status: The current status of build trigger. Possible values + include: 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus + :param name: Required. The name of the trigger. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'source_repository': {'key': 'sourceRepository', 'type': 'SourceUpdateParameters'}, + 'source_trigger_events': {'key': 'sourceTriggerEvents', 'type': '[str]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceTriggerUpdateParameters, self).__init__(**kwargs) + self.source_repository = kwargs.get('source_repository', None) + self.source_trigger_events = kwargs.get('source_trigger_events', None) + self.status = kwargs.get('status', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_update_parameters_py3.py new file mode 100644 index 000000000000..c758cdbc52ed --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_trigger_update_parameters_py3.py @@ -0,0 +1,52 @@ +# 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.serialization import Model + + +class SourceTriggerUpdateParameters(Model): + """The properties for updating a source based trigger. + + All required parameters must be populated in order to send to Azure. + + :param source_repository: The properties that describes the source(code) + for the task. + :type source_repository: + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceUpdateParameters + :param source_trigger_events: The source event corresponding to the + trigger. + :type source_trigger_events: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceTriggerEvent] + :param status: The current status of build trigger. Possible values + include: 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus + :param name: Required. The name of the trigger. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'source_repository': {'key': 'sourceRepository', 'type': 'SourceUpdateParameters'}, + 'source_trigger_events': {'key': 'sourceTriggerEvents', 'type': '[str]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, source_repository=None, source_trigger_events=None, status=None, **kwargs) -> None: + super(SourceTriggerUpdateParameters, self).__init__(**kwargs) + self.source_repository = source_repository + self.source_trigger_events = source_trigger_events + self.status = status + self.name = name diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters.py new file mode 100644 index 000000000000..8233824065bf --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class SourceUpdateParameters(Model): + """The properties for updating the source code repository. + + :param source_control_type: The type of source control service. Possible + values include: 'Github', 'VisualStudioTeamService' + :type source_control_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceControlType + :param repository_url: The full URL to the source code respository + :type repository_url: str + :param branch: The branch name of the source code. + :type branch: str + :param source_control_auth_properties: The authorization properties for + accessing the source code repository and to set up + webhooks for notifications. + :type source_control_auth_properties: + ~azure.mgmt.containerregistry.v2018_09_01.models.AuthInfoUpdateParameters + """ + + _attribute_map = { + 'source_control_type': {'key': 'sourceControlType', 'type': 'str'}, + 'repository_url': {'key': 'repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'branch', 'type': 'str'}, + 'source_control_auth_properties': {'key': 'sourceControlAuthProperties', 'type': 'AuthInfoUpdateParameters'}, + } + + def __init__(self, **kwargs): + super(SourceUpdateParameters, self).__init__(**kwargs) + self.source_control_type = kwargs.get('source_control_type', None) + self.repository_url = kwargs.get('repository_url', None) + self.branch = kwargs.get('branch', None) + self.source_control_auth_properties = kwargs.get('source_control_auth_properties', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters_py3.py new file mode 100644 index 000000000000..80002e5624ab --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters_py3.py @@ -0,0 +1,45 @@ +# 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.serialization import Model + + +class SourceUpdateParameters(Model): + """The properties for updating the source code repository. + + :param source_control_type: The type of source control service. Possible + values include: 'Github', 'VisualStudioTeamService' + :type source_control_type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceControlType + :param repository_url: The full URL to the source code respository + :type repository_url: str + :param branch: The branch name of the source code. + :type branch: str + :param source_control_auth_properties: The authorization properties for + accessing the source code repository and to set up + webhooks for notifications. + :type source_control_auth_properties: + ~azure.mgmt.containerregistry.v2018_09_01.models.AuthInfoUpdateParameters + """ + + _attribute_map = { + 'source_control_type': {'key': 'sourceControlType', 'type': 'str'}, + 'repository_url': {'key': 'repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'branch', 'type': 'str'}, + 'source_control_auth_properties': {'key': 'sourceControlAuthProperties', 'type': 'AuthInfoUpdateParameters'}, + } + + def __init__(self, *, source_control_type=None, repository_url: str=None, branch: str=None, source_control_auth_properties=None, **kwargs) -> None: + super(SourceUpdateParameters, self).__init__(**kwargs) + self.source_control_type = source_control_type + self.repository_url = repository_url + self.branch = branch + self.source_control_auth_properties = source_control_auth_properties diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_upload_definition.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_upload_definition.py new file mode 100644 index 000000000000..381fd538e9e3 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_upload_definition.py @@ -0,0 +1,33 @@ +# 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.serialization import Model + + +class SourceUploadDefinition(Model): + """The properties of a response to source upload request. + + :param upload_url: The URL where the client can upload the source. + :type upload_url: str + :param relative_path: The relative path to the source. This is used to + submit the subsequent queue build request. + :type relative_path: str + """ + + _attribute_map = { + 'upload_url': {'key': 'uploadUrl', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SourceUploadDefinition, self).__init__(**kwargs) + self.upload_url = kwargs.get('upload_url', None) + self.relative_path = kwargs.get('relative_path', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_upload_definition_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_upload_definition_py3.py new file mode 100644 index 000000000000..cff615964e11 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_upload_definition_py3.py @@ -0,0 +1,33 @@ +# 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.serialization import Model + + +class SourceUploadDefinition(Model): + """The properties of a response to source upload request. + + :param upload_url: The URL where the client can upload the source. + :type upload_url: str + :param relative_path: The relative path to the source. This is used to + submit the subsequent queue build request. + :type relative_path: str + """ + + _attribute_map = { + 'upload_url': {'key': 'uploadUrl', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + } + + def __init__(self, *, upload_url: str=None, relative_path: str=None, **kwargs) -> None: + super(SourceUploadDefinition, self).__init__(**kwargs) + self.upload_url = upload_url + self.relative_path = relative_path diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/status.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/status.py new file mode 100644 index 000000000000..76444c500634 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/status.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class Status(Model): + """The status of an Azure resource at the time the operation was called. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar display_status: The short label for the status. + :vartype display_status: str + :ivar message: The detailed message for the status, including alerts and + error messages. + :vartype message: str + :ivar timestamp: The timestamp when the status was changed to the current + value. + :vartype timestamp: datetime + """ + + _validation = { + 'display_status': {'readonly': True}, + 'message': {'readonly': True}, + 'timestamp': {'readonly': True}, + } + + _attribute_map = { + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Status, self).__init__(**kwargs) + self.display_status = None + self.message = None + self.timestamp = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/status_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/status_py3.py new file mode 100644 index 000000000000..1f4611c49912 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/status_py3.py @@ -0,0 +1,47 @@ +# 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.serialization import Model + + +class Status(Model): + """The status of an Azure resource at the time the operation was called. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar display_status: The short label for the status. + :vartype display_status: str + :ivar message: The detailed message for the status, including alerts and + error messages. + :vartype message: str + :ivar timestamp: The timestamp when the status was changed to the current + value. + :vartype timestamp: datetime + """ + + _validation = { + 'display_status': {'readonly': True}, + 'message': {'readonly': True}, + 'timestamp': {'readonly': True}, + } + + _attribute_map = { + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(Status, self).__init__(**kwargs) + self.display_status = None + self.message = None + self.timestamp = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/storage_account_properties.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/storage_account_properties.py new file mode 100644 index 000000000000..0541b7651cbd --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/storage_account_properties.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class StorageAccountProperties(Model): + """The properties of a storage account for a container registry. Only + applicable to Classic SKU. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the storage account. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/storage_account_properties_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/storage_account_properties_py3.py new file mode 100644 index 000000000000..5714fde0fcd2 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/storage_account_properties_py3.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class StorageAccountProperties(Model): + """The properties of a storage account for a container registry. Only + applicable to Classic SKU. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the storage account. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(StorageAccountProperties, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/target.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/target.py new file mode 100644 index 000000000000..a9bb2a92970d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/target.py @@ -0,0 +1,53 @@ +# 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.serialization import Model + + +class Target(Model): + """The target of the event. + + :param media_type: The MIME type of the referenced object. + :type media_type: str + :param size: The number of bytes of the content. Same as Length field. + :type size: long + :param digest: The digest of the content, as defined by the Registry V2 + HTTP API Specification. + :type digest: str + :param length: The number of bytes of the content. Same as Size field. + :type length: long + :param repository: The repository name. + :type repository: str + :param url: The direct URL to the content. + :type url: str + :param tag: The tag name. + :type tag: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'length': {'key': 'length', 'type': 'long'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Target, self).__init__(**kwargs) + self.media_type = kwargs.get('media_type', None) + self.size = kwargs.get('size', None) + self.digest = kwargs.get('digest', None) + self.length = kwargs.get('length', None) + self.repository = kwargs.get('repository', None) + self.url = kwargs.get('url', None) + self.tag = kwargs.get('tag', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/target_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/target_py3.py new file mode 100644 index 000000000000..013f2d1bedeb --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/target_py3.py @@ -0,0 +1,53 @@ +# 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.serialization import Model + + +class Target(Model): + """The target of the event. + + :param media_type: The MIME type of the referenced object. + :type media_type: str + :param size: The number of bytes of the content. Same as Length field. + :type size: long + :param digest: The digest of the content, as defined by the Registry V2 + HTTP API Specification. + :type digest: str + :param length: The number of bytes of the content. Same as Size field. + :type length: long + :param repository: The repository name. + :type repository: str + :param url: The direct URL to the content. + :type url: str + :param tag: The tag name. + :type tag: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'length': {'key': 'length', 'type': 'long'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, *, media_type: str=None, size: int=None, digest: str=None, length: int=None, repository: str=None, url: str=None, tag: str=None, **kwargs) -> None: + super(Target, self).__init__(**kwargs) + self.media_type = media_type + self.size = size + self.digest = digest + self.length = length + self.repository = repository + self.url = url + self.tag = tag diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task.py new file mode 100644 index 000000000000..98b48005acb9 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task.py @@ -0,0 +1,100 @@ +# 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 .resource import Resource + + +class Task(Resource): + """The task that has the ARM resource and task properties. + The task will have all information to schedule a run against it. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar provisioning_state: The provisioning state of the task. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + :ivar creation_date: The creation date of task. + :vartype creation_date: datetime + :param status: The current status of task. Possible values include: + 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskStatus + :param platform: Required. The platform properties against which the run + has to happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the run agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + :param timeout: Run timeout in seconds. Default value: 3600 . + :type timeout: int + :param step: Required. The properties of a task step. + :type step: + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskStepProperties + :param trigger: The properties that describe all triggers for the task. + :type trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'platform': {'required': True}, + 'timeout': {'maximum': 28800, 'minimum': 300}, + 'step': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'platform': {'key': 'properties.platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentProperties'}, + 'timeout': {'key': 'properties.timeout', 'type': 'int'}, + 'step': {'key': 'properties.step', 'type': 'TaskStepProperties'}, + 'trigger': {'key': 'properties.trigger', 'type': 'TriggerProperties'}, + } + + def __init__(self, **kwargs): + super(Task, self).__init__(**kwargs) + self.provisioning_state = None + self.creation_date = None + self.status = kwargs.get('status', None) + self.platform = kwargs.get('platform', None) + self.agent_configuration = kwargs.get('agent_configuration', None) + self.timeout = kwargs.get('timeout', 3600) + self.step = kwargs.get('step', None) + self.trigger = kwargs.get('trigger', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_paged.py new file mode 100644 index 000000000000..214728818293 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class TaskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Task ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Task]'} + } + + def __init__(self, *args, **kwargs): + + super(TaskPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_py3.py new file mode 100644 index 000000000000..55d58aae9356 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_py3.py @@ -0,0 +1,100 @@ +# 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 .resource_py3 import Resource + + +class Task(Resource): + """The task that has the ARM resource and task properties. + The task will have all information to schedule a run against it. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar provisioning_state: The provisioning state of the task. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + :ivar creation_date: The creation date of task. + :vartype creation_date: datetime + :param status: The current status of task. Possible values include: + 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskStatus + :param platform: Required. The platform properties against which the run + has to happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties + :param agent_configuration: The machine configuration of the run agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + :param timeout: Run timeout in seconds. Default value: 3600 . + :type timeout: int + :param step: Required. The properties of a task step. + :type step: + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskStepProperties + :param trigger: The properties that describe all triggers for the task. + :type trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'platform': {'required': True}, + 'timeout': {'maximum': 28800, 'minimum': 300}, + 'step': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'platform': {'key': 'properties.platform', 'type': 'PlatformProperties'}, + 'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentProperties'}, + 'timeout': {'key': 'properties.timeout', 'type': 'int'}, + 'step': {'key': 'properties.step', 'type': 'TaskStepProperties'}, + 'trigger': {'key': 'properties.trigger', 'type': 'TriggerProperties'}, + } + + def __init__(self, *, location: str, platform, step, tags=None, status=None, agent_configuration=None, timeout: int=3600, trigger=None, **kwargs) -> None: + super(Task, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.creation_date = None + self.status = status + self.platform = platform + self.agent_configuration = agent_configuration + self.timeout = timeout + self.step = step + self.trigger = trigger diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_run_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_run_request.py new file mode 100644 index 000000000000..2f2ed7a707c8 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_run_request.py @@ -0,0 +1,50 @@ +# 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 .run_request import RunRequest + + +class TaskRunRequest(RunRequest): + """The parameters for a task run request. + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + :param task_name: Required. The name of task against which run has to be + queued. + :type task_name: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + """ + + _validation = { + 'type': {'required': True}, + 'task_name': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + } + + def __init__(self, **kwargs): + super(TaskRunRequest, self).__init__(**kwargs) + self.task_name = kwargs.get('task_name', None) + self.values = kwargs.get('values', None) + self.type = 'TaskRunRequest' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_run_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_run_request_py3.py new file mode 100644 index 000000000000..140af55d8132 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_run_request_py3.py @@ -0,0 +1,50 @@ +# 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 .run_request_py3 import RunRequest + + +class TaskRunRequest(RunRequest): + """The parameters for a task run request. + + All required parameters must be populated in order to send to Azure. + + :param is_archive_enabled: The value that indicates whether archiving is + enabled for the run or not. Default value: False . + :type is_archive_enabled: bool + :param type: Required. Constant filled by server. + :type type: str + :param task_name: Required. The name of task against which run has to be + queued. + :type task_name: str + :param values: The collection of overridable values that can be passed + when running a task. + :type values: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SetValue] + """ + + _validation = { + 'type': {'required': True}, + 'task_name': {'required': True}, + } + + _attribute_map = { + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[SetValue]'}, + } + + def __init__(self, *, task_name: str, is_archive_enabled: bool=False, values=None, **kwargs) -> None: + super(TaskRunRequest, self).__init__(is_archive_enabled=is_archive_enabled, **kwargs) + self.task_name = task_name + self.values = values + self.type = 'TaskRunRequest' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_properties.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_properties.py new file mode 100644 index 000000000000..3a597d0ccfaa --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_properties.py @@ -0,0 +1,50 @@ +# 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.serialization import Model + + +class TaskStepProperties(Model): + """Base properties for any task step. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DockerBuildStep, BuildTaskStep, RunTaskStep + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar base_image_dependencies: List of base image dependencies for a step. + :vartype base_image_dependencies: + list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'base_image_dependencies': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Docker': 'DockerBuildStep', 'BuildTask': 'BuildTaskStep', 'RunTask': 'RunTaskStep'} + } + + def __init__(self, **kwargs): + super(TaskStepProperties, self).__init__(**kwargs) + self.base_image_dependencies = None + self.type = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_properties_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_properties_py3.py new file mode 100644 index 000000000000..d391f5cf40b5 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_properties_py3.py @@ -0,0 +1,50 @@ +# 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.serialization import Model + + +class TaskStepProperties(Model): + """Base properties for any task step. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DockerBuildStep, BuildTaskStep, RunTaskStep + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar base_image_dependencies: List of base image dependencies for a step. + :vartype base_image_dependencies: + list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'base_image_dependencies': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Docker': 'DockerBuildStep', 'BuildTask': 'BuildTaskStep', 'RunTask': 'RunTaskStep'} + } + + def __init__(self, **kwargs) -> None: + super(TaskStepProperties, self).__init__(**kwargs) + self.base_image_dependencies = None + self.type = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_update_parameters.py new file mode 100644 index 000000000000..4dbb825396f9 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_update_parameters.py @@ -0,0 +1,42 @@ +# 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.serialization import Model + + +class TaskStepUpdateParameters(Model): + """Base properties for updating any task step. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DockerBuildStepUpdateParameters, + BuildTaskStepUpdateParameters, RunTaskStepUpdateParameters + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Docker': 'DockerBuildStepUpdateParameters', 'BuildTask': 'BuildTaskStepUpdateParameters', 'RunTask': 'RunTaskStepUpdateParameters'} + } + + def __init__(self, **kwargs): + super(TaskStepUpdateParameters, self).__init__(**kwargs) + self.type = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_update_parameters_py3.py new file mode 100644 index 000000000000..458a24126947 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_step_update_parameters_py3.py @@ -0,0 +1,42 @@ +# 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.serialization import Model + + +class TaskStepUpdateParameters(Model): + """Base properties for updating any task step. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DockerBuildStepUpdateParameters, + BuildTaskStepUpdateParameters, RunTaskStepUpdateParameters + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Docker': 'DockerBuildStepUpdateParameters', 'BuildTask': 'BuildTaskStepUpdateParameters', 'RunTask': 'RunTaskStepUpdateParameters'} + } + + def __init__(self, **kwargs) -> None: + super(TaskStepUpdateParameters, self).__init__(**kwargs) + self.type = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_update_parameters.py new file mode 100644 index 000000000000..d9bdc15a390f --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_update_parameters.py @@ -0,0 +1,59 @@ +# 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.serialization import Model + + +class TaskUpdateParameters(Model): + """The parameters for updating a task. + + :param status: The current status of task. Possible values include: + 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskStatus + :param platform: The platform properties against which the run has to + happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformUpdateParameters + :param agent_configuration: The machine configuration of the run agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + :param timeout: Run timeout in seconds. + :type timeout: int + :param step: The properties for updating a task step. + :type step: + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskStepUpdateParameters + :param trigger: The properties for updating trigger properties. + :type trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerUpdateParameters + :param tags: The ARM resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'platform': {'key': 'properties.platform', 'type': 'PlatformUpdateParameters'}, + 'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentProperties'}, + 'timeout': {'key': 'properties.timeout', 'type': 'int'}, + 'step': {'key': 'properties.step', 'type': 'TaskStepUpdateParameters'}, + 'trigger': {'key': 'properties.trigger', 'type': 'TriggerUpdateParameters'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TaskUpdateParameters, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.platform = kwargs.get('platform', None) + self.agent_configuration = kwargs.get('agent_configuration', None) + self.timeout = kwargs.get('timeout', None) + self.step = kwargs.get('step', None) + self.trigger = kwargs.get('trigger', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_update_parameters_py3.py new file mode 100644 index 000000000000..4a257e6247d4 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_update_parameters_py3.py @@ -0,0 +1,59 @@ +# 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.serialization import Model + + +class TaskUpdateParameters(Model): + """The parameters for updating a task. + + :param status: The current status of task. Possible values include: + 'Disabled', 'Enabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskStatus + :param platform: The platform properties against which the run has to + happen. + :type platform: + ~azure.mgmt.containerregistry.v2018_09_01.models.PlatformUpdateParameters + :param agent_configuration: The machine configuration of the run agent. + :type agent_configuration: + ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties + :param timeout: Run timeout in seconds. + :type timeout: int + :param step: The properties for updating a task step. + :type step: + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskStepUpdateParameters + :param trigger: The properties for updating trigger properties. + :type trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.TriggerUpdateParameters + :param tags: The ARM resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'platform': {'key': 'properties.platform', 'type': 'PlatformUpdateParameters'}, + 'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentProperties'}, + 'timeout': {'key': 'properties.timeout', 'type': 'int'}, + 'step': {'key': 'properties.step', 'type': 'TaskStepUpdateParameters'}, + 'trigger': {'key': 'properties.trigger', 'type': 'TriggerUpdateParameters'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, platform=None, agent_configuration=None, timeout: int=None, step=None, trigger=None, tags=None, **kwargs) -> None: + super(TaskUpdateParameters, self).__init__(**kwargs) + self.status = status + self.platform = platform + self.agent_configuration = agent_configuration + self.timeout = timeout + self.step = step + self.trigger = trigger + self.tags = tags diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_properties.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_properties.py new file mode 100644 index 000000000000..cf1f415e32a2 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_properties.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class TriggerProperties(Model): + """The properties of a build trigger. + + :param source_triggers: The collection of triggers based on source code + repository. + :type source_triggers: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SourceTrigger] + :param base_image_trigger: The trigger based on base image dependencies. + :type base_image_trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTrigger + """ + + _attribute_map = { + 'source_triggers': {'key': 'sourceTriggers', 'type': '[SourceTrigger]'}, + 'base_image_trigger': {'key': 'baseImageTrigger', 'type': 'BaseImageTrigger'}, + } + + def __init__(self, **kwargs): + super(TriggerProperties, self).__init__(**kwargs) + self.source_triggers = kwargs.get('source_triggers', None) + self.base_image_trigger = kwargs.get('base_image_trigger', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_properties_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_properties_py3.py new file mode 100644 index 000000000000..bbacfbf9f98b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_properties_py3.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class TriggerProperties(Model): + """The properties of a build trigger. + + :param source_triggers: The collection of triggers based on source code + repository. + :type source_triggers: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SourceTrigger] + :param base_image_trigger: The trigger based on base image dependencies. + :type base_image_trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTrigger + """ + + _attribute_map = { + 'source_triggers': {'key': 'sourceTriggers', 'type': '[SourceTrigger]'}, + 'base_image_trigger': {'key': 'baseImageTrigger', 'type': 'BaseImageTrigger'}, + } + + def __init__(self, *, source_triggers=None, base_image_trigger=None, **kwargs) -> None: + super(TriggerProperties, self).__init__(**kwargs) + self.source_triggers = source_triggers + self.base_image_trigger = base_image_trigger diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_update_parameters.py new file mode 100644 index 000000000000..deacaa5eb7dc --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_update_parameters.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class TriggerUpdateParameters(Model): + """The properties for updating build triggers. + + :param source_triggers: The collection of triggers based on source code + repository. + :type source_triggers: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SourceTriggerUpdateParameters] + :param base_image_trigger: The trigger based on base image dependencies. + :type base_image_trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerUpdateParameters + """ + + _attribute_map = { + 'source_triggers': {'key': 'sourceTriggers', 'type': '[SourceTriggerUpdateParameters]'}, + 'base_image_trigger': {'key': 'baseImageTrigger', 'type': 'BaseImageTriggerUpdateParameters'}, + } + + def __init__(self, **kwargs): + super(TriggerUpdateParameters, self).__init__(**kwargs) + self.source_triggers = kwargs.get('source_triggers', None) + self.base_image_trigger = kwargs.get('base_image_trigger', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_update_parameters_py3.py new file mode 100644 index 000000000000..928dd514dc1e --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trigger_update_parameters_py3.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class TriggerUpdateParameters(Model): + """The properties for updating build triggers. + + :param source_triggers: The collection of triggers based on source code + repository. + :type source_triggers: + list[~azure.mgmt.containerregistry.v2018_09_01.models.SourceTriggerUpdateParameters] + :param base_image_trigger: The trigger based on base image dependencies. + :type base_image_trigger: + ~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerUpdateParameters + """ + + _attribute_map = { + 'source_triggers': {'key': 'sourceTriggers', 'type': '[SourceTriggerUpdateParameters]'}, + 'base_image_trigger': {'key': 'baseImageTrigger', 'type': 'BaseImageTriggerUpdateParameters'}, + } + + def __init__(self, *, source_triggers=None, base_image_trigger=None, **kwargs) -> None: + super(TriggerUpdateParameters, self).__init__(**kwargs) + self.source_triggers = source_triggers + self.base_image_trigger = base_image_trigger diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trust_policy.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trust_policy.py new file mode 100644 index 000000000000..ca75381e22c0 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trust_policy.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class TrustPolicy(Model): + """An object that represents content trust policy for a container registry. + + :param type: The type of trust policy. Possible values include: 'Notary' + :type type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TrustPolicyType + :param status: The value that indicates whether the policy is enabled or + not. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.PolicyStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrustPolicy, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trust_policy_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trust_policy_py3.py new file mode 100644 index 000000000000..ca89be5aaee9 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/trust_policy_py3.py @@ -0,0 +1,35 @@ +# 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.serialization import Model + + +class TrustPolicy(Model): + """An object that represents content trust policy for a container registry. + + :param type: The type of trust policy. Possible values include: 'Notary' + :type type: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.TrustPolicyType + :param status: The value that indicates whether the policy is enabled or + not. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.PolicyStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, type=None, status=None, **kwargs) -> None: + super(TrustPolicy, self).__init__(**kwargs) + self.type = type + self.status = status diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook.py new file mode 100644 index 000000000000..a0a165cf9022 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook.py @@ -0,0 +1,80 @@ +# 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 .resource import Resource + + +class Webhook(Resource): + """An object that represents a webhook for a container registry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the webhook at the time the operation was + called. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. + For example, 'foo:*' means events for all tags under repository 'foo'. + 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + 'foo:latest'. Empty means all events. + :type scope: str + :param actions: Required. The list of actions that trigger the webhook to + post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookAction] + :ivar provisioning_state: The provisioning state of the webhook at the + time the operation was called. Possible values include: 'Creating', + 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'actions': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Webhook, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.scope = kwargs.get('scope', None) + self.actions = kwargs.get('actions', None) + self.provisioning_state = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_create_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_create_parameters.py new file mode 100644 index 000000000000..25b7658722da --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_create_parameters.py @@ -0,0 +1,70 @@ +# 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.serialization import Model + + +class WebhookCreateParameters(Model): + """The parameters for creating a webhook. + + All required parameters must be populated in order to send to Azure. + + :param tags: The tags for the webhook. + :type tags: dict[str, str] + :param location: Required. The location of the webhook. This cannot be + changed after the resource is created. + :type location: str + :param service_uri: Required. The service URI for the webhook to post + notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook + notifications. + :type custom_headers: dict[str, str] + :param status: The status of the webhook at the time the operation was + called. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. + For example, 'foo:*' means events for all tags under repository 'foo'. + 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + 'foo:latest'. Empty means all events. + :type scope: str + :param actions: Required. The list of actions that trigger the webhook to + post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookAction] + """ + + _validation = { + 'location': {'required': True}, + 'service_uri': {'required': True}, + 'actions': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'service_uri': {'key': 'properties.serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WebhookCreateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.service_uri = kwargs.get('service_uri', None) + self.custom_headers = kwargs.get('custom_headers', None) + self.status = kwargs.get('status', None) + self.scope = kwargs.get('scope', None) + self.actions = kwargs.get('actions', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_create_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_create_parameters_py3.py new file mode 100644 index 000000000000..454ab766bd0a --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_create_parameters_py3.py @@ -0,0 +1,70 @@ +# 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.serialization import Model + + +class WebhookCreateParameters(Model): + """The parameters for creating a webhook. + + All required parameters must be populated in order to send to Azure. + + :param tags: The tags for the webhook. + :type tags: dict[str, str] + :param location: Required. The location of the webhook. This cannot be + changed after the resource is created. + :type location: str + :param service_uri: Required. The service URI for the webhook to post + notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook + notifications. + :type custom_headers: dict[str, str] + :param status: The status of the webhook at the time the operation was + called. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. + For example, 'foo:*' means events for all tags under repository 'foo'. + 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + 'foo:latest'. Empty means all events. + :type scope: str + :param actions: Required. The list of actions that trigger the webhook to + post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookAction] + """ + + _validation = { + 'location': {'required': True}, + 'service_uri': {'required': True}, + 'actions': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'service_uri': {'key': 'properties.serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__(self, *, location: str, service_uri: str, actions, tags=None, custom_headers=None, status=None, scope: str=None, **kwargs) -> None: + super(WebhookCreateParameters, self).__init__(**kwargs) + self.tags = tags + self.location = location + self.service_uri = service_uri + self.custom_headers = custom_headers + self.status = status + self.scope = scope + self.actions = actions diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_paged.py new file mode 100644 index 000000000000..e12a3393eed7 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class WebhookPaged(Paged): + """ + A paging container for iterating over a list of :class:`Webhook ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Webhook]'} + } + + def __init__(self, *args, **kwargs): + + super(WebhookPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_py3.py new file mode 100644 index 000000000000..47cddd02a515 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_py3.py @@ -0,0 +1,80 @@ +# 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 .resource_py3 import Resource + + +class Webhook(Resource): + """An object that represents a webhook for a container registry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be + changed after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the webhook at the time the operation was + called. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. + For example, 'foo:*' means events for all tags under repository 'foo'. + 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + 'foo:latest'. Empty means all events. + :type scope: str + :param actions: Required. The list of actions that trigger the webhook to + post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookAction] + :ivar provisioning_state: The provisioning state of the webhook at the + time the operation was called. Possible values include: 'Creating', + 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'actions': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, actions, tags=None, status=None, scope: str=None, **kwargs) -> None: + super(Webhook, self).__init__(location=location, tags=tags, **kwargs) + self.status = status + self.scope = scope + self.actions = actions + self.provisioning_state = None diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_update_parameters.py new file mode 100644 index 000000000000..2e258352f7f4 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_update_parameters.py @@ -0,0 +1,56 @@ +# 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.serialization import Model + + +class WebhookUpdateParameters(Model): + """The parameters for updating a webhook. + + :param tags: The tags for the webhook. + :type tags: dict[str, str] + :param service_uri: The service URI for the webhook to post notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook + notifications. + :type custom_headers: dict[str, str] + :param status: The status of the webhook at the time the operation was + called. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. + For example, 'foo:*' means events for all tags under repository 'foo'. + 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + 'foo:latest'. Empty means all events. + :type scope: str + :param actions: The list of actions that trigger the webhook to post + notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookAction] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'service_uri': {'key': 'properties.serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WebhookUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.service_uri = kwargs.get('service_uri', None) + self.custom_headers = kwargs.get('custom_headers', None) + self.status = kwargs.get('status', None) + self.scope = kwargs.get('scope', None) + self.actions = kwargs.get('actions', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_update_parameters_py3.py new file mode 100644 index 000000000000..3cfdfea03e96 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/webhook_update_parameters_py3.py @@ -0,0 +1,56 @@ +# 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.serialization import Model + + +class WebhookUpdateParameters(Model): + """The parameters for updating a webhook. + + :param tags: The tags for the webhook. + :type tags: dict[str, str] + :param service_uri: The service URI for the webhook to post notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook + notifications. + :type custom_headers: dict[str, str] + :param status: The status of the webhook at the time the operation was + called. Possible values include: 'enabled', 'disabled' + :type status: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. + For example, 'foo:*' means events for all tags under repository 'foo'. + 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + 'foo:latest'. Empty means all events. + :type scope: str + :param actions: The list of actions that trigger the webhook to post + notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookAction] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'service_uri': {'key': 'properties.serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__(self, *, tags=None, service_uri: str=None, custom_headers=None, status=None, scope: str=None, actions=None, **kwargs) -> None: + super(WebhookUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.service_uri = service_uri + self.custom_headers = custom_headers + self.status = status + self.scope = scope + self.actions = actions diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/__init__.py new file mode 100644 index 000000000000..d9dadb00c503 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/__init__.py @@ -0,0 +1,26 @@ +# 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 .registries_operations import RegistriesOperations +from .operations import Operations +from .replications_operations import ReplicationsOperations +from .webhooks_operations import WebhooksOperations +from .runs_operations import RunsOperations +from .tasks_operations import TasksOperations + +__all__ = [ + 'RegistriesOperations', + 'Operations', + 'ReplicationsOperations', + 'WebhooksOperations', + 'RunsOperations', + 'TasksOperations', +] diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/operations.py new file mode 100644 index 000000000000..394354d46b90 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/operations.py @@ -0,0 +1,99 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2017-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-10-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Azure Container Registry REST API + operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OperationDefinition + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.OperationDefinitionPaged[~azure.mgmt.containerregistry.v2018_09_01.models.OperationDefinition] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OperationDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ContainerRegistry/operations'} diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py new file mode 100644 index 000000000000..3464d2ce5608 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py @@ -0,0 +1,1256 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class RegistriesOperations(object): + """RegistriesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + + def _import_image_initial( + self, resource_group_name, registry_name, parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2017-10-01" + + # Construct URL + url = self.import_image.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ImportImageParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def import_image( + self, resource_group_name, registry_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Copies an image to this container registry from the specified container + registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param parameters: The parameters specifying the image to copy and the + source container registry. + :type parameters: + ~azure.mgmt.containerregistry.v2018_09_01.models.ImportImageParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._import_image_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + import_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage'} + + def check_name_availability( + self, name, custom_headers=None, raw=False, **operation_config): + """Checks whether the container registry name is available for use. The + name must contain only alphanumeric characters, be globally unique, and + between 5 and 50 characters in length. + + :param name: The name of the container registry. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegistryNameStatus or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryNameStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + registry_name_check_request = models.RegistryNameCheckRequest(name=name) + + api_version = "2017-10-01" + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(registry_name_check_request, 'RegistryNameCheckRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistryNameStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability'} + + def get( + self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Registry or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.containerregistry.v2018_09_01.models.Registry or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2017-10-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Registry', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} + + + def _create_initial( + self, resource_group_name, registry_name, registry, custom_headers=None, raw=False, **operation_config): + api_version = "2017-10-01" + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(registry, 'Registry') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Registry', response) + if response.status_code == 201: + deserialized = self._deserialize('Registry', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, registry_name, registry, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param registry: The parameters for creating a container registry. + :type registry: + ~azure.mgmt.containerregistry.v2018_09_01.models.Registry + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Registry or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Registry] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Registry]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + registry=registry, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Registry', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} + + + def _delete_initial( + self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): + api_version = "2017-10-01" + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, registry_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} + + + def _update_initial( + self, resource_group_name, registry_name, registry_update_parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2017-10-01" + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(registry_update_parameters, 'RegistryUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Registry', response) + if response.status_code == 201: + deserialized = self._deserialize('Registry', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, registry_name, registry_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param registry_update_parameters: The parameters for updating a + container registry. + :type registry_update_parameters: + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Registry or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Registry] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Registry]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + registry_update_parameters=registry_update_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Registry', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the container registries under the specified resource group. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Registry + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryPaged[~azure.mgmt.containerregistry.v2018_09_01.models.Registry] + :raises: :class:`CloudError` + """ + api_version = "2017-10-01" + + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RegistryPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegistryPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the container registries under the specified subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Registry + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryPaged[~azure.mgmt.containerregistry.v2018_09_01.models.Registry] + :raises: :class:`CloudError` + """ + api_version = "2017-10-01" + + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RegistryPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegistryPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries'} + + def list_credentials( + self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): + """Lists the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegistryListCredentialsResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryListCredentialsResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2017-10-01" + + # Construct URL + url = self.list_credentials.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistryListCredentialsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials'} + + def regenerate_credential( + self, resource_group_name, registry_name, name, custom_headers=None, raw=False, **operation_config): + """Regenerates one of the login credentials for the specified container + registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param name: Specifies name of the password which should be + regenerated -- password or password2. Possible values include: + 'password', 'password2' + :type name: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.PasswordName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegistryListCredentialsResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryListCredentialsResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_credential_parameters = models.RegenerateCredentialParameters(name=name) + + api_version = "2017-10-01" + + # Construct URL + url = self.regenerate_credential.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate_credential_parameters, 'RegenerateCredentialParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistryListCredentialsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential'} + + def list_usages( + self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): + """Gets the quota usages for the specified container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegistryUsageListResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryUsageListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2017-10-01" + + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistryUsageListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages'} + + def list_policies( + self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): + """Lists the policies for the specified container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegistryPolicies or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.RegistryPolicies or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2017-10-01" + + # Construct URL + url = self.list_policies.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistryPolicies', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listPolicies'} + + + def _update_policies_initial( + self, resource_group_name, registry_name, quarantine_policy=None, trust_policy=None, custom_headers=None, raw=False, **operation_config): + registry_policies_update_parameters = models.RegistryPolicies(quarantine_policy=quarantine_policy, trust_policy=trust_policy) + + api_version = "2017-10-01" + + # Construct URL + url = self.update_policies.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(registry_policies_update_parameters, 'RegistryPolicies') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistryPolicies', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_policies( + self, resource_group_name, registry_name, quarantine_policy=None, trust_policy=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates the policies for the specified container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param quarantine_policy: An object that represents quarantine policy + for a container registry. + :type quarantine_policy: + ~azure.mgmt.containerregistry.v2018_09_01.models.QuarantinePolicy + :param trust_policy: An object that represents content trust policy + for a container registry. + :type trust_policy: + ~azure.mgmt.containerregistry.v2018_09_01.models.TrustPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RegistryPolicies or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.RegistryPolicies] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.RegistryPolicies]] + :raises: :class:`CloudError` + """ + raw_result = self._update_policies_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + quarantine_policy=quarantine_policy, + trust_policy=trust_policy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RegistryPolicies', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/updatePolicies'} + + + def _schedule_run_initial( + self, resource_group_name, registry_name, run_request, custom_headers=None, raw=False, **operation_config): + api_version = "2018-09-01" + + # Construct URL + url = self.schedule_run.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(run_request, 'RunRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Run', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def schedule_run( + self, resource_group_name, registry_name, run_request, custom_headers=None, raw=False, polling=True, **operation_config): + """Schedules a new run based on the request parameters and add it to the + run queue. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param run_request: The parameters of a run that needs to scheduled. + :type run_request: + ~azure.mgmt.containerregistry.v2018_09_01.models.RunRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Run or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Run] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Run]] + :raises: :class:`CloudError` + """ + raw_result = self._schedule_run_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + run_request=run_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Run', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + schedule_run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun'} + + def get_build_source_upload_url( + self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): + """Get the upload location for the user to be able to upload the source. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceUploadDefinition or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.SourceUploadDefinition + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2018-09-01" + + # Construct URL + url = self.get_build_source_upload_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SourceUploadDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_build_source_upload_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl'} diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/replications_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/replications_operations.py new file mode 100644 index 000000000000..2e77093a9b34 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/replications_operations.py @@ -0,0 +1,485 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ReplicationsOperations(object): + """ReplicationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2017-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-10-01" + + self.config = config + + def get( + self, resource_group_name, registry_name, replication_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified replication. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Replication or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.containerregistry.v2018_09_01.models.Replication + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Replication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} + + + def _create_initial( + self, resource_group_name, registry_name, replication_name, location, tags=None, custom_headers=None, raw=False, **operation_config): + replication = models.Replication(location=location, tags=tags) + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(replication, 'Replication') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Replication', response) + if response.status_code == 201: + deserialized = self._deserialize('Replication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, registry_name, replication_name, location, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a replication for a container registry with the specified + parameters. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :param location: The location of the resource. This cannot be changed + after the resource is created. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Replication or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Replication] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Replication]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + location=location, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Replication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} + + + def _delete_initial( + self, resource_group_name, registry_name, replication_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, registry_name, replication_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a replication from a container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} + + + def _update_initial( + self, resource_group_name, registry_name, replication_name, tags=None, custom_headers=None, raw=False, **operation_config): + replication_update_parameters = models.ReplicationUpdateParameters(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(replication_update_parameters, 'ReplicationUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Replication', response) + if response.status_code == 201: + deserialized = self._deserialize('Replication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, registry_name, replication_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a replication for a container registry with the specified + parameters. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :param tags: The tags for the replication. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Replication or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Replication] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Replication]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Replication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} + + def list( + self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): + """Lists all the replications for the specified container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Replication + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.ReplicationPaged[~azure.mgmt.containerregistry.v2018_09_01.models.Replication] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ReplicationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ReplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications'} diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/runs_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/runs_operations.py new file mode 100644 index 000000000000..2f0cecc6159c --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/runs_operations.py @@ -0,0 +1,450 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class RunsOperations(object): + """RunsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2018-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01" + + self.config = config + + def list( + self, resource_group_name, registry_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """Gets all the runs for a registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param filter: The runs filter to apply on the operation. Arithmetic + operators are not supported. The allowed string function is + 'contains'. All logical operators except 'Not', 'Has', 'All' are + allowed. + :type filter: str + :param top: $top is supported for get list of runs, which limits the + maximum number of runs to return. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Run + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.RunPaged[~azure.mgmt.containerregistry.v2018_09_01.models.Run] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RunPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RunPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs'} + + def get( + self, resource_group_name, registry_name, run_id, custom_headers=None, raw=False, **operation_config): + """Gets the detailed information for a given run. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param run_id: The run ID. + :type run_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Run or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.containerregistry.v2018_09_01.models.Run or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'runId': self._serialize.url("run_id", run_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Run', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}'} + + + def _update_initial( + self, resource_group_name, registry_name, run_id, is_archive_enabled=None, custom_headers=None, raw=False, **operation_config): + run_update_parameters = models.RunUpdateParameters(is_archive_enabled=is_archive_enabled) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'runId': self._serialize.url("run_id", run_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(run_update_parameters, 'RunUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Run', response) + if response.status_code == 201: + deserialized = self._deserialize('Run', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, registry_name, run_id, is_archive_enabled=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Patch the run properties. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param run_id: The run ID. + :type run_id: str + :param is_archive_enabled: The value that indicates whether archiving + is enabled or not. + :type is_archive_enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Run or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Run] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Run]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + run_id=run_id, + is_archive_enabled=is_archive_enabled, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Run', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}'} + + def get_log_sas_url( + self, resource_group_name, registry_name, run_id, custom_headers=None, raw=False, **operation_config): + """Gets a link to download the run logs. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param run_id: The run ID. + :type run_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RunGetLogResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.RunGetLogResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_log_sas_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'runId': self._serialize.url("run_id", run_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RunGetLogResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_log_sas_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/listLogSasUrl'} + + + def _cancel_initial( + self, resource_group_name, registry_name, run_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'runId': self._serialize.url("run_id", run_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def cancel( + self, resource_group_name, registry_name, run_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancel an existing run. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param run_id: The run ID. + :type run_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + run_id=run_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel'} diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/tasks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/tasks_operations.py new file mode 100644 index 000000000000..9a6bfc9c2d82 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/tasks_operations.py @@ -0,0 +1,543 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class TasksOperations(object): + """TasksOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2018-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01" + + self.config = config + + def list( + self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): + """Lists all the tasks for a specified container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Task + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskPaged[~azure.mgmt.containerregistry.v2018_09_01.models.Task] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.TaskPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.TaskPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks'} + + def get( + self, resource_group_name, registry_name, task_name, custom_headers=None, raw=False, **operation_config): + """Get the properties of a specified task. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param task_name: The name of the container registry task. + :type task_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Task or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.containerregistry.v2018_09_01.models.Task or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Task', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}'} + + + def _create_initial( + self, resource_group_name, registry_name, task_name, task_create_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(task_create_parameters, 'Task') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Task', response) + if response.status_code == 201: + deserialized = self._deserialize('Task', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, registry_name, task_name, task_create_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a task for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param task_name: The name of the container registry task. + :type task_name: str + :param task_create_parameters: The parameters for creating a task. + :type task_create_parameters: + ~azure.mgmt.containerregistry.v2018_09_01.models.Task + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Task or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Task] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Task]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + task_name=task_name, + task_create_parameters=task_create_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Task', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}'} + + + def _delete_initial( + self, resource_group_name, registry_name, task_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, registry_name, task_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a specified task. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param task_name: The name of the container registry task. + :type task_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + task_name=task_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}'} + + + def _update_initial( + self, resource_group_name, registry_name, task_name, task_update_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(task_update_parameters, 'TaskUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Task', response) + if response.status_code == 201: + deserialized = self._deserialize('Task', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, registry_name, task_name, task_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a task with the specified parameters. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param task_name: The name of the container registry task. + :type task_name: str + :param task_update_parameters: The parameters for updating a task. + :type task_update_parameters: + ~azure.mgmt.containerregistry.v2018_09_01.models.TaskUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Task or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Task] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Task]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + task_name=task_name, + task_update_parameters=task_update_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Task', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}'} + + def get_details( + self, resource_group_name, registry_name, task_name, custom_headers=None, raw=False, **operation_config): + """Returns a task with extended information that includes all secrets. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param task_name: The name of the container registry task. + :type task_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Task or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.containerregistry.v2018_09_01.models.Task or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_details.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Task', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}/listDetails'} diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/webhooks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/webhooks_operations.py new file mode 100644 index 000000000000..9d6ca9fc03d1 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/webhooks_operations.py @@ -0,0 +1,688 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WebhooksOperations(object): + """WebhooksOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2017-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-10-01" + + self.config = config + + def get( + self, resource_group_name, registry_name, webhook_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified webhook. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Webhook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.containerregistry.v2018_09_01.models.Webhook or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} + + + def _create_initial( + self, resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(webhook_create_parameters, 'WebhookCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', response) + if response.status_code == 201: + deserialized = self._deserialize('Webhook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a webhook for a container registry with the specified + parameters. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param webhook_create_parameters: The parameters for creating a + webhook. + :type webhook_create_parameters: + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Webhook or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Webhook] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Webhook]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_create_parameters=webhook_create_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Webhook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} + + + def _delete_initial( + self, resource_group_name, registry_name, webhook_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, registry_name, webhook_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a webhook from a container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} + + + def _update_initial( + self, resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(webhook_update_parameters, 'WebhookUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', response) + if response.status_code == 201: + deserialized = self._deserialize('Webhook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a webhook with the specified parameters. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param webhook_update_parameters: The parameters for updating a + webhook. + :type webhook_update_parameters: + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Webhook or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerregistry.v2018_09_01.models.Webhook] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2018_09_01.models.Webhook]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_update_parameters=webhook_update_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Webhook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} + + def list( + self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): + """Lists all the webhooks for the specified container registry. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Webhook + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.WebhookPaged[~azure.mgmt.containerregistry.v2018_09_01.models.Webhook] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.WebhookPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WebhookPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks'} + + def ping( + self, resource_group_name, registry_name, webhook_name, custom_headers=None, raw=False, **operation_config): + """Triggers a ping event to be sent to the webhook. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EventInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.containerregistry.v2018_09_01.models.EventInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.ping.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EventInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + ping.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping'} + + def get_callback_config( + self, resource_group_name, registry_name, webhook_name, custom_headers=None, raw=False, **operation_config): + """Gets the configuration of service URI and custom headers for the + webhook. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CallbackConfig or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.CallbackConfig or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_callback_config.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CallbackConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_callback_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig'} + + def list_events( + self, resource_group_name, registry_name, webhook_name, custom_headers=None, raw=False, **operation_config): + """Lists recent events for the specified webhook. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Event + :rtype: + ~azure.mgmt.containerregistry.v2018_09_01.models.EventPaged[~azure.mgmt.containerregistry.v2018_09_01.models.Event] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_events.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.EventPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EventPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_events.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents'} diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/version.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/version.py new file mode 100644 index 000000000000..53a203f32aaf --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "" +