diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py index ae7cced8dfac..7afc77e1ef3a 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py @@ -736,7 +736,7 @@ def update_repository_properties(self, *args, **kwargs): properties.teleport_enabled = kwargs.pop("teleport_enabled", None) return RepositoryProperties._from_generated( # pylint: disable=protected-access - self._client.container_registry.set_properties( + self._client.container_registry.update_properties( repository, properties._to_generated(), **kwargs # pylint: disable=protected-access ) ) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/__init__.py index 1cb3683f2658..cb4560f3fbfe 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_configuration.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_configuration.py index bbd88a6d6271..1e4427fe9411 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_configuration.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_configuration.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py index 59862f293a9c..305b5e446eaa 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/__init__.py index d43fcb6511b0..b7fc81d2fb90 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_configuration.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_configuration.py index b078bd330a4e..600af7a8dce6 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_configuration.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_configuration.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_container_registry.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_container_registry.py index 89b1a2bb4a45..4bfed3e54901 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_container_registry.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_container_registry.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/__init__.py index ff082246f74f..0289249f353d 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_authentication_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_authentication_operations.py index cc3e59045972..40c13106fb8f 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_authentication_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_authentication_operations.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_blob_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_blob_operations.py index 0650751c2819..6695f1e6a938 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_blob_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_blob_operations.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Generic, IO, Optional, TypeVar diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_operations.py index 9c98004dc3d9..7cacbe6b6e27 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_operations.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar @@ -357,17 +357,17 @@ async def get_properties( self, name: str, **kwargs - ) -> "_models.RepositoryProperties": + ) -> "_models.ContainerRepositoryProperties": """Get repository attributes. :param name: Name of the image (including the namespace). :type name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepositoryProperties, or the result of cls(response) - :rtype: ~container_registry.models.RepositoryProperties + :return: ContainerRepositoryProperties, or the result of cls(response) + :rtype: ~container_registry.models.ContainerRepositoryProperties :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepositoryProperties"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerRepositoryProperties"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -398,7 +398,7 @@ async def get_properties( error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RepositoryProperties', pipeline_response) + deserialized = self._deserialize('ContainerRepositoryProperties', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -456,12 +456,12 @@ async def delete_repository( delete_repository.metadata = {'url': '/acr/v1/{name}'} # type: ignore - async def set_properties( + async def update_properties( self, name: str, value: Optional["_models.RepositoryWriteableProperties"] = None, **kwargs - ) -> "_models.RepositoryProperties": + ) -> "_models.ContainerRepositoryProperties": """Update the attribute identified by ``name`` where ``reference`` is the name of the repository. :param name: Name of the image (including the namespace). @@ -469,11 +469,11 @@ async def set_properties( :param value: Repository attribute value. :type value: ~container_registry.models.RepositoryWriteableProperties :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepositoryProperties, or the result of cls(response) - :rtype: ~container_registry.models.RepositoryProperties + :return: ContainerRepositoryProperties, or the result of cls(response) + :rtype: ~container_registry.models.ContainerRepositoryProperties :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepositoryProperties"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerRepositoryProperties"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -482,7 +482,7 @@ async def set_properties( accept = "application/json" # Construct URL - url = self.set_properties.metadata['url'] # type: ignore + url = self.update_properties.metadata['url'] # type: ignore path_format_arguments = { 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), 'name': self._serialize.url("name", name, 'str'), @@ -512,13 +512,13 @@ async def set_properties( error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RepositoryProperties', pipeline_response) + deserialized = self._deserialize('ContainerRepositoryProperties', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - set_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore + update_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore def get_tags( self, diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/__init__.py index d2b15bea9a01..a739514ed10b 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -11,9 +11,10 @@ from ._models_py3 import AcrManifests from ._models_py3 import AcrRefreshToken from ._models_py3 import Annotations + from ._models_py3 import ArtifactManifestPlatform from ._models_py3 import ArtifactManifestProperties - from ._models_py3 import ArtifactManifestReference from ._models_py3 import ArtifactTagProperties + from ._models_py3 import ContainerRepositoryProperties from ._models_py3 import DeleteRepositoryResult from ._models_py3 import Descriptor from ._models_py3 import FsLayer @@ -34,7 +35,6 @@ from ._models_py3 import PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema from ._models_py3 import Platform from ._models_py3 import Repositories - from ._models_py3 import RepositoryProperties from ._models_py3 import RepositoryTags from ._models_py3 import RepositoryWriteableProperties from ._models_py3 import TagAttributesBase @@ -50,9 +50,10 @@ from ._models import AcrManifests # type: ignore from ._models import AcrRefreshToken # type: ignore from ._models import Annotations # type: ignore + from ._models import ArtifactManifestPlatform # type: ignore from ._models import ArtifactManifestProperties # type: ignore - from ._models import ArtifactManifestReference # type: ignore from ._models import ArtifactTagProperties # type: ignore + from ._models import ContainerRepositoryProperties # type: ignore from ._models import DeleteRepositoryResult # type: ignore from ._models import Descriptor # type: ignore from ._models import FsLayer # type: ignore @@ -73,7 +74,6 @@ from ._models import PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema # type: ignore from ._models import Platform # type: ignore from ._models import Repositories # type: ignore - from ._models import RepositoryProperties # type: ignore from ._models import RepositoryTags # type: ignore from ._models import RepositoryWriteableProperties # type: ignore from ._models import TagAttributesBase # type: ignore @@ -85,9 +85,9 @@ from ._container_registry_enums import ( ArtifactArchitecture, + ArtifactManifestOrderBy, ArtifactOperatingSystem, - ManifestOrderBy, - TagOrderBy, + ArtifactTagOrderBy, TokenGrantType, ) @@ -98,9 +98,10 @@ 'AcrManifests', 'AcrRefreshToken', 'Annotations', + 'ArtifactManifestPlatform', 'ArtifactManifestProperties', - 'ArtifactManifestReference', 'ArtifactTagProperties', + 'ContainerRepositoryProperties', 'DeleteRepositoryResult', 'Descriptor', 'FsLayer', @@ -121,7 +122,6 @@ 'PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema', 'Platform', 'Repositories', - 'RepositoryProperties', 'RepositoryTags', 'RepositoryWriteableProperties', 'TagAttributesBase', @@ -131,8 +131,8 @@ 'V1Manifest', 'V2Manifest', 'ArtifactArchitecture', + 'ArtifactManifestOrderBy', 'ArtifactOperatingSystem', - 'ManifestOrderBy', - 'TagOrderBy', + 'ArtifactTagOrderBy', 'TokenGrantType', ] diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_container_registry_enums.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_container_registry_enums.py index 7da71393e629..96406f7bd7d9 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_container_registry_enums.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_container_registry_enums.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -40,6 +40,17 @@ class ArtifactArchitecture(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): S390_X = "s390x" WASM = "wasm" +class ArtifactManifestOrderBy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Sort options for ordering manifests in a collection. + """ + + #: Do not provide an orderby value in the request. + NONE = "none" + #: Order manifests by LastUpdatedOn field, from most recently updated to least recently updated. + LAST_UPDATED_ON_DESCENDING = "timedesc" + #: Order manifest by LastUpdatedOn field, from least recently updated to most recently updated. + LAST_UPDATED_ON_ASCENDING = "timeasc" + class ArtifactOperatingSystem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): AIX = "aix" @@ -57,18 +68,7 @@ class ArtifactOperatingSystem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum SOLARIS = "solaris" WINDOWS = "windows" -class ManifestOrderBy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Sort options for ordering manifests in a collection. - """ - - #: Do not provide an orderby value in the request. - NONE = "none" - #: Order manifests by LastUpdatedOn field, from most recently updated to least recently updated. - LAST_UPDATED_ON_DESCENDING = "timedesc" - #: Order manifest by LastUpdatedOn field, from least recently updated to most recently updated. - LAST_UPDATED_ON_ASCENDING = "timeasc" - -class TagOrderBy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ArtifactTagOrderBy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Do not provide an orderby value in the request. NONE = "none" diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models.py index 200fd219fa56..5866615c45d7 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -76,8 +76,7 @@ def __init__( class AcrManifests(msrest.serialization.Model): """Manifest attributes. - :param registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + :param registry_login_server: Registry login server. :type registry_login_server: str :param repository: Image name. :type repository: str @@ -195,35 +194,76 @@ def __init__( self.description = kwargs.get('description', None) +class ArtifactManifestPlatform(msrest.serialization.Model): + """Manifest attributes details. + + 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 digest: Required. Manifest digest. + :vartype digest: str + :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". + :vartype architecture: str or ~container_registry.models.ArtifactArchitecture + :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", + "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", + "solaris", "windows". + :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem + """ + + _validation = { + 'digest': {'required': True, 'readonly': True}, + 'architecture': {'readonly': True}, + 'operating_system': {'readonly': True}, + } + + _attribute_map = { + 'digest': {'key': 'digest', 'type': 'str'}, + 'architecture': {'key': 'architecture', 'type': 'str'}, + 'operating_system': {'key': 'os', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArtifactManifestPlatform, self).__init__(**kwargs) + self.digest = None + self.architecture = None + self.operating_system = None + + class ArtifactManifestProperties(msrest.serialization.Model): """Manifest attributes details. Variables are only populated by the server, and will be ignored when sending a request. - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Registry login server. :vartype registry_login_server: str :ivar repository_name: Repository name. :vartype repository_name: str - :ivar digest: Manifest. + :ivar digest: Required. Manifest. :vartype digest: str :ivar size: Image size. :vartype size: long - :ivar created_on: Created time. + :ivar created_on: Required. Created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Last update time. + :ivar last_updated_on: Required. Last update time. :vartype last_updated_on: ~datetime.datetime :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". :vartype architecture: str or ~container_registry.models.ArtifactArchitecture :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", "solaris", "windows". :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem - :ivar manifest_references: List of manifests referenced by this manifest list. List will be - empty if this manifest is not a manifest list. - :vartype manifest_references: list[~container_registry.models.ArtifactManifestReference] + :ivar related_artifacts: List of artifacts that are referenced by this manifest list, with + information about the platform each supports. This list will be empty if this is a leaf + manifest and not a manifest list. + :vartype related_artifacts: list[~container_registry.models.ArtifactManifestPlatform] :ivar tags: A set of tags. List of tags. :vartype tags: list[str] :param can_delete: Delete enabled. @@ -243,13 +283,13 @@ class ArtifactManifestProperties(msrest.serialization.Model): _validation = { 'registry_login_server': {'readonly': True}, 'repository_name': {'readonly': True}, - 'digest': {'readonly': True}, + 'digest': {'required': True, 'readonly': True}, 'size': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, 'architecture': {'readonly': True}, 'operating_system': {'readonly': True}, - 'manifest_references': {'readonly': True}, + 'related_artifacts': {'readonly': True}, 'tags': {'readonly': True}, } @@ -262,7 +302,7 @@ class ArtifactManifestProperties(msrest.serialization.Model): 'last_updated_on': {'key': 'manifest.lastUpdateTime', 'type': 'iso-8601'}, 'architecture': {'key': 'manifest.architecture', 'type': 'str'}, 'operating_system': {'key': 'manifest.os', 'type': 'str'}, - 'manifest_references': {'key': 'manifest.references', 'type': '[ArtifactManifestReference]'}, + 'related_artifacts': {'key': 'manifest.references', 'type': '[ArtifactManifestPlatform]'}, 'tags': {'key': 'manifest.tags', 'type': '[str]'}, 'can_delete': {'key': 'manifest.changeableAttributes.deleteEnabled', 'type': 'bool'}, 'can_write': {'key': 'manifest.changeableAttributes.writeEnabled', 'type': 'bool'}, @@ -285,7 +325,7 @@ def __init__( self.last_updated_on = None self.architecture = None self.operating_system = None - self.manifest_references = None + self.related_artifacts = None self.tags = None self.can_delete = kwargs.get('can_delete', None) self.can_write = kwargs.get('can_write', None) @@ -295,63 +335,93 @@ def __init__( self.quarantine_details = kwargs.get('quarantine_details', None) -class ArtifactManifestReference(msrest.serialization.Model): - """Manifest attributes details. +class ArtifactTagProperties(msrest.serialization.Model): + """Tag attributes. Variables are only populated by the server, and will be ignored when sending a request. - :ivar digest: Manifest digest. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. + :vartype registry_login_server: str + :ivar repository_name: Required. Image name. + :vartype repository_name: str + :ivar name: Required. Tag name. + :vartype name: str + :ivar digest: Required. Tag digest. :vartype digest: str - :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". - :vartype architecture: str or ~container_registry.models.ArtifactArchitecture - :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", - "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", - "solaris", "windows". - :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem + :ivar created_on: Required. Tag created time. + :vartype created_on: ~datetime.datetime + :ivar last_updated_on: Required. Tag last update time. + :vartype last_updated_on: ~datetime.datetime + :param can_delete: Delete enabled. + :type can_delete: bool + :param can_write: Write enabled. + :type can_write: bool + :param can_list: List enabled. + :type can_list: bool + :param can_read: Read enabled. + :type can_read: bool """ _validation = { - 'digest': {'readonly': True}, - 'architecture': {'readonly': True}, - 'operating_system': {'readonly': True}, + 'registry_login_server': {'required': True, 'readonly': True}, + 'repository_name': {'required': True, 'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'digest': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, } _attribute_map = { - 'digest': {'key': 'digest', 'type': 'str'}, - 'architecture': {'key': 'architecture', 'type': 'str'}, - 'operating_system': {'key': 'os', 'type': 'str'}, + 'registry_login_server': {'key': 'registry', 'type': 'str'}, + 'repository_name': {'key': 'imageName', 'type': 'str'}, + 'name': {'key': 'tag.name', 'type': 'str'}, + 'digest': {'key': 'tag.digest', 'type': 'str'}, + 'created_on': {'key': 'tag.createdTime', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'tag.lastUpdateTime', 'type': 'iso-8601'}, + 'can_delete': {'key': 'tag.changeableAttributes.deleteEnabled', 'type': 'bool'}, + 'can_write': {'key': 'tag.changeableAttributes.writeEnabled', 'type': 'bool'}, + 'can_list': {'key': 'tag.changeableAttributes.listEnabled', 'type': 'bool'}, + 'can_read': {'key': 'tag.changeableAttributes.readEnabled', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(ArtifactManifestReference, self).__init__(**kwargs) + super(ArtifactTagProperties, self).__init__(**kwargs) + self.registry_login_server = None + self.repository_name = None + self.name = None self.digest = None - self.architecture = None - self.operating_system = None + self.created_on = None + self.last_updated_on = None + self.can_delete = kwargs.get('can_delete', None) + self.can_write = kwargs.get('can_write', None) + self.can_list = kwargs.get('can_list', None) + self.can_read = kwargs.get('can_read', None) -class ArtifactTagProperties(msrest.serialization.Model): - """Tag attributes. +class ContainerRepositoryProperties(msrest.serialization.Model): + """Properties of this repository. Variables are only populated by the server, and will be ignored when sending a request. - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. :vartype registry_login_server: str - :ivar repository_name: Image name. - :vartype repository_name: str - :ivar name: Tag name. + :ivar name: Required. Image name. :vartype name: str - :ivar digest: Tag digest. - :vartype digest: str - :ivar created_on: Tag created time. + :ivar created_on: Required. Image created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Tag last update time. + :ivar last_updated_on: Required. Image last update time. :vartype last_updated_on: ~datetime.datetime + :ivar manifest_count: Required. Number of the manifests. + :vartype manifest_count: int + :ivar tag_count: Required. Number of the tags. + :vartype tag_count: int :param can_delete: Delete enabled. :type can_delete: bool :param can_write: Write enabled. @@ -360,45 +430,50 @@ class ArtifactTagProperties(msrest.serialization.Model): :type can_list: bool :param can_read: Read enabled. :type can_read: bool + :param teleport_enabled: Enables Teleport functionality on new images in the repository + improving Container startup performance. + :type teleport_enabled: bool """ _validation = { - 'registry_login_server': {'readonly': True}, - 'repository_name': {'readonly': True}, - 'name': {'readonly': True}, - 'digest': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'registry_login_server': {'required': True, 'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, + 'manifest_count': {'required': True, 'readonly': True}, + 'tag_count': {'required': True, 'readonly': True}, } _attribute_map = { 'registry_login_server': {'key': 'registry', 'type': 'str'}, - 'repository_name': {'key': 'imageName', 'type': 'str'}, - 'name': {'key': 'tag.name', 'type': 'str'}, - 'digest': {'key': 'tag.digest', 'type': 'str'}, - 'created_on': {'key': 'tag.createdTime', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'tag.lastUpdateTime', 'type': 'iso-8601'}, - 'can_delete': {'key': 'tag.changeableAttributes.deleteEnabled', 'type': 'bool'}, - 'can_write': {'key': 'tag.changeableAttributes.writeEnabled', 'type': 'bool'}, - 'can_list': {'key': 'tag.changeableAttributes.listEnabled', 'type': 'bool'}, - 'can_read': {'key': 'tag.changeableAttributes.readEnabled', 'type': 'bool'}, + 'name': {'key': 'imageName', 'type': 'str'}, + 'created_on': {'key': 'createdTime', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + 'manifest_count': {'key': 'manifestCount', 'type': 'int'}, + 'tag_count': {'key': 'tagCount', 'type': 'int'}, + 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, + 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, + 'can_list': {'key': 'changeableAttributes.listEnabled', 'type': 'bool'}, + 'can_read': {'key': 'changeableAttributes.readEnabled', 'type': 'bool'}, + 'teleport_enabled': {'key': 'changeableAttributes.teleportEnabled', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(ArtifactTagProperties, self).__init__(**kwargs) + super(ContainerRepositoryProperties, self).__init__(**kwargs) self.registry_login_server = None - self.repository_name = None self.name = None - self.digest = None self.created_on = None self.last_updated_on = None + self.manifest_count = None + self.tag_count = None self.can_delete = kwargs.get('can_delete', None) self.can_write = kwargs.get('can_write', None) self.can_list = kwargs.get('can_list', None) self.can_read = kwargs.get('can_read', None) + self.teleport_enabled = kwargs.get('teleport_enabled', None) class DeleteRepositoryResult(msrest.serialization.Model): @@ -613,25 +688,27 @@ class ManifestAttributesBase(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar digest: Manifest. + All required parameters must be populated in order to send to Azure. + + :ivar digest: Required. Manifest. :vartype digest: str :ivar size: Image size. :vartype size: long - :ivar created_on: Created time. + :ivar created_on: Required. Created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Last update time. + :ivar last_updated_on: Required. Last update time. :vartype last_updated_on: ~datetime.datetime :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". :vartype architecture: str or ~container_registry.models.ArtifactArchitecture :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", "solaris", "windows". :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem - :ivar manifest_references: List of manifests referenced by this manifest list. List will be - empty if this manifest is not a manifest list. - :vartype manifest_references: list[~container_registry.models.ArtifactManifestReference] + :ivar related_artifacts: List of artifacts that are referenced by this manifest list, with + information about the platform each supports. This list will be empty if this is a leaf + manifest and not a manifest list. + :vartype related_artifacts: list[~container_registry.models.ArtifactManifestPlatform] :ivar tags: A set of tags. List of tags. :vartype tags: list[str] :param can_delete: Delete enabled. @@ -649,13 +726,13 @@ class ManifestAttributesBase(msrest.serialization.Model): """ _validation = { - 'digest': {'readonly': True}, + 'digest': {'required': True, 'readonly': True}, 'size': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, 'architecture': {'readonly': True}, 'operating_system': {'readonly': True}, - 'manifest_references': {'readonly': True}, + 'related_artifacts': {'readonly': True}, 'tags': {'readonly': True}, } @@ -666,7 +743,7 @@ class ManifestAttributesBase(msrest.serialization.Model): 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, 'architecture': {'key': 'architecture', 'type': 'str'}, 'operating_system': {'key': 'os', 'type': 'str'}, - 'manifest_references': {'key': 'references', 'type': '[ArtifactManifestReference]'}, + 'related_artifacts': {'key': 'references', 'type': '[ArtifactManifestPlatform]'}, 'tags': {'key': 'tags', 'type': '[str]'}, 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, @@ -687,7 +764,7 @@ def __init__( self.last_updated_on = None self.architecture = None self.operating_system = None - self.manifest_references = None + self.related_artifacts = None self.tags = None self.can_delete = kwargs.get('can_delete', None) self.can_write = kwargs.get('can_write', None) @@ -701,13 +778,13 @@ class ManifestAttributesManifest(msrest.serialization.Model): """List of manifest attributes. :param references: List of manifest attributes details. - :type references: list[~container_registry.models.ArtifactManifestReference] + :type references: list[~container_registry.models.ArtifactManifestPlatform] :param quarantine_tag: Quarantine tag name. :type quarantine_tag: str """ _attribute_map = { - 'references': {'key': 'references', 'type': '[ArtifactManifestReference]'}, + 'references': {'key': 'references', 'type': '[ArtifactManifestPlatform]'}, 'quarantine_tag': {'key': 'quarantineTag', 'type': 'str'}, } @@ -1086,78 +1163,6 @@ def __init__( self.link = kwargs.get('link', None) -class RepositoryProperties(msrest.serialization.Model): - """Repository attributes. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. - :vartype registry_login_server: str - :ivar name: Image name. - :vartype name: str - :ivar created_on: Image created time. - :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Image last update time. - :vartype last_updated_on: ~datetime.datetime - :ivar manifest_count: Number of the manifests. - :vartype manifest_count: int - :ivar tag_count: Number of the tags. - :vartype tag_count: int - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param teleport_enabled: Enables Teleport functionality on new images in the repository - improving Container startup performance. - :type teleport_enabled: bool - """ - - _validation = { - 'registry_login_server': {'readonly': True}, - 'name': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, - 'manifest_count': {'readonly': True}, - 'tag_count': {'readonly': True}, - } - - _attribute_map = { - 'registry_login_server': {'key': 'registry', 'type': 'str'}, - 'name': {'key': 'imageName', 'type': 'str'}, - 'created_on': {'key': 'createdTime', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - 'manifest_count': {'key': 'manifestCount', 'type': 'int'}, - 'tag_count': {'key': 'tagCount', 'type': 'int'}, - 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, - 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, - 'can_list': {'key': 'changeableAttributes.listEnabled', 'type': 'bool'}, - 'can_read': {'key': 'changeableAttributes.readEnabled', 'type': 'bool'}, - 'teleport_enabled': {'key': 'changeableAttributes.teleportEnabled', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(RepositoryProperties, self).__init__(**kwargs) - self.registry_login_server = None - self.name = None - self.created_on = None - self.last_updated_on = None - self.manifest_count = None - self.tag_count = None - self.can_delete = kwargs.get('can_delete', None) - self.can_write = kwargs.get('can_write', None) - self.can_list = kwargs.get('can_list', None) - self.can_read = kwargs.get('can_read', None) - self.teleport_enabled = kwargs.get('teleport_enabled', None) - - class RepositoryTags(msrest.serialization.Model): """Result of the request to list tags of the image. @@ -1222,13 +1227,15 @@ class TagAttributesBase(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: Tag name. + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Tag name. :vartype name: str - :ivar digest: Tag digest. + :ivar digest: Required. Tag digest. :vartype digest: str - :ivar created_on: Tag created time. + :ivar created_on: Required. Tag created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Tag last update time. + :ivar last_updated_on: Required. Tag last update time. :vartype last_updated_on: ~datetime.datetime :param can_delete: Delete enabled. :type can_delete: bool @@ -1241,10 +1248,10 @@ class TagAttributesBase(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'digest': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'digest': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, } _attribute_map = { @@ -1295,17 +1302,24 @@ def __init__( class TagList(msrest.serialization.Model): """List of tag details. - :param registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :param registry_login_server: Required. Registry login server. :type registry_login_server: str - :param repository: Image name. + :param repository: Required. Image name. :type repository: str - :param tag_attribute_bases: List of tag attribute details. + :param tag_attribute_bases: Required. List of tag attribute details. :type tag_attribute_bases: list[~container_registry.models.TagAttributesBase] :param link: :type link: str """ + _validation = { + 'registry_login_server': {'required': True}, + 'repository': {'required': True}, + 'tag_attribute_bases': {'required': True}, + } + _attribute_map = { 'registry_login_server': {'key': 'registry', 'type': 'str'}, 'repository': {'key': 'imageName', 'type': 'str'}, @@ -1318,9 +1332,9 @@ def __init__( **kwargs ): super(TagList, self).__init__(**kwargs) - self.registry_login_server = kwargs.get('registry_login_server', None) - self.repository = kwargs.get('repository', None) - self.tag_attribute_bases = kwargs.get('tag_attribute_bases', None) + self.registry_login_server = kwargs['registry_login_server'] + self.repository = kwargs['repository'] + self.tag_attribute_bases = kwargs['tag_attribute_bases'] self.link = kwargs.get('link', None) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models_py3.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models_py3.py index 6e4bc1674d9a..3be761167634 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models_py3.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models_py3.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -89,8 +89,7 @@ def __init__( class AcrManifests(msrest.serialization.Model): """Manifest attributes. - :param registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + :param registry_login_server: Registry login server. :type registry_login_server: str :param repository: Image name. :type repository: str @@ -229,35 +228,76 @@ def __init__( self.description = description +class ArtifactManifestPlatform(msrest.serialization.Model): + """Manifest attributes details. + + 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 digest: Required. Manifest digest. + :vartype digest: str + :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". + :vartype architecture: str or ~container_registry.models.ArtifactArchitecture + :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", + "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", + "solaris", "windows". + :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem + """ + + _validation = { + 'digest': {'required': True, 'readonly': True}, + 'architecture': {'readonly': True}, + 'operating_system': {'readonly': True}, + } + + _attribute_map = { + 'digest': {'key': 'digest', 'type': 'str'}, + 'architecture': {'key': 'architecture', 'type': 'str'}, + 'operating_system': {'key': 'os', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArtifactManifestPlatform, self).__init__(**kwargs) + self.digest = None + self.architecture = None + self.operating_system = None + + class ArtifactManifestProperties(msrest.serialization.Model): """Manifest attributes details. Variables are only populated by the server, and will be ignored when sending a request. - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Registry login server. :vartype registry_login_server: str :ivar repository_name: Repository name. :vartype repository_name: str - :ivar digest: Manifest. + :ivar digest: Required. Manifest. :vartype digest: str :ivar size: Image size. :vartype size: long - :ivar created_on: Created time. + :ivar created_on: Required. Created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Last update time. + :ivar last_updated_on: Required. Last update time. :vartype last_updated_on: ~datetime.datetime :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". :vartype architecture: str or ~container_registry.models.ArtifactArchitecture :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", "solaris", "windows". :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem - :ivar manifest_references: List of manifests referenced by this manifest list. List will be - empty if this manifest is not a manifest list. - :vartype manifest_references: list[~container_registry.models.ArtifactManifestReference] + :ivar related_artifacts: List of artifacts that are referenced by this manifest list, with + information about the platform each supports. This list will be empty if this is a leaf + manifest and not a manifest list. + :vartype related_artifacts: list[~container_registry.models.ArtifactManifestPlatform] :ivar tags: A set of tags. List of tags. :vartype tags: list[str] :param can_delete: Delete enabled. @@ -277,13 +317,13 @@ class ArtifactManifestProperties(msrest.serialization.Model): _validation = { 'registry_login_server': {'readonly': True}, 'repository_name': {'readonly': True}, - 'digest': {'readonly': True}, + 'digest': {'required': True, 'readonly': True}, 'size': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, 'architecture': {'readonly': True}, 'operating_system': {'readonly': True}, - 'manifest_references': {'readonly': True}, + 'related_artifacts': {'readonly': True}, 'tags': {'readonly': True}, } @@ -296,7 +336,7 @@ class ArtifactManifestProperties(msrest.serialization.Model): 'last_updated_on': {'key': 'manifest.lastUpdateTime', 'type': 'iso-8601'}, 'architecture': {'key': 'manifest.architecture', 'type': 'str'}, 'operating_system': {'key': 'manifest.os', 'type': 'str'}, - 'manifest_references': {'key': 'manifest.references', 'type': '[ArtifactManifestReference]'}, + 'related_artifacts': {'key': 'manifest.references', 'type': '[ArtifactManifestPlatform]'}, 'tags': {'key': 'manifest.tags', 'type': '[str]'}, 'can_delete': {'key': 'manifest.changeableAttributes.deleteEnabled', 'type': 'bool'}, 'can_write': {'key': 'manifest.changeableAttributes.writeEnabled', 'type': 'bool'}, @@ -326,7 +366,7 @@ def __init__( self.last_updated_on = None self.architecture = None self.operating_system = None - self.manifest_references = None + self.related_artifacts = None self.tags = None self.can_delete = can_delete self.can_write = can_write @@ -336,63 +376,98 @@ def __init__( self.quarantine_details = quarantine_details -class ArtifactManifestReference(msrest.serialization.Model): - """Manifest attributes details. +class ArtifactTagProperties(msrest.serialization.Model): + """Tag attributes. Variables are only populated by the server, and will be ignored when sending a request. - :ivar digest: Manifest digest. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. + :vartype registry_login_server: str + :ivar repository_name: Required. Image name. + :vartype repository_name: str + :ivar name: Required. Tag name. + :vartype name: str + :ivar digest: Required. Tag digest. :vartype digest: str - :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". - :vartype architecture: str or ~container_registry.models.ArtifactArchitecture - :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", - "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", - "solaris", "windows". - :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem + :ivar created_on: Required. Tag created time. + :vartype created_on: ~datetime.datetime + :ivar last_updated_on: Required. Tag last update time. + :vartype last_updated_on: ~datetime.datetime + :param can_delete: Delete enabled. + :type can_delete: bool + :param can_write: Write enabled. + :type can_write: bool + :param can_list: List enabled. + :type can_list: bool + :param can_read: Read enabled. + :type can_read: bool """ _validation = { - 'digest': {'readonly': True}, - 'architecture': {'readonly': True}, - 'operating_system': {'readonly': True}, + 'registry_login_server': {'required': True, 'readonly': True}, + 'repository_name': {'required': True, 'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'digest': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, } _attribute_map = { - 'digest': {'key': 'digest', 'type': 'str'}, - 'architecture': {'key': 'architecture', 'type': 'str'}, - 'operating_system': {'key': 'os', 'type': 'str'}, + 'registry_login_server': {'key': 'registry', 'type': 'str'}, + 'repository_name': {'key': 'imageName', 'type': 'str'}, + 'name': {'key': 'tag.name', 'type': 'str'}, + 'digest': {'key': 'tag.digest', 'type': 'str'}, + 'created_on': {'key': 'tag.createdTime', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'tag.lastUpdateTime', 'type': 'iso-8601'}, + 'can_delete': {'key': 'tag.changeableAttributes.deleteEnabled', 'type': 'bool'}, + 'can_write': {'key': 'tag.changeableAttributes.writeEnabled', 'type': 'bool'}, + 'can_list': {'key': 'tag.changeableAttributes.listEnabled', 'type': 'bool'}, + 'can_read': {'key': 'tag.changeableAttributes.readEnabled', 'type': 'bool'}, } def __init__( self, + *, + can_delete: Optional[bool] = None, + can_write: Optional[bool] = None, + can_list: Optional[bool] = None, + can_read: Optional[bool] = None, **kwargs ): - super(ArtifactManifestReference, self).__init__(**kwargs) + super(ArtifactTagProperties, self).__init__(**kwargs) + self.registry_login_server = None + self.repository_name = None + self.name = None self.digest = None - self.architecture = None - self.operating_system = None + self.created_on = None + self.last_updated_on = None + self.can_delete = can_delete + self.can_write = can_write + self.can_list = can_list + self.can_read = can_read -class ArtifactTagProperties(msrest.serialization.Model): - """Tag attributes. +class ContainerRepositoryProperties(msrest.serialization.Model): + """Properties of this repository. Variables are only populated by the server, and will be ignored when sending a request. - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. :vartype registry_login_server: str - :ivar repository_name: Image name. - :vartype repository_name: str - :ivar name: Tag name. + :ivar name: Required. Image name. :vartype name: str - :ivar digest: Tag digest. - :vartype digest: str - :ivar created_on: Tag created time. + :ivar created_on: Required. Image created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Tag last update time. + :ivar last_updated_on: Required. Image last update time. :vartype last_updated_on: ~datetime.datetime + :ivar manifest_count: Required. Number of the manifests. + :vartype manifest_count: int + :ivar tag_count: Required. Number of the tags. + :vartype tag_count: int :param can_delete: Delete enabled. :type can_delete: bool :param can_write: Write enabled. @@ -401,28 +476,32 @@ class ArtifactTagProperties(msrest.serialization.Model): :type can_list: bool :param can_read: Read enabled. :type can_read: bool + :param teleport_enabled: Enables Teleport functionality on new images in the repository + improving Container startup performance. + :type teleport_enabled: bool """ _validation = { - 'registry_login_server': {'readonly': True}, - 'repository_name': {'readonly': True}, - 'name': {'readonly': True}, - 'digest': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'registry_login_server': {'required': True, 'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, + 'manifest_count': {'required': True, 'readonly': True}, + 'tag_count': {'required': True, 'readonly': True}, } _attribute_map = { 'registry_login_server': {'key': 'registry', 'type': 'str'}, - 'repository_name': {'key': 'imageName', 'type': 'str'}, - 'name': {'key': 'tag.name', 'type': 'str'}, - 'digest': {'key': 'tag.digest', 'type': 'str'}, - 'created_on': {'key': 'tag.createdTime', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'tag.lastUpdateTime', 'type': 'iso-8601'}, - 'can_delete': {'key': 'tag.changeableAttributes.deleteEnabled', 'type': 'bool'}, - 'can_write': {'key': 'tag.changeableAttributes.writeEnabled', 'type': 'bool'}, - 'can_list': {'key': 'tag.changeableAttributes.listEnabled', 'type': 'bool'}, - 'can_read': {'key': 'tag.changeableAttributes.readEnabled', 'type': 'bool'}, + 'name': {'key': 'imageName', 'type': 'str'}, + 'created_on': {'key': 'createdTime', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + 'manifest_count': {'key': 'manifestCount', 'type': 'int'}, + 'tag_count': {'key': 'tagCount', 'type': 'int'}, + 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, + 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, + 'can_list': {'key': 'changeableAttributes.listEnabled', 'type': 'bool'}, + 'can_read': {'key': 'changeableAttributes.readEnabled', 'type': 'bool'}, + 'teleport_enabled': {'key': 'changeableAttributes.teleportEnabled', 'type': 'bool'}, } def __init__( @@ -432,19 +511,21 @@ def __init__( can_write: Optional[bool] = None, can_list: Optional[bool] = None, can_read: Optional[bool] = None, + teleport_enabled: Optional[bool] = None, **kwargs ): - super(ArtifactTagProperties, self).__init__(**kwargs) + super(ContainerRepositoryProperties, self).__init__(**kwargs) self.registry_login_server = None - self.repository_name = None self.name = None - self.digest = None self.created_on = None self.last_updated_on = None + self.manifest_count = None + self.tag_count = None self.can_delete = can_delete self.can_write = can_write self.can_list = can_list self.can_read = can_read + self.teleport_enabled = teleport_enabled class DeleteRepositoryResult(msrest.serialization.Model): @@ -684,25 +765,27 @@ class ManifestAttributesBase(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar digest: Manifest. + All required parameters must be populated in order to send to Azure. + + :ivar digest: Required. Manifest. :vartype digest: str :ivar size: Image size. :vartype size: long - :ivar created_on: Created time. + :ivar created_on: Required. Created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Last update time. + :ivar last_updated_on: Required. Last update time. :vartype last_updated_on: ~datetime.datetime :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". :vartype architecture: str or ~container_registry.models.ArtifactArchitecture :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", "solaris", "windows". :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem - :ivar manifest_references: List of manifests referenced by this manifest list. List will be - empty if this manifest is not a manifest list. - :vartype manifest_references: list[~container_registry.models.ArtifactManifestReference] + :ivar related_artifacts: List of artifacts that are referenced by this manifest list, with + information about the platform each supports. This list will be empty if this is a leaf + manifest and not a manifest list. + :vartype related_artifacts: list[~container_registry.models.ArtifactManifestPlatform] :ivar tags: A set of tags. List of tags. :vartype tags: list[str] :param can_delete: Delete enabled. @@ -720,13 +803,13 @@ class ManifestAttributesBase(msrest.serialization.Model): """ _validation = { - 'digest': {'readonly': True}, + 'digest': {'required': True, 'readonly': True}, 'size': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, 'architecture': {'readonly': True}, 'operating_system': {'readonly': True}, - 'manifest_references': {'readonly': True}, + 'related_artifacts': {'readonly': True}, 'tags': {'readonly': True}, } @@ -737,7 +820,7 @@ class ManifestAttributesBase(msrest.serialization.Model): 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, 'architecture': {'key': 'architecture', 'type': 'str'}, 'operating_system': {'key': 'os', 'type': 'str'}, - 'manifest_references': {'key': 'references', 'type': '[ArtifactManifestReference]'}, + 'related_artifacts': {'key': 'references', 'type': '[ArtifactManifestPlatform]'}, 'tags': {'key': 'tags', 'type': '[str]'}, 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, @@ -765,7 +848,7 @@ def __init__( self.last_updated_on = None self.architecture = None self.operating_system = None - self.manifest_references = None + self.related_artifacts = None self.tags = None self.can_delete = can_delete self.can_write = can_write @@ -779,20 +862,20 @@ class ManifestAttributesManifest(msrest.serialization.Model): """List of manifest attributes. :param references: List of manifest attributes details. - :type references: list[~container_registry.models.ArtifactManifestReference] + :type references: list[~container_registry.models.ArtifactManifestPlatform] :param quarantine_tag: Quarantine tag name. :type quarantine_tag: str """ _attribute_map = { - 'references': {'key': 'references', 'type': '[ArtifactManifestReference]'}, + 'references': {'key': 'references', 'type': '[ArtifactManifestPlatform]'}, 'quarantine_tag': {'key': 'quarantineTag', 'type': 'str'}, } def __init__( self, *, - references: Optional[List["ArtifactManifestReference"]] = None, + references: Optional[List["ArtifactManifestPlatform"]] = None, quarantine_tag: Optional[str] = None, **kwargs ): @@ -1223,84 +1306,6 @@ def __init__( self.link = link -class RepositoryProperties(msrest.serialization.Model): - """Repository attributes. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. - :vartype registry_login_server: str - :ivar name: Image name. - :vartype name: str - :ivar created_on: Image created time. - :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Image last update time. - :vartype last_updated_on: ~datetime.datetime - :ivar manifest_count: Number of the manifests. - :vartype manifest_count: int - :ivar tag_count: Number of the tags. - :vartype tag_count: int - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param teleport_enabled: Enables Teleport functionality on new images in the repository - improving Container startup performance. - :type teleport_enabled: bool - """ - - _validation = { - 'registry_login_server': {'readonly': True}, - 'name': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, - 'manifest_count': {'readonly': True}, - 'tag_count': {'readonly': True}, - } - - _attribute_map = { - 'registry_login_server': {'key': 'registry', 'type': 'str'}, - 'name': {'key': 'imageName', 'type': 'str'}, - 'created_on': {'key': 'createdTime', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - 'manifest_count': {'key': 'manifestCount', 'type': 'int'}, - 'tag_count': {'key': 'tagCount', 'type': 'int'}, - 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, - 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, - 'can_list': {'key': 'changeableAttributes.listEnabled', 'type': 'bool'}, - 'can_read': {'key': 'changeableAttributes.readEnabled', 'type': 'bool'}, - 'teleport_enabled': {'key': 'changeableAttributes.teleportEnabled', 'type': 'bool'}, - } - - def __init__( - self, - *, - can_delete: Optional[bool] = None, - can_write: Optional[bool] = None, - can_list: Optional[bool] = None, - can_read: Optional[bool] = None, - teleport_enabled: Optional[bool] = None, - **kwargs - ): - super(RepositoryProperties, self).__init__(**kwargs) - self.registry_login_server = None - self.name = None - self.created_on = None - self.last_updated_on = None - self.manifest_count = None - self.tag_count = None - self.can_delete = can_delete - self.can_write = can_write - self.can_list = can_list - self.can_read = can_read - self.teleport_enabled = teleport_enabled - - class RepositoryTags(msrest.serialization.Model): """Result of the request to list tags of the image. @@ -1374,13 +1379,15 @@ class TagAttributesBase(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: Tag name. + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Tag name. :vartype name: str - :ivar digest: Tag digest. + :ivar digest: Required. Tag digest. :vartype digest: str - :ivar created_on: Tag created time. + :ivar created_on: Required. Tag created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Tag last update time. + :ivar last_updated_on: Required. Tag last update time. :vartype last_updated_on: ~datetime.datetime :param can_delete: Delete enabled. :type can_delete: bool @@ -1393,10 +1400,10 @@ class TagAttributesBase(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'digest': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'digest': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, } _attribute_map = { @@ -1454,17 +1461,24 @@ def __init__( class TagList(msrest.serialization.Model): """List of tag details. - :param registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :param registry_login_server: Required. Registry login server. :type registry_login_server: str - :param repository: Image name. + :param repository: Required. Image name. :type repository: str - :param tag_attribute_bases: List of tag attribute details. + :param tag_attribute_bases: Required. List of tag attribute details. :type tag_attribute_bases: list[~container_registry.models.TagAttributesBase] :param link: :type link: str """ + _validation = { + 'registry_login_server': {'required': True}, + 'repository': {'required': True}, + 'tag_attribute_bases': {'required': True}, + } + _attribute_map = { 'registry_login_server': {'key': 'registry', 'type': 'str'}, 'repository': {'key': 'imageName', 'type': 'str'}, @@ -1475,9 +1489,9 @@ class TagList(msrest.serialization.Model): def __init__( self, *, - registry_login_server: Optional[str] = None, - repository: Optional[str] = None, - tag_attribute_bases: Optional[List["TagAttributesBase"]] = None, + registry_login_server: str, + repository: str, + tag_attribute_bases: List["TagAttributesBase"], link: Optional[str] = None, **kwargs ): diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/__init__.py index ff082246f74f..0289249f353d 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_authentication_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_authentication_operations.py index 8f44a01093f2..c192aafd0c67 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_authentication_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_authentication_operations.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_blob_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_blob_operations.py index be2649d9042a..1c59f3fab1d0 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_blob_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_blob_operations.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py index 3d7619073535..4486d67b5bbe 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.6.4) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -367,17 +367,17 @@ def get_properties( name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.RepositoryProperties" + # type: (...) -> "_models.ContainerRepositoryProperties" """Get repository attributes. :param name: Name of the image (including the namespace). :type name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepositoryProperties, or the result of cls(response) - :rtype: ~container_registry.models.RepositoryProperties + :return: ContainerRepositoryProperties, or the result of cls(response) + :rtype: ~container_registry.models.ContainerRepositoryProperties :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepositoryProperties"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerRepositoryProperties"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -408,7 +408,7 @@ def get_properties( error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RepositoryProperties', pipeline_response) + deserialized = self._deserialize('ContainerRepositoryProperties', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -467,13 +467,13 @@ def delete_repository( delete_repository.metadata = {'url': '/acr/v1/{name}'} # type: ignore - def set_properties( + def update_properties( self, name, # type: str value=None, # type: Optional["_models.RepositoryWriteableProperties"] **kwargs # type: Any ): - # type: (...) -> "_models.RepositoryProperties" + # type: (...) -> "_models.ContainerRepositoryProperties" """Update the attribute identified by ``name`` where ``reference`` is the name of the repository. :param name: Name of the image (including the namespace). @@ -481,11 +481,11 @@ def set_properties( :param value: Repository attribute value. :type value: ~container_registry.models.RepositoryWriteableProperties :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepositoryProperties, or the result of cls(response) - :rtype: ~container_registry.models.RepositoryProperties + :return: ContainerRepositoryProperties, or the result of cls(response) + :rtype: ~container_registry.models.ContainerRepositoryProperties :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepositoryProperties"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerRepositoryProperties"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -494,7 +494,7 @@ def set_properties( accept = "application/json" # Construct URL - url = self.set_properties.metadata['url'] # type: ignore + url = self.update_properties.metadata['url'] # type: ignore path_format_arguments = { 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), 'name': self._serialize.url("name", name, 'str'), @@ -524,13 +524,13 @@ def set_properties( error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RepositoryProperties', pipeline_response) + deserialized = self._deserialize('ContainerRepositoryProperties', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - set_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore + update_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore def get_tags( self, diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py index 8bfe5a4394bd..ca1847b6180b 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py @@ -9,7 +9,7 @@ from ._generated.models import ( ArtifactTagProperties as GeneratedArtifactTagProperties, - RepositoryProperties as GeneratedRepositoryProperties, + ContainerRepositoryProperties as GeneratedRepositoryProperties, RepositoryWriteableProperties, TagWriteableProperties, ManifestWriteableProperties, diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py index 9b73a1e8838d..2d1a55340a70 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py @@ -597,7 +597,7 @@ async def update_repository_properties( properties.teleport_enabled = kwargs.pop("teleport_enabled", None) return RepositoryProperties._from_generated( # pylint: disable=protected-access - await self._client.container_registry.set_properties( + await self._client.container_registry.update_properties( repository, properties._to_generated(), **kwargs # pylint: disable=protected-access ) ) diff --git a/sdk/containerregistry/azure-containerregistry/swagger/README.md b/sdk/containerregistry/azure-containerregistry/swagger/README.md index c66159d73785..296f0c9019ec 100644 --- a/sdk/containerregistry/azure-containerregistry/swagger/README.md +++ b/sdk/containerregistry/azure-containerregistry/swagger/README.md @@ -2,7 +2,8 @@ ### Settings ``` yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/f7df590c111a56f04794d229ef7f7a598b294fdf/specification/containerregistry/data-plane/Azure.ContainerRegistry/preview/2019-08-15-preview/containerregistry.json +title: Container Registry +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/c8d9a26a2857828e095903efa72512cf3a76c15d/specification/containerregistry/data-plane/Azure.ContainerRegistry/preview/2019-08-15-preview/containerregistry.json output-folder: "../azure/containerregistry/_generated" no-namespace-folders: true python: true