From dd950e79d018059ff8798dc5b0274d56fb471fb8 Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Thu, 2 Sep 2021 05:53:23 -0700 Subject: [PATCH] deserialize from OciManifest model type. --- .../src/Blob/ArtifactBlobDescriptor.cs | 2 +- .../src/Blob/ContainerRegistryBlobClient.cs | 105 +++-- .../src/Blob/Manifest.cs | 19 + .../Generated/ContainerRegistryRestClient.cs | 12 +- .../Models/Annotations.Serialization.cs | 2 +- .../src/Generated/Models/Annotations.cs | 2 +- .../ArtifactBlobDescriptor.Serialization.cs | 2 +- .../Models/ArtifactBlobDescriptor.cs | 2 + .../Generated/Models/FsLayer.Serialization.cs | 13 +- .../src/Generated/Models/FsLayer.cs | 4 +- .../Generated/Models/History.Serialization.cs | 13 +- .../src/Generated/Models/History.cs | 4 +- .../Models/ImageSignature.Serialization.cs | 23 +- .../src/Generated/Models/ImageSignature.cs | 8 +- .../src/Generated/Models/JWK.Serialization.cs | 18 +- .../src/Generated/Models/JWK.cs | 6 +- .../Models/JWKHeader.Serialization.cs | 33 +- .../src/Generated/Models/JWKHeader.cs | 12 +- .../Models/Manifest.Serialization.cs | 15 +- .../src/Generated/Models/Manifest.cs | 8 +- .../Models/ManifestList.Serialization.cs | 30 +- .../src/Generated/Models/ManifestList.cs | 9 +- .../ManifestListAttributes.Serialization.cs | 28 +- .../Models/ManifestListAttributes.cs | 10 +- .../Models/ManifestWrapper.Serialization.cs | 110 ++++- .../src/Generated/Models/ManifestWrapper.cs | 26 +- .../Models/OCIIndex.Serialization.cs | 37 +- .../src/Generated/Models/OCIIndex.cs | 9 +- .../src/Generated/Models/OCIManifest.cs | 5 +- .../Models/OciManifest.Serialization.cs | 18 +- .../Models/Platform.Serialization.cs | 52 ++- .../src/Generated/Models/Platform.cs | 16 +- .../Models/V1Manifest.Serialization.cs | 64 ++- .../src/Generated/Models/V1Manifest.cs | 17 +- .../Models/V2Manifest.Serialization.cs | 35 +- .../src/Generated/Models/V2Manifest.cs | 10 +- .../src/GlobalSuppressions.cs | 2 + .../src/autorest.md | 31 +- .../ContainerRegistryBlobClientLiveTests.cs | 77 ++-- .../CanUploadOciManifestAsync.json | 406 ++++++++++++++++++ 40 files changed, 1115 insertions(+), 180 deletions(-) create mode 100644 sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/Manifest.cs create mode 100644 sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/SessionRecords/ContainerRegistryBlobClientLiveTests/CanUploadOciManifestAsync.json diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/ArtifactBlobDescriptor.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/ArtifactBlobDescriptor.cs index d6798acd51b37..07926bb08094a 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/ArtifactBlobDescriptor.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/ArtifactBlobDescriptor.cs @@ -24,7 +24,7 @@ public partial class ArtifactBlobDescriptor internal IList Urls { get; } /// Additional information provided through arbitrary metadata. - internal Annotations Annotations { get; } + //internal Annotations Annotations { get; } internal static string ComputeDigest(Stream stream) { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/ContainerRegistryBlobClient.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/ContainerRegistryBlobClient.cs index 454606ff94df6..5fce1e58c3e2f 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/ContainerRegistryBlobClient.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/ContainerRegistryBlobClient.cs @@ -78,24 +78,87 @@ protected ContainerRegistryBlobClient() #region File Upload/Download + ///// + ///// + ///// + ///// + ///// + ///// + //public virtual Response UploadManifest(Stream stream, UploadManifestOptions options = default, CancellationToken cancellationToken = default) + //{ + // throw new NotImplementedException(); + //} + + ///// + ///// + ///// + ///// + ///// + ///// + //public async virtual Task> UploadManifestAsync(Stream stream, UploadManifestOptions options = default, CancellationToken cancellationToken = default) + //{ + // options ??= new UploadManifestOptions(); + + // using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(ContainerRegistryBlobClient)}.{nameof(UploadManifest)}"); + // scope.Start(); + // try + // { + // string tagOrDigest = options.Tag ?? ArtifactBlobDescriptor.ComputeDigest(stream); + // ResponseWithHeaders response = await _restClient.CreateManifestAsync(_repositoryName, tagOrDigest, stream, ManifestMediaType.OciManifest.ToString(), cancellationToken).ConfigureAwait(false); + // return Response.FromValue(new UploadManifestResult(response.Headers.DockerContentDigest), response.GetRawResponse()); + // } + // catch (Exception e) + // { + // scope.Failed(e); + // throw; + // } + //} + + ///// + ///// + ///// + ///// + ///// + ///// + //public virtual Response UploadManifest(OciManifest manifest, UploadManifestOptions options = default, CancellationToken cancellationToken = default) + //{ + // throw new NotImplementedException(); + //} + + ///// + ///// + ///// + ///// + ///// + ///// + //public async virtual Task> UploadManifestAsync(OciManifest manifest, UploadManifestOptions options = default, CancellationToken cancellationToken = default) + //{ + // Argument.AssertNotNull(manifest, "manifest"); + + // MemoryStream stream = new MemoryStream(); + // Utf8JsonWriter jsonWriter = new Utf8JsonWriter(stream); + // ((IUtf8JsonSerializable)manifest).Write(jsonWriter); + // return await UploadManifestAsync(stream, options, cancellationToken).ConfigureAwait(false); + //} + /// /// - /// + /// /// /// /// - public virtual Response UploadManifest(Stream stream, UploadManifestOptions options = default, CancellationToken cancellationToken = default) + public virtual Response UploadManifest(OciManifest manifest, UploadManifestOptions options = default, CancellationToken cancellationToken = default) { throw new NotImplementedException(); } /// /// - /// + /// /// /// /// - public async virtual Task> UploadManifestAsync(Stream stream, UploadManifestOptions options = default, CancellationToken cancellationToken = default) + public async virtual Task> UploadManifestAsync(OciManifest manifest, UploadManifestOptions options = default, CancellationToken cancellationToken = default) { options ??= new UploadManifestOptions(); @@ -103,8 +166,13 @@ public async virtual Task> UploadManifestAsync(St scope.Start(); try { + MemoryStream stream = new MemoryStream(); + Utf8JsonWriter jsonWriter = new Utf8JsonWriter(stream); + ((IUtf8JsonSerializable)manifest).Write(jsonWriter); + jsonWriter.Flush(); + string tagOrDigest = options.Tag ?? ArtifactBlobDescriptor.ComputeDigest(stream); - ResponseWithHeaders response = await _restClient.CreateManifestAsync(_repositoryName, tagOrDigest, stream, ManifestMediaType.OciManifest.ToString(), cancellationToken).ConfigureAwait(false); + ResponseWithHeaders response = await _restClient.CreateManifestAsync(_repositoryName, tagOrDigest, manifest, ManifestMediaType.OciManifest.ToString(), cancellationToken).ConfigureAwait(false); return Response.FromValue(new UploadManifestResult(response.Headers.DockerContentDigest), response.GetRawResponse()); } catch (Exception e) @@ -114,33 +182,6 @@ public async virtual Task> UploadManifestAsync(St } } - /// - /// - /// - /// - /// - /// - public virtual Response UploadManifest(OciManifest manifest, UploadManifestOptions options = default, CancellationToken cancellationToken = default) - { - throw new NotImplementedException(); - } - - /// - /// - /// - /// - /// - /// - public async virtual Task> UploadManifestAsync(OciManifest manifest, UploadManifestOptions options = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(manifest, "manifest"); - - MemoryStream stream = new MemoryStream(); - Utf8JsonWriter jsonWriter = new Utf8JsonWriter(stream); - ((IUtf8JsonSerializable)manifest).Write(jsonWriter); - return await UploadManifestAsync(stream, options, cancellationToken).ConfigureAwait(false); - } - /// /// /// diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/Manifest.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/Manifest.cs new file mode 100644 index 0000000000000..219090f7d3ba3 --- /dev/null +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/Manifest.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Azure.Core; + +namespace Azure.Containers.ContainerRegistry.Specialized +{ + /// + /// + [CodeGenModel("Manifest")] +#pragma warning disable AZC0012 // Avoid single word type names + public partial class Manifest +#pragma warning restore AZC0012 // Avoid single word type names + { + } +} diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryRestClient.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryRestClient.cs index f5f5759680f92..b4fa6e8dcd226 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryRestClient.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryRestClient.cs @@ -6,11 +6,11 @@ #nullable disable using System; -using System.IO; using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Azure; +using Azure.Containers.ContainerRegistry.Specialized; using Azure.Core; using Azure.Core.Pipeline; @@ -163,7 +163,7 @@ public Response GetManifest(string name, string reference, stri } } - internal HttpMessage CreateCreateManifestRequest(string name, string reference, Stream payload, string contentType) + internal HttpMessage CreateCreateManifestRequest(string name, string reference, Manifest payload, string contentType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -180,7 +180,9 @@ internal HttpMessage CreateCreateManifestRequest(string name, string reference, { request.Headers.Add("Content-Type", contentType); } - request.Content = RequestContent.Create(payload); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(payload); + request.Content = content; return message; } @@ -191,7 +193,7 @@ internal HttpMessage CreateCreateManifestRequest(string name, string reference, /// The manifest's Content-Type. /// The cancellation token to use. /// , , or is null. - public async Task> CreateManifestAsync(string name, string reference, Stream payload, string contentType = null, CancellationToken cancellationToken = default) + public async Task> CreateManifestAsync(string name, string reference, Manifest payload, string contentType = null, CancellationToken cancellationToken = default) { if (name == null) { @@ -225,7 +227,7 @@ public async Task> C /// The manifest's Content-Type. /// The cancellation token to use. /// , , or is null. - public ResponseWithHeaders CreateManifest(string name, string reference, Stream payload, string contentType = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders CreateManifest(string name, string reference, Manifest payload, string contentType = null, CancellationToken cancellationToken = default) { if (name == null) { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Annotations.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Annotations.Serialization.cs index 265072eb0feb6..7793770645233 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Annotations.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Annotations.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class Annotations : IUtf8JsonSerializable + public partial class Annotations : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Annotations.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Annotations.cs index 7cc892496abc5..4e166c8384f7e 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Annotations.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Annotations.cs @@ -12,7 +12,7 @@ namespace Azure.Containers.ContainerRegistry { /// Additional information provided through arbitrary metadata. - internal partial class Annotations + public partial class Annotations { /// Initializes a new instance of Annotations. public Annotations() diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactBlobDescriptor.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactBlobDescriptor.Serialization.cs index 86b6552b48b50..22cf8a41403a8 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactBlobDescriptor.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactBlobDescriptor.Serialization.cs @@ -109,7 +109,7 @@ internal static ArtifactBlobDescriptor DeserializeArtifactBlobDescriptor(JsonEle annotations = null; continue; } - annotations = ContainerRegistry.Annotations.DeserializeAnnotations(property.Value); + annotations = Annotations.DeserializeAnnotations(property.Value); continue; } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactBlobDescriptor.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactBlobDescriptor.cs index 6833a56ba61ad..65bddc48aa433 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactBlobDescriptor.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ArtifactBlobDescriptor.cs @@ -35,5 +35,7 @@ internal ArtifactBlobDescriptor(string mediaType, long? size, string digest, ILi Urls = urls; Annotations = annotations; } + /// Additional information provided through arbitrary metadata. + public Annotations Annotations { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/FsLayer.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/FsLayer.Serialization.cs index ec323a6e21228..605defc93d645 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/FsLayer.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/FsLayer.Serialization.cs @@ -10,8 +10,19 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class FsLayer + internal partial class FsLayer : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BlobSum)) + { + writer.WritePropertyName("blobSum"); + writer.WriteStringValue(BlobSum); + } + writer.WriteEndObject(); + } + internal static FsLayer DeserializeFsLayer(JsonElement element) { Optional blobSum = default; diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/FsLayer.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/FsLayer.cs index e68a7ce230571..4c08cf841bb56 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/FsLayer.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/FsLayer.cs @@ -11,7 +11,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class FsLayer { /// Initializes a new instance of FsLayer. - internal FsLayer() + public FsLayer() { } @@ -23,6 +23,6 @@ internal FsLayer(string blobSum) } /// SHA of an image layer. - public string BlobSum { get; } + public string BlobSum { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/History.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/History.Serialization.cs index d7e42fc705e16..ca9e7f59a62be 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/History.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/History.Serialization.cs @@ -10,8 +10,19 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class History + internal partial class History : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(V1Compatibility)) + { + writer.WritePropertyName("v1Compatibility"); + writer.WriteStringValue(V1Compatibility); + } + writer.WriteEndObject(); + } + internal static History DeserializeHistory(JsonElement element) { Optional v1Compatibility = default; diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/History.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/History.cs index 85dc513a2c83c..e8d94d016d967 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/History.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/History.cs @@ -11,7 +11,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class History { /// Initializes a new instance of History. - internal History() + public History() { } @@ -23,6 +23,6 @@ internal History(string v1Compatibility) } /// The raw v1 compatibility information. - public string V1Compatibility { get; } + public string V1Compatibility { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ImageSignature.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ImageSignature.Serialization.cs index 15b059dd9be05..1a7b236b96058 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ImageSignature.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ImageSignature.Serialization.cs @@ -10,8 +10,29 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class ImageSignature + internal partial class ImageSignature : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Header)) + { + writer.WritePropertyName("header"); + writer.WriteObjectValue(Header); + } + if (Optional.IsDefined(Signature)) + { + writer.WritePropertyName("signature"); + writer.WriteStringValue(Signature); + } + if (Optional.IsDefined(Protected)) + { + writer.WritePropertyName("protected"); + writer.WriteStringValue(Protected); + } + writer.WriteEndObject(); + } + internal static ImageSignature DeserializeImageSignature(JsonElement element) { Optional header = default; diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ImageSignature.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ImageSignature.cs index 923b68e06acf1..99e76fa286db4 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ImageSignature.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ImageSignature.cs @@ -11,7 +11,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class ImageSignature { /// Initializes a new instance of ImageSignature. - internal ImageSignature() + public ImageSignature() { } @@ -27,10 +27,10 @@ internal ImageSignature(JWK header, string signature, string @protected) } /// A JSON web signature. - public JWK Header { get; } + public JWK Header { get; set; } /// A signature for the image manifest, signed by a libtrust private key. - public string Signature { get; } + public string Signature { get; set; } /// The signed protected header. - public string Protected { get; } + public string Protected { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWK.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWK.Serialization.cs index 282c4fb590235..907fa42926f27 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWK.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWK.Serialization.cs @@ -10,8 +10,24 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class JWK + internal partial class JWK : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Jwk)) + { + writer.WritePropertyName("jwk"); + writer.WriteObjectValue(Jwk); + } + if (Optional.IsDefined(Alg)) + { + writer.WritePropertyName("alg"); + writer.WriteStringValue(Alg); + } + writer.WriteEndObject(); + } + internal static JWK DeserializeJWK(JsonElement element) { Optional jwk = default; diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWK.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWK.cs index f0b30848f12f2..fc1b294b7bcbb 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWK.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWK.cs @@ -11,7 +11,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class JWK { /// Initializes a new instance of JWK. - internal JWK() + public JWK() { } @@ -25,8 +25,8 @@ internal JWK(JWKHeader jwk, string alg) } /// JSON web key parameter. - public JWKHeader Jwk { get; } + public JWKHeader Jwk { get; set; } /// The algorithm used to sign or encrypt the JWT. - public string Alg { get; } + public string Alg { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWKHeader.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWKHeader.Serialization.cs index d10dd9e06fef5..eb394f39b94d4 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWKHeader.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWKHeader.Serialization.cs @@ -10,8 +10,39 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class JWKHeader + internal partial class JWKHeader : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Crv)) + { + writer.WritePropertyName("crv"); + writer.WriteStringValue(Crv); + } + if (Optional.IsDefined(Kid)) + { + writer.WritePropertyName("kid"); + writer.WriteStringValue(Kid); + } + if (Optional.IsDefined(Kty)) + { + writer.WritePropertyName("kty"); + writer.WriteStringValue(Kty); + } + if (Optional.IsDefined(X)) + { + writer.WritePropertyName("x"); + writer.WriteStringValue(X); + } + if (Optional.IsDefined(Y)) + { + writer.WritePropertyName("y"); + writer.WriteStringValue(Y); + } + writer.WriteEndObject(); + } + internal static JWKHeader DeserializeJWKHeader(JsonElement element) { Optional crv = default; diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWKHeader.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWKHeader.cs index 8c15893b2315d..706053f6dd839 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWKHeader.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/JWKHeader.cs @@ -11,7 +11,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class JWKHeader { /// Initializes a new instance of JWKHeader. - internal JWKHeader() + public JWKHeader() { } @@ -31,14 +31,14 @@ internal JWKHeader(string crv, string kid, string kty, string x, string y) } /// crv value. - public string Crv { get; } + public string Crv { get; set; } /// kid value. - public string Kid { get; } + public string Kid { get; set; } /// kty value. - public string Kty { get; } + public string Kty { get; set; } /// x value. - public string X { get; } + public string X { get; set; } /// y value. - public string Y { get; } + public string Y { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Manifest.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Manifest.Serialization.cs index 21134ca953e08..c5bdfc22da1aa 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Manifest.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Manifest.Serialization.cs @@ -8,10 +8,21 @@ using System.Text.Json; using Azure.Core; -namespace Azure.Containers.ContainerRegistry +namespace Azure.Containers.ContainerRegistry.Specialized { - internal partial class Manifest + public partial class Manifest : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SchemaVersion)) + { + writer.WritePropertyName("schemaVersion"); + writer.WriteNumberValue(SchemaVersion.Value); + } + writer.WriteEndObject(); + } + internal static Manifest DeserializeManifest(JsonElement element) { Optional schemaVersion = default; diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Manifest.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Manifest.cs index fd7049cef26be..e351d837e1bf7 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Manifest.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Manifest.cs @@ -5,13 +5,13 @@ #nullable disable -namespace Azure.Containers.ContainerRegistry +namespace Azure.Containers.ContainerRegistry.Specialized { /// Returns the requested manifest file. - internal partial class Manifest + public partial class Manifest { /// Initializes a new instance of Manifest. - internal Manifest() + public Manifest() { } @@ -23,6 +23,6 @@ internal Manifest(int? schemaVersion) } /// Schema version. - public int? SchemaVersion { get; } + public int? SchemaVersion { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestList.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestList.Serialization.cs index fbe09c4c516b0..39fa2015238e5 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestList.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestList.Serialization.cs @@ -11,12 +11,38 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class ManifestList + internal partial class ManifestList : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MediaType)) + { + writer.WritePropertyName("mediaType"); + writer.WriteStringValue(MediaType); + } + if (Optional.IsCollectionDefined(Manifests)) + { + writer.WritePropertyName("manifests"); + writer.WriteStartArray(); + foreach (var item in Manifests) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SchemaVersion)) + { + writer.WritePropertyName("schemaVersion"); + writer.WriteNumberValue(SchemaVersion.Value); + } + writer.WriteEndObject(); + } + internal static ManifestList DeserializeManifestList(JsonElement element) { Optional mediaType = default; - Optional> manifests = default; + Optional> manifests = default; Optional schemaVersion = default; foreach (var property in element.EnumerateObject()) { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestList.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestList.cs index 6228c3e4a899f..33ff7f8945b0b 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestList.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestList.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using Azure.Containers.ContainerRegistry.Specialized; using Azure.Core; namespace Azure.Containers.ContainerRegistry @@ -14,7 +15,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class ManifestList : Manifest { /// Initializes a new instance of ManifestList. - internal ManifestList() + public ManifestList() { Manifests = new ChangeTrackingList(); } @@ -23,15 +24,15 @@ internal ManifestList() /// Schema version. /// Media type for this Manifest. /// List of V2 image layer information. - internal ManifestList(int? schemaVersion, string mediaType, IReadOnlyList manifests) : base(schemaVersion) + internal ManifestList(int? schemaVersion, string mediaType, IList manifests) : base(schemaVersion) { MediaType = mediaType; Manifests = manifests; } /// Media type for this Manifest. - public string MediaType { get; } + public string MediaType { get; set; } /// List of V2 image layer information. - public IReadOnlyList Manifests { get; } + public IList Manifests { get; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestListAttributes.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestListAttributes.Serialization.cs index a5c198b2b0e77..c80aba9fbdf06 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestListAttributes.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestListAttributes.Serialization.cs @@ -10,8 +10,34 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class ManifestListAttributes + internal partial class ManifestListAttributes : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MediaType)) + { + writer.WritePropertyName("mediaType"); + writer.WriteStringValue(MediaType); + } + if (Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"); + writer.WriteNumberValue(Size.Value); + } + if (Optional.IsDefined(Digest)) + { + writer.WritePropertyName("digest"); + writer.WriteStringValue(Digest); + } + if (Optional.IsDefined(Platform)) + { + writer.WritePropertyName("platform"); + writer.WriteObjectValue(Platform); + } + writer.WriteEndObject(); + } + internal static ManifestListAttributes DeserializeManifestListAttributes(JsonElement element) { Optional mediaType = default; diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestListAttributes.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestListAttributes.cs index 4c56d72504b22..e331df2719df3 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestListAttributes.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestListAttributes.cs @@ -11,7 +11,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class ManifestListAttributes { /// Initializes a new instance of ManifestListAttributes. - internal ManifestListAttributes() + public ManifestListAttributes() { } @@ -29,12 +29,12 @@ internal ManifestListAttributes(string mediaType, long? size, string digest, Pla } /// The MIME type of the referenced object. This will generally be application/vnd.docker.image.manifest.v2+json, but it could also be application/vnd.docker.image.manifest.v1+json. - public string MediaType { get; } + public string MediaType { get; set; } /// The size in bytes of the object. - public long? Size { get; } + public long? Size { get; set; } /// The digest of the content, as defined by the Registry V2 HTTP API Specification. - public string Digest { get; } + public string Digest { get; set; } /// The platform object describes the platform which the image in the manifest runs on. A full list of valid operating system and architecture values are listed in the Go language documentation for $GOOS and $GOARCH. - public Platform Platform { get; } + public Platform Platform { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestWrapper.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestWrapper.Serialization.cs index f93f1055595dc..4705f4ce9bc72 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestWrapper.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestWrapper.Serialization.cs @@ -12,21 +12,119 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class ManifestWrapper + internal partial class ManifestWrapper : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MediaType)) + { + writer.WritePropertyName("mediaType"); + writer.WriteStringValue(MediaType); + } + if (Optional.IsCollectionDefined(Manifests)) + { + writer.WritePropertyName("manifests"); + writer.WriteStartArray(); + foreach (var item in Manifests) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Config)) + { + writer.WritePropertyName("config"); + writer.WriteObjectValue(Config); + } + if (Optional.IsCollectionDefined(Layers)) + { + writer.WritePropertyName("layers"); + writer.WriteStartArray(); + foreach (var item in Layers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Annotations)) + { + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteObjectValue(Annotations); + } + else + { + writer.WriteNull("annotations"); + } + } + if (Optional.IsDefined(Architecture)) + { + writer.WritePropertyName("architecture"); + writer.WriteStringValue(Architecture); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Tag)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(Tag); + } + if (Optional.IsCollectionDefined(FsLayers)) + { + writer.WritePropertyName("fsLayers"); + writer.WriteStartArray(); + foreach (var item in FsLayers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(History)) + { + writer.WritePropertyName("history"); + writer.WriteStartArray(); + foreach (var item in History) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Signatures)) + { + writer.WritePropertyName("signatures"); + writer.WriteStartArray(); + foreach (var item in Signatures) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SchemaVersion)) + { + writer.WritePropertyName("schemaVersion"); + writer.WriteNumberValue(SchemaVersion.Value); + } + writer.WriteEndObject(); + } + internal static ManifestWrapper DeserializeManifestWrapper(JsonElement element) { Optional mediaType = default; - Optional> manifests = default; + Optional> manifests = default; Optional config = default; - Optional> layers = default; + Optional> layers = default; Optional annotations = default; Optional architecture = default; Optional name = default; Optional tag = default; - Optional> fsLayers = default; - Optional> history = default; - Optional> signatures = default; + Optional> fsLayers = default; + Optional> history = default; + Optional> signatures = default; Optional schemaVersion = default; foreach (var property in element.EnumerateObject()) { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestWrapper.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestWrapper.cs index babdb4317d0d0..85d29a292890c 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestWrapper.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/ManifestWrapper.cs @@ -15,7 +15,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class ManifestWrapper : Manifest { /// Initializes a new instance of ManifestWrapper. - internal ManifestWrapper() + public ManifestWrapper() { Manifests = new ChangeTrackingList(); Layers = new ChangeTrackingList(); @@ -37,7 +37,7 @@ internal ManifestWrapper() /// (V1) List of layer information. /// (V1) Image history. /// (V1) Image signature. - internal ManifestWrapper(int? schemaVersion, string mediaType, IReadOnlyList manifests, ArtifactBlobDescriptor config, IReadOnlyList layers, Annotations annotations, string architecture, string name, string tag, IReadOnlyList fsLayers, IReadOnlyList history, IReadOnlyList signatures) : base(schemaVersion) + internal ManifestWrapper(int? schemaVersion, string mediaType, IList manifests, ArtifactBlobDescriptor config, IList layers, Annotations annotations, string architecture, string name, string tag, IList fsLayers, IList history, IList signatures) : base(schemaVersion) { MediaType = mediaType; Manifests = manifests; @@ -53,26 +53,26 @@ internal ManifestWrapper(int? schemaVersion, string mediaType, IReadOnlyList Media type for this Manifest. - public string MediaType { get; } + public string MediaType { get; set; } /// (ManifestList, OCIIndex) List of V2 image layer information. - public IReadOnlyList Manifests { get; } + public IList Manifests { get; } /// (V2, OCI) Image config descriptor. - public ArtifactBlobDescriptor Config { get; } + public ArtifactBlobDescriptor Config { get; set; } /// (V2, OCI) List of V2 image layer information. - public IReadOnlyList Layers { get; } + public IList Layers { get; } /// (OCI, OCIIndex) Additional metadata. - public Annotations Annotations { get; } + public Annotations Annotations { get; set; } /// (V1) CPU architecture. - public string Architecture { get; } + public string Architecture { get; set; } /// (V1) Image name. - public string Name { get; } + public string Name { get; set; } /// (V1) Image tag. - public string Tag { get; } + public string Tag { get; set; } /// (V1) List of layer information. - public IReadOnlyList FsLayers { get; } + public IList FsLayers { get; } /// (V1) Image history. - public IReadOnlyList History { get; } + public IList History { get; } /// (V1) Image signature. - public IReadOnlyList Signatures { get; } + public IList Signatures { get; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIIndex.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIIndex.Serialization.cs index c6b32b7b4dc11..572e29da53e33 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIIndex.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIIndex.Serialization.cs @@ -11,11 +11,44 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class OCIIndex + internal partial class OCIIndex : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Manifests)) + { + writer.WritePropertyName("manifests"); + writer.WriteStartArray(); + foreach (var item in Manifests) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Annotations)) + { + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteObjectValue(Annotations); + } + else + { + writer.WriteNull("annotations"); + } + } + if (Optional.IsDefined(SchemaVersion)) + { + writer.WritePropertyName("schemaVersion"); + writer.WriteNumberValue(SchemaVersion.Value); + } + writer.WriteEndObject(); + } + internal static OCIIndex DeserializeOCIIndex(JsonElement element) { - Optional> manifests = default; + Optional> manifests = default; Optional annotations = default; Optional schemaVersion = default; foreach (var property in element.EnumerateObject()) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIIndex.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIIndex.cs index 95f7c1d83baa4..016c15e579fb0 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIIndex.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIIndex.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using Azure.Containers.ContainerRegistry.Specialized; using Azure.Core; namespace Azure.Containers.ContainerRegistry @@ -14,7 +15,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class OCIIndex : Manifest { /// Initializes a new instance of OCIIndex. - internal OCIIndex() + public OCIIndex() { Manifests = new ChangeTrackingList(); } @@ -23,15 +24,15 @@ internal OCIIndex() /// Schema version. /// List of OCI image layer information. /// Additional information provided through arbitrary metadata. - internal OCIIndex(int? schemaVersion, IReadOnlyList manifests, Annotations annotations) : base(schemaVersion) + internal OCIIndex(int? schemaVersion, IList manifests, Annotations annotations) : base(schemaVersion) { Manifests = manifests; Annotations = annotations; } /// List of OCI image layer information. - public IReadOnlyList Manifests { get; } + public IList Manifests { get; } /// Additional information provided through arbitrary metadata. - public Annotations Annotations { get; } + public Annotations Annotations { get; set; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIManifest.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIManifest.cs index b659cdbcd0841..81ac8996caf7f 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIManifest.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OCIManifest.cs @@ -12,7 +12,7 @@ namespace Azure.Containers.ContainerRegistry.Specialized { /// Returns the requested OCI Manifest file. - public partial class OciManifest + public partial class OciManifest : Manifest { /// Initializes a new instance of OciManifest. public OciManifest() @@ -21,10 +21,11 @@ public OciManifest() } /// Initializes a new instance of OciManifest. + /// Schema version. /// V2 image config descriptor. /// List of V2 image layer information. /// Additional information provided through arbitrary metadata. - internal OciManifest(ArtifactBlobDescriptor config, IList layers, Annotations annotations) + internal OciManifest(int? schemaVersion, ArtifactBlobDescriptor config, IList layers, Annotations annotations) : base(schemaVersion) { Config = config; Layers = layers; diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OciManifest.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OciManifest.Serialization.cs index 2870b0a233fcd..7f09afffcd9cc 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OciManifest.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/OciManifest.Serialization.cs @@ -47,6 +47,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("annotations"); } } + if (Optional.IsDefined(SchemaVersion)) + { + writer.WritePropertyName("schemaVersion"); + writer.WriteNumberValue(SchemaVersion.Value); + } writer.WriteEndObject(); } @@ -55,6 +60,7 @@ internal static OciManifest DeserializeOciManifest(JsonElement element) Optional config = default; Optional> layers = default; Optional annotations = default; + Optional schemaVersion = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("config")) @@ -92,8 +98,18 @@ internal static OciManifest DeserializeOciManifest(JsonElement element) annotations = ContainerRegistry.Annotations.DeserializeAnnotations(property.Value); continue; } + if (property.NameEquals("schemaVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + schemaVersion = property.Value.GetInt32(); + continue; + } } - return new OciManifest(config.Value, Optional.ToList(layers), annotations.Value); + return new OciManifest(Optional.ToNullable(schemaVersion), config.Value, Optional.ToList(layers), annotations.Value); } internal partial class OciManifestConverter : JsonConverter diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Platform.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Platform.Serialization.cs index af74e480ec56e..0ae90b90d457a 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Platform.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Platform.Serialization.cs @@ -11,16 +11,62 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class Platform + internal partial class Platform : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Architecture)) + { + writer.WritePropertyName("architecture"); + writer.WriteStringValue(Architecture); + } + if (Optional.IsDefined(Os)) + { + writer.WritePropertyName("os"); + writer.WriteStringValue(Os); + } + if (Optional.IsDefined(OsVersion)) + { + writer.WritePropertyName("os.version"); + writer.WriteStringValue(OsVersion); + } + if (Optional.IsCollectionDefined(OsFeatures)) + { + writer.WritePropertyName("os.features"); + writer.WriteStartArray(); + foreach (var item in OsFeatures) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Variant)) + { + writer.WritePropertyName("variant"); + writer.WriteStringValue(Variant); + } + if (Optional.IsCollectionDefined(Features)) + { + writer.WritePropertyName("features"); + writer.WriteStartArray(); + foreach (var item in Features) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + internal static Platform DeserializePlatform(JsonElement element) { Optional architecture = default; Optional os = default; Optional osVersion = default; - Optional> osFeatures = default; + Optional> osFeatures = default; Optional variant = default; - Optional> features = default; + Optional> features = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("architecture")) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Platform.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Platform.cs index 4aadf41587fae..cf78a2dcfe055 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Platform.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/Platform.cs @@ -14,7 +14,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class Platform { /// Initializes a new instance of Platform. - internal Platform() + public Platform() { OsFeatures = new ChangeTrackingList(); Features = new ChangeTrackingList(); @@ -27,7 +27,7 @@ internal Platform() /// The optional os.features field specifies an array of strings, each listing a required OS feature (for example on Windows win32k. /// The optional variant field specifies a variant of the CPU, for example armv6l to specify a particular CPU variant of the ARM CPU. /// The optional features field specifies an array of strings, each listing a required CPU feature (for example sse4 or aes. - internal Platform(string architecture, string os, string osVersion, IReadOnlyList osFeatures, string variant, IReadOnlyList features) + internal Platform(string architecture, string os, string osVersion, IList osFeatures, string variant, IList features) { Architecture = architecture; Os = os; @@ -38,16 +38,16 @@ internal Platform(string architecture, string os, string osVersion, IReadOnlyLis } /// Specifies the CPU architecture, for example amd64 or ppc64le. - public string Architecture { get; } + public string Architecture { get; set; } /// The os field specifies the operating system, for example linux or windows. - public string Os { get; } + public string Os { get; set; } /// The optional os.version field specifies the operating system version, for example 10.0.10586. - public string OsVersion { get; } + public string OsVersion { get; set; } /// The optional os.features field specifies an array of strings, each listing a required OS feature (for example on Windows win32k. - public IReadOnlyList OsFeatures { get; } + public IList OsFeatures { get; } /// The optional variant field specifies a variant of the CPU, for example armv6l to specify a particular CPU variant of the ARM CPU. - public string Variant { get; } + public string Variant { get; set; } /// The optional features field specifies an array of strings, each listing a required CPU feature (for example sse4 or aes. - public IReadOnlyList Features { get; } + public IList Features { get; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V1Manifest.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V1Manifest.Serialization.cs index e9b96055c1265..a9e353b6da196 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V1Manifest.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V1Manifest.Serialization.cs @@ -11,16 +11,72 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class V1Manifest + internal partial class V1Manifest : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Architecture)) + { + writer.WritePropertyName("architecture"); + writer.WriteStringValue(Architecture); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Tag)) + { + writer.WritePropertyName("tag"); + writer.WriteStringValue(Tag); + } + if (Optional.IsCollectionDefined(FsLayers)) + { + writer.WritePropertyName("fsLayers"); + writer.WriteStartArray(); + foreach (var item in FsLayers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(History)) + { + writer.WritePropertyName("history"); + writer.WriteStartArray(); + foreach (var item in History) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Signatures)) + { + writer.WritePropertyName("signatures"); + writer.WriteStartArray(); + foreach (var item in Signatures) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SchemaVersion)) + { + writer.WritePropertyName("schemaVersion"); + writer.WriteNumberValue(SchemaVersion.Value); + } + writer.WriteEndObject(); + } + internal static V1Manifest DeserializeV1Manifest(JsonElement element) { Optional architecture = default; Optional name = default; Optional tag = default; - Optional> fsLayers = default; - Optional> history = default; - Optional> signatures = default; + Optional> fsLayers = default; + Optional> history = default; + Optional> signatures = default; Optional schemaVersion = default; foreach (var property in element.EnumerateObject()) { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V1Manifest.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V1Manifest.cs index 2beee2df81997..1afa1f5205fd0 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V1Manifest.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V1Manifest.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using Azure.Containers.ContainerRegistry.Specialized; using Azure.Core; namespace Azure.Containers.ContainerRegistry @@ -14,7 +15,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class V1Manifest : Manifest { /// Initializes a new instance of V1Manifest. - internal V1Manifest() + public V1Manifest() { FsLayers = new ChangeTrackingList(); History = new ChangeTrackingList(); @@ -29,7 +30,7 @@ internal V1Manifest() /// List of layer information. /// Image history. /// Image signature. - internal V1Manifest(int? schemaVersion, string architecture, string name, string tag, IReadOnlyList fsLayers, IReadOnlyList history, IReadOnlyList signatures) : base(schemaVersion) + internal V1Manifest(int? schemaVersion, string architecture, string name, string tag, IList fsLayers, IList history, IList signatures) : base(schemaVersion) { Architecture = architecture; Name = name; @@ -40,16 +41,16 @@ internal V1Manifest(int? schemaVersion, string architecture, string name, string } /// CPU architecture. - public string Architecture { get; } + public string Architecture { get; set; } /// Image name. - public string Name { get; } + public string Name { get; set; } /// Image tag. - public string Tag { get; } + public string Tag { get; set; } /// List of layer information. - public IReadOnlyList FsLayers { get; } + public IList FsLayers { get; } /// Image history. - public IReadOnlyList History { get; } + public IList History { get; } /// Image signature. - public IReadOnlyList Signatures { get; } + public IList Signatures { get; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V2Manifest.Serialization.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V2Manifest.Serialization.cs index c14a65381a244..dc4dff48e060d 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V2Manifest.Serialization.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V2Manifest.Serialization.cs @@ -12,13 +12,44 @@ namespace Azure.Containers.ContainerRegistry { - internal partial class V2Manifest + internal partial class V2Manifest : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MediaType)) + { + writer.WritePropertyName("mediaType"); + writer.WriteStringValue(MediaType); + } + if (Optional.IsDefined(Config)) + { + writer.WritePropertyName("config"); + writer.WriteObjectValue(Config); + } + if (Optional.IsCollectionDefined(Layers)) + { + writer.WritePropertyName("layers"); + writer.WriteStartArray(); + foreach (var item in Layers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SchemaVersion)) + { + writer.WritePropertyName("schemaVersion"); + writer.WriteNumberValue(SchemaVersion.Value); + } + writer.WriteEndObject(); + } + internal static V2Manifest DeserializeV2Manifest(JsonElement element) { Optional mediaType = default; Optional config = default; - Optional> layers = default; + Optional> layers = default; Optional schemaVersion = default; foreach (var property in element.EnumerateObject()) { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V2Manifest.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V2Manifest.cs index f58bd991b0784..388fb2fea13de 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V2Manifest.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Models/V2Manifest.cs @@ -15,7 +15,7 @@ namespace Azure.Containers.ContainerRegistry internal partial class V2Manifest : Manifest { /// Initializes a new instance of V2Manifest. - internal V2Manifest() + public V2Manifest() { Layers = new ChangeTrackingList(); } @@ -25,7 +25,7 @@ internal V2Manifest() /// Media type for this Manifest. /// V2 image config descriptor. /// List of V2 image layer information. - internal V2Manifest(int? schemaVersion, string mediaType, ArtifactBlobDescriptor config, IReadOnlyList layers) : base(schemaVersion) + internal V2Manifest(int? schemaVersion, string mediaType, ArtifactBlobDescriptor config, IList layers) : base(schemaVersion) { MediaType = mediaType; Config = config; @@ -33,10 +33,10 @@ internal V2Manifest(int? schemaVersion, string mediaType, ArtifactBlobDescriptor } /// Media type for this Manifest. - public string MediaType { get; } + public string MediaType { get; set; } /// V2 image config descriptor. - public ArtifactBlobDescriptor Config { get; } + public ArtifactBlobDescriptor Config { get; set; } /// List of V2 image layer information. - public IReadOnlyList Layers { get; } + public IList Layers { get; } } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/GlobalSuppressions.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/GlobalSuppressions.cs index 576ffa48d84c3..97a609451711b 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/GlobalSuppressions.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/GlobalSuppressions.cs @@ -10,3 +10,5 @@ [assembly: SuppressMessage("Usage", "AZC0001:Use one of the following pre-approved namespace groups (https://azure.github.io/azure-sdk/registered_namespaces.html): Azure.AI, Azure.Analytics, Azure.Communication, Azure.Data, Azure.DigitalTwins, Azure.Iot, Azure.Learn, Azure.Media, Azure.Management, Azure.Messaging, Azure.Search, Azure.Security, Azure.Storage, Azure.Template, Azure.Identity, Microsoft.Extensions.Azure", Justification = "", Scope = "namespace", Target = "~N:Azure.Containers.ContainerRegistry")] [assembly: SuppressMessage("Usage", "AZC0001:Use one of the following pre-approved namespace groups (https://azure.github.io/azure-sdk/registered_namespaces.html): Azure.AI, Azure.Analytics, Azure.Communication, Azure.Data, Azure.DigitalTwins, Azure.Iot, Azure.Learn, Azure.Media, Azure.Management, Azure.Messaging, Azure.Search, Azure.Security, Azure.Storage, Azure.Template, Azure.Identity, Microsoft.Extensions.Azure", Justification = "", Scope = "namespace", Target = "~N:Azure.Containers.ContainerRegistry.Specialized")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Containers.ContainerRegistry.Annotations")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Containers.ContainerRegistry.Specialized.Manifest")] diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md index dda96766897e7..4846436c10ed4 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md @@ -34,16 +34,16 @@ directive: ``` # Treat manifest as stream -``` yaml -directive: - from: swagger-document - where: $.parameters.ManifestBody - transform: > - $.schema = { - "type": "string", - "format": "binary" - } -``` +#``` yaml +#directive: +# from: swagger-document +# where: $.parameters.ManifestBody +# transform: > +# $.schema = { +# "type": "string", +# "format": "binary" +# } +#``` # Change NextLink client name to nextLink ``` yaml @@ -63,7 +63,7 @@ directive: $["x-csharp-usage"] = "model,input,output,converter"; $["x-csharp-formats"] = "json"; delete $["x-accessibility"]; - delete $["allOf"]; +# delete $["allOf"]; ``` # Make ArtifactBlobDescriptor a public type @@ -74,3 +74,12 @@ directive: transform: > delete $["x-accessibility"] ``` + +# Make ArtifactBlobDescriptor a public type +``` yaml +directive: + from: swagger-document + where: $.definitions.Annotations + transform: > + delete $["x-accessibility"] +``` diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryBlobClientLiveTests.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryBlobClientLiveTests.cs index fbd80894c1548..576a35d1e52c3 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryBlobClientLiveTests.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryBlobClientLiveTests.cs @@ -4,6 +4,7 @@ using System; using System.IO; using System.Linq; +using System.Text.Json; using System.Threading.Tasks; using Azure.Containers.ContainerRegistry.Specialized; using Azure.Core.TestFramework; @@ -13,7 +14,7 @@ namespace Azure.Containers.ContainerRegistry.Tests { public class ContainerRegistryBlobClientLiveTests : ContainerRegistryRecordedTestBase { - public ContainerRegistryBlobClientLiveTests(bool isAsync) : base(isAsync, RecordedTestMode.Live) + public ContainerRegistryBlobClientLiveTests(bool isAsync) : base(isAsync, RecordedTestMode.Record) { } @@ -23,7 +24,7 @@ public async Task CanUploadArtifact() // Arrange var client = CreateBlobClient("oci-artifact"); var layer = "654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed"; - var manifest = "manifest.json"; + //var manifest = "manifest.json"; var config = "config.json"; var basePath = Path.Combine(TestContext.CurrentContext.TestDirectory, "Data\\oci-artifact"); @@ -39,11 +40,11 @@ public async Task CanUploadArtifact() var uploadResult = await client.UploadBlobAsync(fs); } - // Upload manifest - using (var fs = File.OpenRead(Path.Combine(basePath, manifest))) - { - var uploadResult = await client.UploadManifestAsync(fs); - } + //// Upload manifest + //using (var fs = File.OpenRead(Path.Combine(basePath, manifest))) + //{ + // var uploadResult = await client.UploadManifestAsync(fs); + //} } [RecordedTest, NonParallelizable] @@ -52,21 +53,37 @@ public async Task CanUploadOciManifest() // Arrange var client = CreateBlobClient("oci-artifact"); + var manifestPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData\\oci-artifact", "manifest.json"); + + OciManifest manifest = default; + // Act - OciManifest manifest = new OciManifest() - { - Config = new ArtifactBlobDescriptor() - { - MediaType = "application/vnd.acme.rocket.config", - Digest = "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" - } - }; - manifest.Layers.Add(new ArtifactBlobDescriptor() + using (var fs = File.OpenRead(manifestPath)) { - MediaType = "application/vnd.oci.image.layer.v1.tar", - Digest = "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", - Size = 28 - }); + using var document = JsonDocument.Parse(fs); + manifest = OciManifest.DeserializeOciManifest(document.RootElement); + + //var uploadResult = await client.UploadManifestAsync(fs); + //digest = uploadResult.Value.Digest; + } + + // Act + //OciManifest manifest = new OciManifest() + //{ + // Config = new ArtifactBlobDescriptor() + // { + // MediaType = "application/vnd.acme.rocket.config", + // Digest = "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + // } + //}; + //manifest.Layers.Add(new ArtifactBlobDescriptor() + //{ + // MediaType = "application/vnd.oci.image.layer.v1.tar", + // Digest = "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + // Size = 28 + //}); + + //OciManifest manifest = JsonSerializer.Serialize var uploadResult = await client.UploadManifestAsync(manifest); string digest = uploadResult.Value.Digest; @@ -91,8 +108,8 @@ public async Task CanUploadOciManifestStream() // Act using (var fs = File.OpenRead(manifest)) { - var uploadResult = await client.UploadManifestAsync(fs); - digest = uploadResult.Value.Digest; + //var uploadResult = await client.UploadManifestAsync(fs); + //digest = uploadResult.Value.Digest; } // Assert @@ -118,11 +135,11 @@ public async Task CanUploadOciManifestStreamWithTag() // Act using (var fs = File.OpenRead(manifest)) { - var uploadResult = await client.UploadManifestAsync(fs, new UploadManifestOptions() - { - Tag = tag - }); - digest = uploadResult.Value.Digest; + //var uploadResult = await client.UploadManifestAsync(fs, new UploadManifestOptions() + //{ + // Tag = tag + //}); + //digest = uploadResult.Value.Digest; } // Assert @@ -153,9 +170,9 @@ private static void ValidateManifest(OciManifest manifest) Assert.IsNotNull(manifest.Layers); Assert.AreEqual(1, manifest.Layers.Count); - Assert.AreEqual("application/vnd.oci.image.layer.v1.tar", manifest.Config.MediaType); - Assert.AreEqual("sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", manifest.Config.Digest); - Assert.AreEqual(28, manifest.Config.Size); + Assert.AreEqual("application/vnd.oci.image.layer.v1.tar", manifest.Layers[0].MediaType); + Assert.AreEqual("sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", manifest.Layers[0].Digest); + Assert.AreEqual(28, manifest.Layers[0].Size); } [RecordedTest, NonParallelizable] diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/SessionRecords/ContainerRegistryBlobClientLiveTests/CanUploadOciManifestAsync.json b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/SessionRecords/ContainerRegistryBlobClientLiveTests/CanUploadOciManifestAsync.json new file mode 100644 index 0000000000000..85540443a2824 --- /dev/null +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/SessionRecords/ContainerRegistryBlobClientLiveTests/CanUploadOciManifestAsync.json @@ -0,0 +1,406 @@ +{ + "Entries": [ + { + "RequestUri": "https://localtestacr01.azurecr.io/v2/oci-artifact/manifests/sha256%3Acc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "396", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "traceparent": "00-044bdfb754c1f846b6a47fb2b12eac40-9a3f6b2330b8644e-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "5200a32c1729f2d39096bd7a0b34c489", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "config": { + "mediaType": "application/vnd.acme.rocket.config", + "size": 171, + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "size": 28, + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ], + "schemaVersion": 2 + }, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 02 Sep 2021 12:48:12 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://localtestacr01.azurecr.io/oauth2/token\u0022,service=\u0022localtestacr01.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "9604b8cf-6e77-4756-ba41-e409a92b0c0b" + }, + "ResponseBody": [ + "{\u0022errors\u0022:[{\u0022code\u0022:\u0022UNAUTHORIZED\u0022,\u0022message\u0022:\u0022authentication required, visit https://aka.ms/acr/authorization for more information.\u0022,\u0022detail\u0022:[{\u0022Type\u0022:\u0022repository\u0022,\u0022Name\u0022:\u0022oci-artifact\u0022,\u0022Action\u0022:\u0022pull\u0022},{\u0022Type\u0022:\u0022repository\u0022,\u0022Name\u0022:\u0022oci-artifact\u0022,\u0022Action\u0022:\u0022push\u0022}]}]}\n" + ] + }, + { + "RequestUri": "https://localtestacr01.azurecr.io/oauth2/exchange", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "80", + "Content-Type": "application/x-www-form-urlencoded", + "traceparent": "00-044bdfb754c1f846b6a47fb2b12eac40-94f490473bf92d4c-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "e019f371ba09e2dd26a9b9affd8cddc0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": "grant_type=access_token\u0026service=localtestacr01.azurecr.io\u0026access_token=Sanitized", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 02 Sep 2021 12:48:14 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "4cd9a678-adab-4463-a710-546421d2e871", + "x-ms-ratelimit-remaining-calls-per-second": "166.65" + }, + "ResponseBody": { + "refresh_token": "Sanitized.eyJleHAiOjI1NzY2NjY4OTB9.Sanitized" + } + }, + { + "RequestUri": "https://localtestacr01.azurecr.io/oauth2/token", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "128", + "Content-Type": "application/x-www-form-urlencoded", + "traceparent": "00-044bdfb754c1f846b6a47fb2b12eac40-48ef5af28e059642-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "fa65bb4a796c3a88222d14b24c46f022", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": "service=localtestacr01.azurecr.io\u0026scope=repository%3aoci-artifact%3apull%2cpush\u0026refresh_token=Sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 02 Sep 2021 12:48:14 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "7ec3ff2e-d1cf-44dd-b342-2ef03bf7a554", + "x-ms-ratelimit-remaining-calls-per-second": "166.633333" + }, + "ResponseBody": { + "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkVERFE6SFVYWDpMQzQ3OlpCUk06T0k0WTpPUjY2OkFVWko6Qlk3RTo3N0pWOjU0UlI6UU1BSzpOTDI1In0.eyJqdGkiOiI5YWJmMWJiMC1kOTg1LTQzNmUtODFmYS02NGQ0NTA5ZThjNWUiLCJzdWIiOiIxZjc5ZjlkMC1lZWI0LTQxNDQtOGI3YS05MDNlYjNjNWU4MjQiLCJuYmYiOjE2MzA1ODU5OTQsImV4cCI6MTYzMDU5MDQ5NCwiaWF0IjoxNjMwNTg1OTk0LCJpc3MiOiJBenVyZSBDb250YWluZXIgUmVnaXN0cnkiLCJhdWQiOiJsb2NhbHRlc3RhY3IwMS5henVyZWNyLmlvIiwidmVyc2lvbiI6IjEuMCIsInJpZCI6IjEzYmI2YWY1OTYwYzRiMjdhNWNkMjQ0OGZlMDczMjM5IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJBY3Rpb25zIjpbInB1bGwiLCJwdXNoIl19XSwicm9sZXMiOltdLCJncmFudF90eXBlIjoiYWNjZXNzX3Rva2VuIiwiYXBwaWQiOiIwMmQ4ZWNhZS00YjllLTQ1ZTQtODE4MC1hOTA5YzVlOWE2YTMifQ.giFNHQIh86GeiOjwivUKngWbol3FSds6sEbv1KBx7ekSXUb4MddbOlUvle8nSZDCG7xfCKImsmF_8OKbc_4JvqpUeQQvEytm4Sj_Xnt-7epFM6z3rqxiHIw83ME6snnoDzc5fgSw2timue69cl4FgnpdKpF0AFiyAIfI2HRMkqEthsD9ECxfgrWS59eS-Hwquh5lZIYmQn83jyMX692K6fwk_8aLSXXcnsKfCEFFhEwi5pEsgq7GoFxjYMIo6jpKElEGI3zFwXdFB6AT5xQQfOimyswIdVtB8jQYP6rmg_ZQLYN8S4-K9PjidF4COr4Abetzqse7st1UBPp9C73_tw" + } + }, + { + "RequestUri": "https://localtestacr01.azurecr.io/v2/oci-artifact/manifests/sha256%3Acc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "396", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "traceparent": "00-044bdfb754c1f846b6a47fb2b12eac40-9a3f6b2330b8644e-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "5200a32c1729f2d39096bd7a0b34c489", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "config": { + "mediaType": "application/vnd.acme.rocket.config", + "size": 171, + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "size": 28, + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ], + "schemaVersion": 2 + }, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Thu, 02 Sep 2021 12:48:15 GMT", + "Docker-Content-Digest": "sha256:cc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/manifests/sha256:cc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "5200a32c1729f2d39096bd7a0b34c489", + "X-Ms-Correlation-Request-Id": "435c5435-e283-4de9-82a9-c171476d3ba6", + "X-Ms-Request-Id": "c5f65007-de6a-4889-9dea-af0f13bc4e6f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://localtestacr01.azurecr.io/v2/oci-artifact/manifests/sha256%3Acc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb", + "RequestMethod": "GET", + "RequestHeaders": { + "accept": [ + "application/vnd.oci.image.manifest.v1\u002Bjson", + "application/json" + ], + "traceparent": "00-0e70c7bbcdaed34b8838a9d63c10b3f7-565c923d263d2d4e-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "8784f95867ea71f6c51d2b7f5d23f503", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "206", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 02 Sep 2021 12:48:15 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://localtestacr01.azurecr.io/oauth2/token\u0022,service=\u0022localtestacr01.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "f2535ef4-d218-4c55-8e62-742d08372496" + }, + "ResponseBody": [ + "{\u0022errors\u0022:[{\u0022code\u0022:\u0022UNAUTHORIZED\u0022,\u0022message\u0022:\u0022authentication required, visit https://aka.ms/acr/authorization for more information.\u0022,\u0022detail\u0022:[{\u0022Type\u0022:\u0022repository\u0022,\u0022Name\u0022:\u0022oci-artifact\u0022,\u0022Action\u0022:\u0022pull\u0022}]}]}\n" + ] + }, + { + "RequestUri": "https://localtestacr01.azurecr.io/oauth2/token", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "121", + "Content-Type": "application/x-www-form-urlencoded", + "traceparent": "00-0e70c7bbcdaed34b8838a9d63c10b3f7-d7790cb97670f140-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "502ffdb8cacef81c6bdebedba62a96df", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": "service=localtestacr01.azurecr.io\u0026scope=repository%3aoci-artifact%3apull\u0026refresh_token=Sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 02 Sep 2021 12:48:15 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "6b19b5c0-292f-42de-a3aa-7198e7df9aa8", + "x-ms-ratelimit-remaining-calls-per-second": "166.616667" + }, + "ResponseBody": { + "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkVERFE6SFVYWDpMQzQ3OlpCUk06T0k0WTpPUjY2OkFVWko6Qlk3RTo3N0pWOjU0UlI6UU1BSzpOTDI1In0.eyJqdGkiOiI3ZGE4MjljNy1hNmJkLTRiMGEtOTJiOS1mNjRlMjEzZjdkYTQiLCJzdWIiOiIxZjc5ZjlkMC1lZWI0LTQxNDQtOGI3YS05MDNlYjNjNWU4MjQiLCJuYmYiOjE2MzA1ODU5OTUsImV4cCI6MTYzMDU5MDQ5NSwiaWF0IjoxNjMwNTg1OTk1LCJpc3MiOiJBenVyZSBDb250YWluZXIgUmVnaXN0cnkiLCJhdWQiOiJsb2NhbHRlc3RhY3IwMS5henVyZWNyLmlvIiwidmVyc2lvbiI6IjEuMCIsInJpZCI6IjEzYmI2YWY1OTYwYzRiMjdhNWNkMjQ0OGZlMDczMjM5IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJBY3Rpb25zIjpbInB1bGwiXX1dLCJyb2xlcyI6W10sImdyYW50X3R5cGUiOiJhY2Nlc3NfdG9rZW4iLCJhcHBpZCI6IjAyZDhlY2FlLTRiOWUtNDVlNC04MTgwLWE5MDljNWU5YTZhMyJ9.HOmKs0pt5sDC_BhEsoCl3-0ygoSD4V8DEr8flJqYS4DgbYop_mAc5cvjts5mC0o3eS4VaTGcHVUA3lFFRUzPkoih7Xq2X0szmYTBVS0Tt-o28AsKWTWypuVIjVYzkJ2i9SccSq4Jp9Wc2RvA0n-bhuM3vBRKRgSJHhXF6zsdaLmNRiMpa-zr5MXjfQj3dLWw01Qyz4ATm8NGEVPEedh9AbMB4eJqyYVs4dnDCO78_NHZcYAFsRks5j6ZfB-S_oaLAyCklOcHKjHDVMRvWyFFFC-ARwoqgCEiWNztuF7_gl5l8E2mWrOE3M-LzYt349lUqFQvo_T-yn0HO_kgAGaoHA" + } + }, + { + "RequestUri": "https://localtestacr01.azurecr.io/v2/oci-artifact/manifests/sha256%3Acc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb", + "RequestMethod": "GET", + "RequestHeaders": { + "accept": [ + "application/vnd.oci.image.manifest.v1\u002Bjson", + "application/json" + ], + "Authorization": "Sanitized", + "traceparent": "00-0e70c7bbcdaed34b8838a9d63c10b3f7-565c923d263d2d4e-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "8784f95867ea71f6c51d2b7f5d23f503", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "396", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Date": "Thu, 02 Sep 2021 12:48:15 GMT", + "Docker-Content-Digest": "sha256:cc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb", + "Docker-Distribution-Api-Version": "registry/2.0", + "ETag": "\u0022sha256:cc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb\u0022", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "8784f95867ea71f6c51d2b7f5d23f503", + "X-Ms-Correlation-Request-Id": "d6e2039b-8471-488a-b018-809115d256c0", + "X-Ms-Request-Id": "8b56c4f2-cae9-4207-b38f-a227bbd21d1f" + }, + "ResponseBody": { + "config": { + "mediaType": "application/vnd.acme.rocket.config", + "size": 171, + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "size": 28, + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ], + "schemaVersion": 2 + } + }, + { + "RequestUri": "https://localtestacr01.azurecr.io/v2/oci-artifact/manifests/sha256%3Acc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "traceparent": "00-6402361ec1fff54dbf073f41e841dd7c-cfced93a0887bc4a-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "045797b85608e3d5c4f3344e4e08dcfe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "208", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 02 Sep 2021 12:48:15 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://localtestacr01.azurecr.io/oauth2/token\u0022,service=\u0022localtestacr01.azurecr.io\u0022,scope=\u0022repository:oci-artifact:delete\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "01bba50d-fc20-4fe7-a563-344c0fd3c32d" + }, + "ResponseBody": [ + "{\u0022errors\u0022:[{\u0022code\u0022:\u0022UNAUTHORIZED\u0022,\u0022message\u0022:\u0022authentication required, visit https://aka.ms/acr/authorization for more information.\u0022,\u0022detail\u0022:[{\u0022Type\u0022:\u0022repository\u0022,\u0022Name\u0022:\u0022oci-artifact\u0022,\u0022Action\u0022:\u0022delete\u0022}]}]}\n" + ] + }, + { + "RequestUri": "https://localtestacr01.azurecr.io/oauth2/token", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "123", + "Content-Type": "application/x-www-form-urlencoded", + "traceparent": "00-6402361ec1fff54dbf073f41e841dd7c-37332860d98a294f-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "4ff91038a0178e54dc8b1b0ca91acb9b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": "service=localtestacr01.azurecr.io\u0026scope=repository%3aoci-artifact%3adelete\u0026refresh_token=Sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 02 Sep 2021 12:48:16 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "169a34cb-5018-4c80-bd9b-c202a1d0566a", + "x-ms-ratelimit-remaining-calls-per-second": "166.6" + }, + "ResponseBody": { + "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkVERFE6SFVYWDpMQzQ3OlpCUk06T0k0WTpPUjY2OkFVWko6Qlk3RTo3N0pWOjU0UlI6UU1BSzpOTDI1In0.eyJqdGkiOiI5ZTVmNDIwOC1lMjdkLTQzODAtYWI2NS1mMzBkN2Q1OTI4NWIiLCJzdWIiOiIxZjc5ZjlkMC1lZWI0LTQxNDQtOGI3YS05MDNlYjNjNWU4MjQiLCJuYmYiOjE2MzA1ODU5OTYsImV4cCI6MTYzMDU5MDQ5NiwiaWF0IjoxNjMwNTg1OTk2LCJpc3MiOiJBenVyZSBDb250YWluZXIgUmVnaXN0cnkiLCJhdWQiOiJsb2NhbHRlc3RhY3IwMS5henVyZWNyLmlvIiwidmVyc2lvbiI6IjEuMCIsInJpZCI6IjEzYmI2YWY1OTYwYzRiMjdhNWNkMjQ0OGZlMDczMjM5IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJBY3Rpb25zIjpbImRlbGV0ZSJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiIsImFwcGlkIjoiMDJkOGVjYWUtNGI5ZS00NWU0LTgxODAtYTkwOWM1ZTlhNmEzIn0.rMZxRUOb7n24XaOJdH63TWZqFFV7IUwt8kenDSVu0Pra-INNMUQwbbxnatGRs2wSZnii0oIQWqqZugEFCJI0dTFMixWEZ93bxW4WiXwg3oUppihvCpo4IRzVk7MaFD2hqSFQzIBKa7KCgKyxf71IJHacB7r_EufZa1WfvgY8edCetk5x_msWAxz0BioGUQH4W8cLcpq6jsEA3zgF_LGRAK04yuOo5c61EVtuZglRUWeuRMzBVfndmUMoZuxFGnV2pWXQcaDF8AHbN08U9fso1OEsrLo057eiBITr2a29mv7pB30m3L4kOqEVPtSys1xIuRDHebjVn-OINpKdvmVHqQ" + } + }, + { + "RequestUri": "https://localtestacr01.azurecr.io/v2/oci-artifact/manifests/sha256%3Acc83469b6d825c2f09e5c6a6819ff17b3a03d6895e3bd749bdf9020f7bd163bb", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-6402361ec1fff54dbf073f41e841dd7c-cfced93a0887bc4a-00", + "User-Agent": "azsdk-net-Containers.ContainerRegistry/1.0.0-alpha.20210902.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "045797b85608e3d5c4f3344e4e08dcfe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Thu, 02 Sep 2021 12:48:16 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "045797b85608e3d5c4f3344e4e08dcfe", + "X-Ms-Correlation-Request-Id": "a7a49134-03ee-4d28-9cba-039dd8c6474b", + "X-Ms-Ratelimit-Remaining-Calls-Per-Second": "8.000000", + "X-Ms-Request-Id": "9fa42dae-68b2-4b1c-8438-b2cdcfaeebc8" + }, + "ResponseBody": [] + } + ], + "Variables": { + "CONTAINERREGISTRY_ENDPOINT": "https://localtestacr01.azurecr.io", + "RandomSeed": "1526718236" + } +} \ No newline at end of file