From bde6c66db87bdf0352e50c24df504a326c5ae8a9 Mon Sep 17 00:00:00 2001 From: Anne Loomis Thompson Date: Fri, 9 Jul 2021 13:49:17 -0700 Subject: [PATCH 1/9] update docstrings --- .../src/Artifact/RegistryArtifact.cs | 45 ++++++++++--------- .../src/ContainerRegistryClient.cs | 20 ++++----- .../src/ContainerRegistryClientOptions.cs | 4 +- .../Generated/Models/ArtifactArchitecture.cs | 28 ++++++------ .../Models/ArtifactManifestPlatform.cs | 2 +- .../Generated/Models/ArtifactTagOrderBy.cs | 2 +- .../src/Models/ArtifactOperatingSystem.cs | 3 ++ .../src/Models/ArtifactTagProperties.cs | 8 ++-- .../src/Repository/ContainerRepository.cs | 32 ++++++++----- 9 files changed, 80 insertions(+), 64 deletions(-) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Artifact/RegistryArtifact.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Artifact/RegistryArtifact.cs index ac0cd8072105..545213769e6c 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Artifact/RegistryArtifact.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Artifact/RegistryArtifact.cs @@ -9,7 +9,10 @@ namespace Azure.Containers.ContainerRegistry { - /// A helper class that groups information and operations about an image or artifact in this container registry. + /// `Artifact` is the general term for items stored in a container registry, + /// and can include Docker images or other Open Container Initiative (OCI) artifact types. + /// + /// The class is a helper class that groups information and operations about an image or artifact in this container registry. public partial class RegistryArtifact { private readonly ClientDiagnostics _clientDiagnostics; @@ -57,7 +60,7 @@ protected RegistryArtifact() #region Registry Artifact/Manifest methods - /// Get registry artifact properties by tag or digest. + /// Get the properties of the manifest that uniquely identifies this artifact. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual async Task> GetManifestPropertiesAsync(CancellationToken cancellationToken = default) @@ -77,7 +80,7 @@ public virtual async Task> GetManifestPrope } } - /// Get registry artifact properties by tag or digest. + /// Get the properties of the manifest that uniquely identifies this artifact. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual Response GetManifestProperties(CancellationToken cancellationToken = default) @@ -118,8 +121,8 @@ private static bool IsDigest(string tagOrDigest) return tagOrDigest.Contains(":"); } - /// Update manifest attributes. - /// Manifest properties value. + /// Update the properties of the artifact's manifest. + /// Manifest properties object containing values to update. /// The cancellation token to use. /// Thrown when is null. /// Thrown when a failure is returned by the Container Registry service. @@ -141,8 +144,8 @@ public virtual async Task> UpdateManifestPr } } - /// Update manifest attributes. - /// Manifest properties value. + /// Update the properties of the artifact's manifest. + /// Manifest properties object containing values to update. /// The cancellation token to use. /// Thrown when is null. /// Thrown when a failure is returned by the Container Registry service. @@ -177,7 +180,7 @@ private static ManifestWriteableProperties GetManifestWriteableProperties(Artifa }; } - /// Delete registry artifact. + /// Delete registry artifact by deleting its manifest. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual async Task DeleteAsync(CancellationToken cancellationToken = default) @@ -196,7 +199,7 @@ public virtual async Task DeleteAsync(CancellationToken cancellationTo } } - /// Delete registry artifact. + /// Delete registry artifact by deleting its manifest. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual Response Delete(CancellationToken cancellationToken = default) @@ -218,7 +221,7 @@ public virtual Response Delete(CancellationToken cancellationToken = default) #endregion #region Tag methods - /// Get the collection of tags for a repository. + /// List the tags that uniquely identify this artifact and the properties of each. /// Requested order of tags in the collection. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. @@ -264,7 +267,7 @@ async Task> NextPageFunc(string nextLink, int? pageS return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); } - /// Get the collection of tags for a repository, including their full metadata. + /// List the tags that uniquely identify this artifact and the properties of each. /// Requested order of tags in the collection. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. @@ -310,7 +313,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); } - /// Get tag properties by tag. + /// Get the properties of the specified tag. /// Tag name. /// The cancellation token to use. /// Thrown when is null. @@ -331,7 +334,7 @@ public virtual async Task> GetTagPropertiesAsync } } - /// Get tag attributes by tag. + /// Get the properties of the specified tag. /// Tag name. /// The cancellation token to use. /// Thrown when is null. @@ -354,9 +357,9 @@ public virtual Response GetTagProperties(string tag, Canc } } - /// Update tag attributes. - /// Tag name. - /// Tag property value. + /// Update the properties of a given tag. + /// Name of the tag to update properties on. + /// Tag properties object containing values to update. /// The cancellation token to use. /// Thrown when is null. /// Thrown when is empty. @@ -391,9 +394,9 @@ private static TagWriteableProperties GetTagWriteableProperties(ArtifactTagPrope }; } - /// Update tag attributes. - /// Tag name. - /// Tag property value. + /// Update the properties of a given tag. + /// Name of the tag to update properties on. + /// Tag properties object containing values to update. /// The cancellation token to use. /// Thrown when is null. /// Thrown when is empty. @@ -418,7 +421,7 @@ public virtual Response UpdateTagProperties(string tag, A } /// Delete the tag. This removes the tag from the artifact and its manifest. - /// Name of tag to delete. + /// The name of tag to delete. /// The cancellation token to use. /// Thrown when is null. /// Thrown when is empty. @@ -441,7 +444,7 @@ public virtual async Task DeleteTagAsync(string tag, CancellationToken } /// Delete the tag. This removes the tag from the artifact and its manifest. - /// Name of tag to delete. + /// The name of tag to delete. /// The cancellation token to use. /// Thrown when is null. /// Thrown when is empty. diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs index b087e17a2556..879b7a88d829 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs @@ -23,7 +23,7 @@ public partial class ContainerRegistryClient /// /// Initializes a new instance of the for managing container images and artifacts, /// using anonymous access to the registry. Only operations that support anonymous access are enabled. Other service - /// methods will throw if called. + /// methods will throw if called from this client. /// /// The URI endpoint of the container registry. This is likely to be similar /// to "https://{registry-name}.azurecr.io". @@ -33,9 +33,9 @@ public partial class ContainerRegistryClient } /// - /// Initializes a new instance of the ContainerRegistryClient for managing container images and artifacts, + /// Initializes a new instance of the for managing container images and artifacts, /// using anonymous access to the registry. Only operations that support anonymous access are enabled. Other service - /// methods will throw if called. + /// methods will throw if called from this client. /// /// The URI endpoint of the container registry. This is likely to be similar /// to "https://{registry-name}.azurecr.io". @@ -58,7 +58,7 @@ public partial class ContainerRegistryClient } /// - /// Initializes a new instance of the ContainerRegistryClient for managing container images and artifacts. + /// Initializes a new instance of the for managing container images and artifacts. /// /// The URI endpoint of the container registry. This is likely to be similar /// to "https://{registry-name}.azurecr.io". @@ -93,7 +93,7 @@ protected ContainerRegistryClient() /// public virtual Uri Endpoint => _endpoint; - /// List repositories in this registry. + /// List the repositories in this registry. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual AsyncPageable GetRepositoryNamesAsync(CancellationToken cancellationToken = default) @@ -134,7 +134,7 @@ async Task> NextPageFunc(string continuationToken, int? pageSizeHin return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); } - /// List repositories in this registry. + /// List the repositories in this registry. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual Pageable GetRepositoryNames(CancellationToken cancellationToken = default) @@ -189,7 +189,7 @@ internal static string ParseUriReferenceFromLinkHeader(string linkValue) return linkValue?.Substring(1, linkValue.IndexOf('>') - 1); } - /// Delete the repository identified by `repostitory`. + /// Delete the repository identified by `repository` and all associated artifacts. /// Repository name (including the namespace). /// The cancellation token to use. /// Thrown when is null. @@ -212,7 +212,7 @@ public virtual async Task DeleteRepositoryAsync(string repositoryName, } } - /// Delete the repository identified by `repostitory`. + /// Delete the repository identified by `repository` and all associated artifacts. /// Repository name (including the namespace). /// The cancellation token to use. /// Thrown when is null. @@ -236,7 +236,7 @@ public virtual Response DeleteRepository(string repositoryName, CancellationToke } /// - /// Create a new object for the specified repository. + /// Create a new object for calling service methods related to the repository specified by `repositoryName`. /// /// The name of the repository to reference. /// A new for the desired repository. @@ -254,7 +254,7 @@ public virtual ContainerRepository GetRepository(string repositoryName) } /// - /// Create a new object for the specified artifact. + /// Create a new object for calling service methods related to the artifact specified by `repositoryName` and `tagOrDigest`. /// /// The name of the repository to reference. /// Either a tag or a digest that uniquely identifies the artifact. diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClientOptions.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClientOptions.cs index 7a0ae59a7d7a..717234b8aac3 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClientOptions.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClientOptions.cs @@ -7,7 +7,7 @@ namespace Azure.Containers.ContainerRegistry { /// - /// The options for + /// Options that allow users to configure the requests sent to the Container Registry service. /// public class ContainerRegistryClientOptions : ClientOptions { @@ -25,6 +25,7 @@ public class ContainerRegistryClientOptions : ClientOptions public string AuthenticationScope { get; set; } = "https://management.azure.com/.default"; /// + /// Create an instance of the options for configuring request sent to the Container Registry service. /// /// public ContainerRegistryClientOptions(ServiceVersion version = ServiceVersion.V1_0) @@ -49,6 +50,7 @@ private void AddHeadersAndQueryParameters() } /// + /// The versions of the Container Registry service supported by this client library. /// public enum ServiceVersion { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactArchitecture.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactArchitecture.cs index 5a4ec3a47574..90e5306a37ab 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactArchitecture.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactArchitecture.cs @@ -10,7 +10,7 @@ namespace Azure.Containers.ContainerRegistry { - /// The ArtifactArchitecture. + /// The artifact platform's architecture. public readonly partial struct ArtifactArchitecture : IEquatable { private readonly string _value; @@ -36,31 +36,31 @@ public ArtifactArchitecture(string value) private const string S390XValue = "s390x"; private const string WasmValue = "wasm"; - /// 386. + /// i386 public static ArtifactArchitecture I386 { get; } = new ArtifactArchitecture(I386Value); - /// amd64. + /// AMD64 public static ArtifactArchitecture Amd64 { get; } = new ArtifactArchitecture(Amd64Value); - /// arm. + /// ARM public static ArtifactArchitecture Arm { get; } = new ArtifactArchitecture(ArmValue); - /// arm64. + /// ARM64 public static ArtifactArchitecture Arm64 { get; } = new ArtifactArchitecture(Arm64Value); - /// mips. + /// MIPS public static ArtifactArchitecture Mips { get; } = new ArtifactArchitecture(MipsValue); - /// mipsle. + /// MIPSLE public static ArtifactArchitecture MipsLe { get; } = new ArtifactArchitecture(MipsLeValue); - /// mips64. + /// MIPS64 public static ArtifactArchitecture Mips64 { get; } = new ArtifactArchitecture(Mips64Value); - /// mips64le. + /// MIPS64LE public static ArtifactArchitecture Mips64Le { get; } = new ArtifactArchitecture(Mips64LeValue); - /// ppc64. + /// PPC64 public static ArtifactArchitecture Ppc64 { get; } = new ArtifactArchitecture(Ppc64Value); - /// ppc64le. + /// PPC64LE public static ArtifactArchitecture Ppc64Le { get; } = new ArtifactArchitecture(Ppc64LeValue); - /// riscv64. + /// RISCv64 public static ArtifactArchitecture RiscV64 { get; } = new ArtifactArchitecture(RiscV64Value); - /// s390x. + /// s390x public static ArtifactArchitecture S390X { get; } = new ArtifactArchitecture(S390XValue); - /// wasm. + /// Wasm public static ArtifactArchitecture Wasm { get; } = new ArtifactArchitecture(WasmValue); /// Determines if two values are the same. public static bool operator ==(ArtifactArchitecture left, ArtifactArchitecture right) => left.Equals(right); diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestPlatform.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestPlatform.cs index 445f21db8839..90a234482c38 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestPlatform.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestPlatform.cs @@ -9,7 +9,7 @@ namespace Azure.Containers.ContainerRegistry { - /// Manifest attributes details. + /// The artifact's platform. public partial class ArtifactManifestPlatform { /// Initializes a new instance of ArtifactManifestPlatform. diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagOrderBy.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagOrderBy.cs index 3ae87cd04516..9ad7a0cc178f 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagOrderBy.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagOrderBy.cs @@ -7,7 +7,7 @@ namespace Azure.Containers.ContainerRegistry { - /// The ArtifactTagOrderBy. + /// Sort options for ordering tags in a collection. public enum ArtifactTagOrderBy { /// Do not provide an orderby value in the request. diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactOperatingSystem.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactOperatingSystem.cs index b4aff4f25ca6..700c4a88cbcc 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactOperatingSystem.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactOperatingSystem.cs @@ -8,6 +8,9 @@ namespace Azure.Containers.ContainerRegistry { + /// + /// The artifact platform's operating system. + /// public readonly partial struct ArtifactOperatingSystem : IEquatable { /// iOS. diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactTagProperties.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactTagProperties.cs index 87e78c1e54a0..1334d3ca0d3a 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactTagProperties.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactTagProperties.cs @@ -15,13 +15,13 @@ public ArtifactTagProperties() { } - /// Delete enabled. + /// Whether or not this tag can be deleted. public bool? CanDelete { get; set; } - /// Write enabled. + /// Whether or not this tag can be written to. public bool? CanWrite { get; set; } - /// List enabled. + /// Whether or not to include this tag in the collection returned from the tag listing operation. public bool? CanList { get; set; } - /// Read enabled. + /// Whether or not this tag can be read. public bool? CanRead { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs index 3d78cd20a433..9223fa1d9e76 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs @@ -9,7 +9,12 @@ namespace Azure.Containers.ContainerRegistry { - /// A helper class that groups information and operations about a repository in this container registry. + /// + /// A `repository` in a container registry is a logical grouping of images or artifacts that share the same name. For example, + /// different versions of a `hello-world` application could have tags `v1` and `v2`, and be grouped by the repository `hello-world`. + /// + /// The class is a helper class that groups information and operations about a repository in this + /// container registry. public partial class ContainerRepository { private readonly ClientDiagnostics _clientDiagnostics; @@ -45,7 +50,7 @@ protected ContainerRepository() } /// - /// Create a new object for the specified artifact. + /// Create a new helper object for the artifact identified by `tagOrDigest`. /// /// Either a tag or a digest that uniquely identifies the artifact. /// A new for the desired repository. @@ -64,7 +69,7 @@ public virtual RegistryArtifact GetArtifact(string tagOrDigest) } #region Repository methods - /// Get repository properties. + /// Get the properties of the repository. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual async Task> GetPropertiesAsync(CancellationToken cancellationToken = default) @@ -82,7 +87,7 @@ public virtual async Task> GetProperties } } - /// Get repository properties. + /// Get the properties of the repository. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual Response GetProperties(CancellationToken cancellationToken = default) @@ -100,8 +105,8 @@ public virtual Response GetProperties(Cancellatio } } - /// Update the attribute identified by `name` where `reference` is the name of the repository. - /// Repository attribute value. + /// Update the properties of the repository. + /// Repository properties object containing values to update. /// The cancellation token to use. /// Thrown when is null. /// Thrown when a failure is returned by the Container Registry service. @@ -134,8 +139,8 @@ private static RepositoryWriteableProperties GetRepositoryWriteableProperties(Co }; } - /// Update the repository properties. - /// Repository properties to set. + /// Update the properties of the repository. + /// Repository properties object containing values to update. /// The cancellation token to use. /// Thrown when is null. /// Thrown when a failure is returned by the Container Registry service. @@ -156,7 +161,7 @@ public virtual Response UpdateProperties(Containe } } - /// Delete the repository. + /// Delete the repository and artifacts that share its name. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual async Task DeleteAsync(CancellationToken cancellationToken = default) @@ -174,7 +179,7 @@ public virtual async Task DeleteAsync(CancellationToken cancellationTo } } - /// Delete the repository. + /// Delete the repository and artifacts that share its name. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual Response Delete(CancellationToken cancellationToken = default) @@ -194,7 +199,9 @@ public virtual Response Delete(CancellationToken cancellationToken = default) #endregion #region Registry Artifact/Manifest methods - /// Get the collection of registry artifacts for a repository. + + /// List the manifests associated with this repository and the properties of each. + /// This is useful for determining the collection of artifacts associated with this repository, as each artifact is uniquely identified by its manifest. /// Requested order of manifests in the collection. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. @@ -238,7 +245,8 @@ async Task> NextPageFunc(string nextLink, int? return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); } - /// Get the collection of tags for a repository. + /// List the manifests associated with this repository and the properties of each. + /// This is useful for determining the collection of artifacts associated with this repository, as each artifact is uniquely identified by its manifest. /// Requested order of manifests in the collection. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. From 0c1b5b76f493e1b1ae42ef5240897bb0e2e64c7b Mon Sep 17 00:00:00 2001 From: Anne Loomis Thompson Date: Fri, 9 Jul 2021 13:52:52 -0700 Subject: [PATCH 2/9] more updates --- .../src/Models/ArtifactManifestProperties.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactManifestProperties.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactManifestProperties.cs index e00e5b181ced..ba8d70c8ce18 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactManifestProperties.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactManifestProperties.cs @@ -17,13 +17,13 @@ public ArtifactManifestProperties() { } - /// Delete enabled. + /// Whether or not this tag can be deleted. public bool? CanDelete { get; set; } - /// Write enabled. + /// Whether or not this tag can be written to. public bool? CanWrite { get; set; } - /// List enabled. + /// Whether or not to include this tag in the collection returned from the tag listing operation. public bool? CanList { get; set; } - /// Read enabled. + /// Whether or not this tag can be read. public bool? CanRead { get; set; } /// Quarantine state. internal string QuarantineState { get; } From dac2226b750478dd75b98b1f519bceab3fd6077e Mon Sep 17 00:00:00 2001 From: Anne Loomis Thompson Date: Mon, 12 Jul 2021 09:31:36 -0700 Subject: [PATCH 3/9] regen from updated swagger --- ... => AzureContainerRegistryModelFactory.cs} | 6 ++-- .../src/Generated/Models/AcrManifests.cs | 4 +-- .../Generated/Models/ArtifactArchitecture.cs | 28 +++++++++---------- .../Models/ArtifactManifestPlatform.cs | 2 +- .../Models/ArtifactManifestProperties.cs | 4 +-- .../Generated/Models/ArtifactTagOrderBy.cs | 2 +- .../Generated/Models/ArtifactTagProperties.cs | 6 ++-- .../Models/ContainerRepositoryProperties.cs | 6 ++-- .../src/Generated/Models/TagList.cs | 6 ++-- .../src/autorest.md | 3 +- 10 files changed, 34 insertions(+), 33 deletions(-) rename sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/{ContainerRegistryModelFactory.cs => AzureContainerRegistryModelFactory.cs} (94%) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryModelFactory.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/AzureContainerRegistryModelFactory.cs similarity index 94% rename from sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryModelFactory.cs rename to sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/AzureContainerRegistryModelFactory.cs index bf0afc1b96a8..be4a6c82b96d 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryModelFactory.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/AzureContainerRegistryModelFactory.cs @@ -10,10 +10,10 @@ namespace Azure.Containers.ContainerRegistry { /// Model factory for read-only models. - public static partial class ContainerRegistryModelFactory + public static partial class AzureContainerRegistryModelFactory { /// Initializes a new instance of ContainerRepositoryProperties. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Image name. /// Image created time. /// Image last update time. @@ -31,7 +31,7 @@ public static ContainerRepositoryProperties ContainerRepositoryProperties(string } /// Initializes a new instance of ArtifactTagProperties. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Image name. /// Tag name. /// Tag digest. diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/AcrManifests.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/AcrManifests.cs index 39ac32d96f28..65273cd3f9b9 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/AcrManifests.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/AcrManifests.cs @@ -20,7 +20,7 @@ internal AcrManifests() } /// Initializes a new instance of AcrManifests. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Image name. /// List of manifests. /// . @@ -32,7 +32,7 @@ internal AcrManifests(string registryLoginServer, string repository, IReadOnlyLi Link = link; } - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. public string RegistryLoginServer { get; } /// Image name. public string Repository { get; } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactArchitecture.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactArchitecture.cs index 90e5306a37ab..ecc6bd186998 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactArchitecture.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactArchitecture.cs @@ -10,7 +10,7 @@ namespace Azure.Containers.ContainerRegistry { - /// The artifact platform's architecture. + /// The artifact platform's architecture. public readonly partial struct ArtifactArchitecture : IEquatable { private readonly string _value; @@ -36,31 +36,31 @@ public ArtifactArchitecture(string value) private const string S390XValue = "s390x"; private const string WasmValue = "wasm"; - /// i386 + /// i386. public static ArtifactArchitecture I386 { get; } = new ArtifactArchitecture(I386Value); - /// AMD64 + /// AMD64. public static ArtifactArchitecture Amd64 { get; } = new ArtifactArchitecture(Amd64Value); - /// ARM + /// ARM. public static ArtifactArchitecture Arm { get; } = new ArtifactArchitecture(ArmValue); - /// ARM64 + /// ARM64. public static ArtifactArchitecture Arm64 { get; } = new ArtifactArchitecture(Arm64Value); - /// MIPS + /// MIPS. public static ArtifactArchitecture Mips { get; } = new ArtifactArchitecture(MipsValue); - /// MIPSLE + /// MIPSLE. public static ArtifactArchitecture MipsLe { get; } = new ArtifactArchitecture(MipsLeValue); - /// MIPS64 + /// MIPS64. public static ArtifactArchitecture Mips64 { get; } = new ArtifactArchitecture(Mips64Value); - /// MIPS64LE + /// MIPS64LE. public static ArtifactArchitecture Mips64Le { get; } = new ArtifactArchitecture(Mips64LeValue); - /// PPC64 + /// PPC64. public static ArtifactArchitecture Ppc64 { get; } = new ArtifactArchitecture(Ppc64Value); - /// PPC64LE + /// PPC64LE. public static ArtifactArchitecture Ppc64Le { get; } = new ArtifactArchitecture(Ppc64LeValue); - /// RISCv64 + /// RISCv64. public static ArtifactArchitecture RiscV64 { get; } = new ArtifactArchitecture(RiscV64Value); - /// s390x + /// s390x. public static ArtifactArchitecture S390X { get; } = new ArtifactArchitecture(S390XValue); - /// Wasm + /// Wasm. public static ArtifactArchitecture Wasm { get; } = new ArtifactArchitecture(WasmValue); /// Determines if two values are the same. public static bool operator ==(ArtifactArchitecture left, ArtifactArchitecture right) => left.Equals(right); diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestPlatform.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestPlatform.cs index 90a234482c38..52d1f5e70fda 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestPlatform.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestPlatform.cs @@ -9,7 +9,7 @@ namespace Azure.Containers.ContainerRegistry { - /// The artifact's platform. + /// The artifact's platform, consisting of operating system and architecture. public partial class ArtifactManifestPlatform { /// Initializes a new instance of ArtifactManifestPlatform. diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestProperties.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestProperties.cs index 9fb5851b638d..b730545d6625 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestProperties.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactManifestProperties.cs @@ -34,7 +34,7 @@ internal ArtifactManifestProperties(string digest, DateTimeOffset createdOn, Dat } /// Initializes a new instance of ArtifactManifestProperties. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Repository name. /// Manifest. /// Image size. @@ -70,7 +70,7 @@ internal ArtifactManifestProperties(string registryLoginServer, string repositor QuarantineDetails = quarantineDetails; } - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. public string RegistryLoginServer { get; } /// Repository name. public string RepositoryName { get; } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagOrderBy.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagOrderBy.cs index 9ad7a0cc178f..3f4d1b9278b3 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagOrderBy.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagOrderBy.cs @@ -7,7 +7,7 @@ namespace Azure.Containers.ContainerRegistry { - /// Sort options for ordering tags in a collection. + /// Sort options for ordering tags in a collection. public enum ArtifactTagOrderBy { /// Do not provide an orderby value in the request. diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagProperties.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagProperties.cs index 58a4a629d39b..f66f5c67753c 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagProperties.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactTagProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Containers.ContainerRegistry public partial class ArtifactTagProperties { /// Initializes a new instance of ArtifactTagProperties. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Image name. /// Tag name. /// Tag digest. @@ -48,7 +48,7 @@ internal ArtifactTagProperties(string registryLoginServer, string repositoryName } /// Initializes a new instance of ArtifactTagProperties. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Image name. /// Tag name. /// Tag digest. @@ -72,7 +72,7 @@ internal ArtifactTagProperties(string registryLoginServer, string repositoryName CanRead = canRead; } - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. public string RegistryLoginServer { get; } /// Image name. public string RepositoryName { get; } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ContainerRepositoryProperties.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ContainerRepositoryProperties.cs index 64118a45dc38..b19a728fcb1b 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ContainerRepositoryProperties.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ContainerRepositoryProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Containers.ContainerRegistry public partial class ContainerRepositoryProperties { /// Initializes a new instance of ContainerRepositoryProperties. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Image name. /// Image created time. /// Image last update time. @@ -40,7 +40,7 @@ internal ContainerRepositoryProperties(string registryLoginServer, string name, } /// Initializes a new instance of ContainerRepositoryProperties. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Image name. /// Image created time. /// Image last update time. @@ -66,7 +66,7 @@ internal ContainerRepositoryProperties(string registryLoginServer, string name, TeleportEnabled = teleportEnabled; } - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. public string RegistryLoginServer { get; } /// Image name. public string Name { get; } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/TagList.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/TagList.cs index e2148643fc25..ff1d2402fcec 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/TagList.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/TagList.cs @@ -15,7 +15,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class TagList { /// Initializes a new instance of TagList. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Image name. /// List of tag attribute details. /// , , or is null. @@ -40,7 +40,7 @@ internal TagList(string registryLoginServer, string repository, IEnumerable Initializes a new instance of TagList. - /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. /// Image name. /// List of tag attribute details. /// . @@ -52,7 +52,7 @@ internal TagList(string registryLoginServer, string repository, IReadOnlyList Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. + /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. public string RegistryLoginServer { get; } /// Image name. public string Repository { get; } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md index 2e6d04e932ea..c6be330b6aae 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md @@ -4,6 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/5bcf8b9ce0d230830b172c2d9753cbbb4abf325b/specification/containerregistry/data-plane/Azure.ContainerRegistry/preview/2019-08-15-preview/containerregistry.json + - https://github.com/Azure/azure-rest-api-specs/blob/49f1a1102a2a5c0eeb97e6f00b2fabeec04fa70a/specification/containerregistry/data-plane/Azure.ContainerRegistry/preview/2019-08-15-preview/containerregistry.json + model-namespace: false ``` From 3f5d4faf5c71ec90cfec1bdd8012063fc26a18a1 Mon Sep 17 00:00:00 2001 From: Anne Loomis Thompson Date: Mon, 12 Jul 2021 09:45:38 -0700 Subject: [PATCH 4/9] update generated API listing --- ...re.Containers.ContainerRegistry.netstandard2.0.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs index 94da344c9ba0..d468f96a917f 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs @@ -110,6 +110,12 @@ public ArtifactTagProperties() { } public string RegistryLoginServer { get { throw null; } } public string RepositoryName { get { throw null; } } } + public static partial class AzureContainerRegistryModelFactory + { + public static Azure.Containers.ContainerRegistry.ArtifactManifestPlatform ArtifactManifestPlatform(string digest = null, Azure.Containers.ContainerRegistry.ArtifactArchitecture? architecture = default(Azure.Containers.ContainerRegistry.ArtifactArchitecture?), Azure.Containers.ContainerRegistry.ArtifactOperatingSystem? operatingSystem = default(Azure.Containers.ContainerRegistry.ArtifactOperatingSystem?)) { throw null; } + public static Azure.Containers.ContainerRegistry.ArtifactTagProperties ArtifactTagProperties(string registryLoginServer = null, string repositoryName = null, string name = null, string digest = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), bool? canDelete = default(bool?), bool? canWrite = default(bool?), bool? canList = default(bool?), bool? canRead = default(bool?)) { throw null; } + public static Azure.Containers.ContainerRegistry.ContainerRepositoryProperties ContainerRepositoryProperties(string registryLoginServer = null, string name = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), int manifestCount = 0, int tagCount = 0, bool? canDelete = default(bool?), bool? canWrite = default(bool?), bool? canList = default(bool?), bool? canRead = default(bool?), bool? teleportEnabled = default(bool?)) { throw null; } + } public partial class ContainerRegistryClient { protected ContainerRegistryClient() { } @@ -134,12 +140,6 @@ public enum ServiceVersion V1_0 = 1, } } - public static partial class ContainerRegistryModelFactory - { - public static Azure.Containers.ContainerRegistry.ArtifactManifestPlatform ArtifactManifestPlatform(string digest = null, Azure.Containers.ContainerRegistry.ArtifactArchitecture? architecture = default(Azure.Containers.ContainerRegistry.ArtifactArchitecture?), Azure.Containers.ContainerRegistry.ArtifactOperatingSystem? operatingSystem = default(Azure.Containers.ContainerRegistry.ArtifactOperatingSystem?)) { throw null; } - public static Azure.Containers.ContainerRegistry.ArtifactTagProperties ArtifactTagProperties(string registryLoginServer = null, string repositoryName = null, string name = null, string digest = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), bool? canDelete = default(bool?), bool? canWrite = default(bool?), bool? canList = default(bool?), bool? canRead = default(bool?)) { throw null; } - public static Azure.Containers.ContainerRegistry.ContainerRepositoryProperties ContainerRepositoryProperties(string registryLoginServer = null, string name = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), int manifestCount = 0, int tagCount = 0, bool? canDelete = default(bool?), bool? canWrite = default(bool?), bool? canList = default(bool?), bool? canRead = default(bool?), bool? teleportEnabled = default(bool?)) { throw null; } - } public partial class ContainerRepository { protected ContainerRepository() { } From f7bc558ab566ae689dc3a4128aaef679dbb1c628 Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Mon, 12 Jul 2021 15:25:22 -0700 Subject: [PATCH 5/9] Update sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs Co-authored-by: Christopher Scott --- .../src/ContainerRegistryClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs index 879b7a88d829..31bcb28c351a 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs @@ -93,7 +93,7 @@ protected ContainerRegistryClient() /// public virtual Uri Endpoint => _endpoint; - /// List the repositories in this registry. + /// List the names of the repositories in this registry. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual AsyncPageable GetRepositoryNamesAsync(CancellationToken cancellationToken = default) From a13c228c7ae22ffa3f794d930e5a94bea6aec57c Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Mon, 12 Jul 2021 15:29:04 -0700 Subject: [PATCH 6/9] Update sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs Co-authored-by: Christopher Scott --- .../src/Repository/ContainerRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs index 9223fa1d9e76..ae724e284e3c 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs @@ -50,7 +50,7 @@ protected ContainerRepository() } /// - /// Create a new helper object for the artifact identified by `tagOrDigest`. + /// Create a new helper object for the artifact identified by . /// /// Either a tag or a digest that uniquely identifies the artifact. /// A new for the desired repository. From 7f340800c062cb652cc83e4f2b28cfbd6516ff6f Mon Sep 17 00:00:00 2001 From: Anne Loomis Thompson Date: Tue, 13 Jul 2021 08:35:12 -0700 Subject: [PATCH 7/9] pr fb --- .../src/Artifact/RegistryArtifact.cs | 6 ++++-- .../src/ContainerRegistryClient.cs | 2 +- ...odelFactory.cs => ContainerRegistryModelFactory.cs} | 2 +- .../src/Models/ArtifactManifestProperties.cs | 2 +- .../src/Models/ArtifactTagProperties.cs | 2 +- .../src/Repository/ContainerRepository.cs | 10 ++++++---- .../Azure.Containers.ContainerRegistry/src/autorest.md | 1 + 7 files changed, 15 insertions(+), 10 deletions(-) rename sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/{AzureContainerRegistryModelFactory.cs => ContainerRegistryModelFactory.cs} (98%) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Artifact/RegistryArtifact.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Artifact/RegistryArtifact.cs index 545213769e6c..9891ef260ab9 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Artifact/RegistryArtifact.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Artifact/RegistryArtifact.cs @@ -11,8 +11,10 @@ namespace Azure.Containers.ContainerRegistry { /// `Artifact` is the general term for items stored in a container registry, /// and can include Docker images or other Open Container Initiative (OCI) artifact types. - /// - /// The class is a helper class that groups information and operations about an image or artifact in this container registry. + /// + /// The class is a helper class that groups information and operations about an image or artifact in this container registry. + /// + /// public partial class RegistryArtifact { private readonly ClientDiagnostics _clientDiagnostics; diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs index 31bcb28c351a..e6cbfb70fc40 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs @@ -134,7 +134,7 @@ async Task> NextPageFunc(string continuationToken, int? pageSizeHin return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); } - /// List the repositories in this registry. + /// List the names of the repositories in this registry. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual Pageable GetRepositoryNames(CancellationToken cancellationToken = default) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/AzureContainerRegistryModelFactory.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryModelFactory.cs similarity index 98% rename from sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/AzureContainerRegistryModelFactory.cs rename to sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryModelFactory.cs index be4a6c82b96d..98db20ed7d9c 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/AzureContainerRegistryModelFactory.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryModelFactory.cs @@ -10,7 +10,7 @@ namespace Azure.Containers.ContainerRegistry { /// Model factory for read-only models. - public static partial class AzureContainerRegistryModelFactory + public static partial class ContainerRegistryModelFactory { /// Initializes a new instance of ContainerRepositoryProperties. /// Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactManifestProperties.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactManifestProperties.cs index ba8d70c8ce18..1e1ed88843df 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactManifestProperties.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactManifestProperties.cs @@ -21,7 +21,7 @@ public ArtifactManifestProperties() public bool? CanDelete { get; set; } /// Whether or not this tag can be written to. public bool? CanWrite { get; set; } - /// Whether or not to include this tag in the collection returned from the tag listing operation. + /// Whether or not to include this artifact in the collection returned from . public bool? CanList { get; set; } /// Whether or not this tag can be read. public bool? CanRead { get; set; } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactTagProperties.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactTagProperties.cs index 1334d3ca0d3a..29fb1adc8b05 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactTagProperties.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Models/ArtifactTagProperties.cs @@ -19,7 +19,7 @@ public ArtifactTagProperties() public bool? CanDelete { get; set; } /// Whether or not this tag can be written to. public bool? CanWrite { get; set; } - /// Whether or not to include this tag in the collection returned from the tag listing operation. + /// Whether or not to include this tag in the collection returned from . public bool? CanList { get; set; } /// Whether or not this tag can be read. public bool? CanRead { get; set; } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs index ae724e284e3c..a8e75a625452 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs @@ -12,9 +12,11 @@ namespace Azure.Containers.ContainerRegistry /// /// A `repository` in a container registry is a logical grouping of images or artifacts that share the same name. For example, /// different versions of a `hello-world` application could have tags `v1` and `v2`, and be grouped by the repository `hello-world`. - /// + /// /// The class is a helper class that groups information and operations about a repository in this - /// container registry. + /// container registry. + /// + /// public partial class ContainerRepository { private readonly ClientDiagnostics _clientDiagnostics; @@ -161,7 +163,7 @@ public virtual Response UpdateProperties(Containe } } - /// Delete the repository and artifacts that share its name. + /// Delete the repository and all artifacts that are part of its logical group. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual async Task DeleteAsync(CancellationToken cancellationToken = default) @@ -179,7 +181,7 @@ public virtual async Task DeleteAsync(CancellationToken cancellationTo } } - /// Delete the repository and artifacts that share its name. + /// Delete the repository and all artifacts that are part of its logical group. /// The cancellation token to use. /// Thrown when a failure is returned by the Container Registry service. public virtual Response Delete(CancellationToken cancellationToken = default) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md index c6be330b6aae..2e00e37a8c12 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md @@ -3,6 +3,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml +title: Container Registry input-file: - https://github.com/Azure/azure-rest-api-specs/blob/49f1a1102a2a5c0eeb97e6f00b2fabeec04fa70a/specification/containerregistry/data-plane/Azure.ContainerRegistry/preview/2019-08-15-preview/containerregistry.json From 170915d189da3cfd88145c57cdd5299d0ad5f5f2 Mon Sep 17 00:00:00 2001 From: Anne Loomis Thompson Date: Tue, 13 Jul 2021 08:51:16 -0700 Subject: [PATCH 8/9] update to latest swagger in azure-rest-api-specs repo --- .../src/Generated/ContainerRegistryRestClient.cs | 12 ++++++------ .../src/autorest.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryRestClient.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryRestClient.cs index acb1f36195bc..d37b6682eebe 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryRestClient.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryRestClient.cs @@ -107,7 +107,7 @@ internal HttpMessage CreateGetManifestRequest(string name, string reference, str /// Accept header string delimited by comma. For example, application/vnd.docker.distribution.manifest.v2+json. /// The cancellation token to use. /// or is null. - public async Task> GetManifestAsync(string name, string reference, string accept = null, CancellationToken cancellationToken = default) + public async Task> GetManifestAsync(string name, string reference, string accept = null, CancellationToken cancellationToken = default) { if (name == null) { @@ -124,9 +124,9 @@ public async Task> GetManifestAsync(string name, string refer { case 200: { - Manifest value = default; + ManifestWrapper value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Manifest.DeserializeManifest(document.RootElement); + value = ManifestWrapper.DeserializeManifestWrapper(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -140,7 +140,7 @@ public async Task> GetManifestAsync(string name, string refer /// Accept header string delimited by comma. For example, application/vnd.docker.distribution.manifest.v2+json. /// The cancellation token to use. /// or is null. - public Response GetManifest(string name, string reference, string accept = null, CancellationToken cancellationToken = default) + public Response GetManifest(string name, string reference, string accept = null, CancellationToken cancellationToken = default) { if (name == null) { @@ -157,9 +157,9 @@ public Response GetManifest(string name, string reference, string acce { case 200: { - Manifest value = default; + ManifestWrapper value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Manifest.DeserializeManifest(document.RootElement); + value = ManifestWrapper.DeserializeManifestWrapper(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md index 2e00e37a8c12..0a11ad9bdbd1 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md @@ -5,7 +5,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: Container Registry input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/49f1a1102a2a5c0eeb97e6f00b2fabeec04fa70a/specification/containerregistry/data-plane/Azure.ContainerRegistry/preview/2019-08-15-preview/containerregistry.json + - https://github.com/Azure/azure-rest-api-specs/blob/2c33d5572dab4c6f52faf31004f0561205737107/specification/containerregistry/data-plane/Azure.ContainerRegistry/stable/2021-07-01/containerregistry.json model-namespace: false ``` From f709672aae4ec2fc560e7be47bbd561f5f554d6a Mon Sep 17 00:00:00 2001 From: Anne Loomis Thompson Date: Tue, 13 Jul 2021 08:55:59 -0700 Subject: [PATCH 9/9] export API --- ...re.Containers.ContainerRegistry.netstandard2.0.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs index d468f96a917f..94da344c9ba0 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs @@ -110,12 +110,6 @@ public ArtifactTagProperties() { } public string RegistryLoginServer { get { throw null; } } public string RepositoryName { get { throw null; } } } - public static partial class AzureContainerRegistryModelFactory - { - public static Azure.Containers.ContainerRegistry.ArtifactManifestPlatform ArtifactManifestPlatform(string digest = null, Azure.Containers.ContainerRegistry.ArtifactArchitecture? architecture = default(Azure.Containers.ContainerRegistry.ArtifactArchitecture?), Azure.Containers.ContainerRegistry.ArtifactOperatingSystem? operatingSystem = default(Azure.Containers.ContainerRegistry.ArtifactOperatingSystem?)) { throw null; } - public static Azure.Containers.ContainerRegistry.ArtifactTagProperties ArtifactTagProperties(string registryLoginServer = null, string repositoryName = null, string name = null, string digest = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), bool? canDelete = default(bool?), bool? canWrite = default(bool?), bool? canList = default(bool?), bool? canRead = default(bool?)) { throw null; } - public static Azure.Containers.ContainerRegistry.ContainerRepositoryProperties ContainerRepositoryProperties(string registryLoginServer = null, string name = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), int manifestCount = 0, int tagCount = 0, bool? canDelete = default(bool?), bool? canWrite = default(bool?), bool? canList = default(bool?), bool? canRead = default(bool?), bool? teleportEnabled = default(bool?)) { throw null; } - } public partial class ContainerRegistryClient { protected ContainerRegistryClient() { } @@ -140,6 +134,12 @@ public enum ServiceVersion V1_0 = 1, } } + public static partial class ContainerRegistryModelFactory + { + public static Azure.Containers.ContainerRegistry.ArtifactManifestPlatform ArtifactManifestPlatform(string digest = null, Azure.Containers.ContainerRegistry.ArtifactArchitecture? architecture = default(Azure.Containers.ContainerRegistry.ArtifactArchitecture?), Azure.Containers.ContainerRegistry.ArtifactOperatingSystem? operatingSystem = default(Azure.Containers.ContainerRegistry.ArtifactOperatingSystem?)) { throw null; } + public static Azure.Containers.ContainerRegistry.ArtifactTagProperties ArtifactTagProperties(string registryLoginServer = null, string repositoryName = null, string name = null, string digest = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), bool? canDelete = default(bool?), bool? canWrite = default(bool?), bool? canList = default(bool?), bool? canRead = default(bool?)) { throw null; } + public static Azure.Containers.ContainerRegistry.ContainerRepositoryProperties ContainerRepositoryProperties(string registryLoginServer = null, string name = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), int manifestCount = 0, int tagCount = 0, bool? canDelete = default(bool?), bool? canWrite = default(bool?), bool? canList = default(bool?), bool? canRead = default(bool?), bool? teleportEnabled = default(bool?)) { throw null; } + } public partial class ContainerRepository { protected ContainerRepository() { }