diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/README.md b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/README.md index 5659508fa6e99..e07cc3d8bed80 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/README.md +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/README.md @@ -1,13 +1,13 @@ # Microsoft Azure TrustedSigning management client library for .NET -# Trusted Signing (formerly Azure Code Signing) is a Microsoft fully managed end-to-end signing solution that simplifies the process and empowers 3rd party developers to easily build and distribute applications. -# This is part of Microsoft’s commitment to an open, inclusive, and secure ecosystem. -# Simplifies the signing process with an intuitive experience in Azure -# Zero-touch certificate lifecycle management that is FIPS 140-2 Level 3 compliant. -# Integrations into leading developer toolsets. -# Supports Public Trust, Test, Private Trust, and CI policy signing scenarios. -# Timestamping service. -# Content confidential signing – meaning digest signing that is fast and reliable – your file never leaves your endpoint. +Trusted Signing (formerly Azure Code Signing) is a Microsoft fully managed end-to-end signing solution that simplifies the process and empowers 3rd party developers to easily build and distribute applications. +Microsoft Trusted Signing features: + - Simplifies the signing process with an intuitive experience in Azure. + - Zero-touch certificate lifecycle management that is FIPS 140-2 Level 3 compliant. + - Integrations into leading developer toolsets. + - Supports Public Trust, Test, Private Trust, and CI policy signing scenarios. + - Timestamping service. + - Content confidential signing - meaning digest signing that is fast and reliable - your file never leaves your endpoint. This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/api/Azure.ResourceManager.TrustedSigning.netstandard2.0.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/api/Azure.ResourceManager.TrustedSigning.netstandard2.0.cs index 8c88edae67d12..26c00563fb8dc 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/api/Azure.ResourceManager.TrustedSigning.netstandard2.0.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/api/Azure.ResourceManager.TrustedSigning.netstandard2.0.cs @@ -29,7 +29,7 @@ public TrustedSigningAccountData(Azure.Core.AzureLocation location) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class TrustedSigningAccountResource : Azure.ResourceManager.ArmResource + public partial class TrustedSigningAccountResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; protected TrustedSigningAccountResource() { } @@ -49,6 +49,11 @@ protected TrustedSigningAccountResource() { } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.TrustedSigning.TrustedSigningAccountData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.TrustedSigning.TrustedSigningAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.TrustedSigning.Models.TrustedSigningAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.TrustedSigning.Models.TrustedSigningAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -97,7 +102,7 @@ public TrustedSigningCertificateProfileData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class TrustedSigningCertificateProfileResource : Azure.ResourceManager.ArmResource + public partial class TrustedSigningCertificateProfileResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; protected TrustedSigningCertificateProfileResource() { } @@ -110,6 +115,11 @@ protected TrustedSigningCertificateProfileResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RevokeCertificate(Azure.ResourceManager.TrustedSigning.Models.RevokeCertificateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RevokeCertificateAsync(Azure.ResourceManager.TrustedSigning.Models.RevokeCertificateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.TrustedSigning.TrustedSigningCertificateProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.TrustedSigning.TrustedSigningCertificateProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.TrustedSigning.TrustedSigningCertificateProfileData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.TrustedSigning.TrustedSigningCertificateProfileData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -235,8 +245,9 @@ public RevokeCertificateContent(string serialNumber, string thumbprint, System.D } public partial class TrustedSigningAccountNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public TrustedSigningAccountNameAvailabilityContent(string name) { } + public TrustedSigningAccountNameAvailabilityContent(string name, Azure.Core.ResourceType resourceType) { } public string Name { get { throw null; } } + public Azure.Core.ResourceType ResourceType { get { throw null; } } Azure.ResourceManager.TrustedSigning.Models.TrustedSigningAccountNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.TrustedSigning.Models.TrustedSigningAccountNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/samples/Azure.ResourceManager.TrustedSigning.Samples.csproj b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/samples/Azure.ResourceManager.TrustedSigning.Samples.csproj index ea6a6694b88a2..dc76f12ad63dc 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/samples/Azure.ResourceManager.TrustedSigning.Samples.csproj +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/samples/Azure.ResourceManager.TrustedSigning.Samples.csproj @@ -1,6 +1,6 @@  - + diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Internal/ModelSerializationExtensions.cs index bb5af249757f8..d472ccc888367 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Internal/ModelSerializationExtensions.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Internal/ModelSerializationExtensions.cs @@ -18,6 +18,8 @@ namespace Azure.ResourceManager.TrustedSigning { internal static class ModelSerializationExtensions { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + public static object GetObject(this JsonElement element) { switch (element.ValueKind) @@ -173,7 +175,7 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, T value, Mode writer.WriteNullValue(); break; case IJsonModel jsonModel: - jsonModel.Write(writer, options ?? new ModelReaderWriterOptions("W")); + jsonModel.Write(writer, options ?? WireOptions); break; case IUtf8JsonSerializable serializable: serializable.Write(writer); diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/LongRunningOperation/TrustedSigningArmOperation.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/LongRunningOperation/TrustedSigningArmOperation.cs index 6c8ace6808166..07b733cafeaf1 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/LongRunningOperation/TrustedSigningArmOperation.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/LongRunningOperation/TrustedSigningArmOperation.cs @@ -6,6 +6,8 @@ #nullable disable using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -18,28 +20,52 @@ internal class TrustedSigningArmOperation : ArmOperation #pragma warning restore SA1649 // File name should match first type name { private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; /// Initializes a new instance of TrustedSigningArmOperation for mocking. protected TrustedSigningArmOperation() { } - internal TrustedSigningArmOperation(Response response) + internal TrustedSigningArmOperation(Response response, RehydrationToken? rehydrationToken = null) { _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); } internal TrustedSigningArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "TrustedSigningArmOperation", fallbackStrategy: new SequentialDelayStrategy()); } + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + /// -#pragma warning disable CA1822 - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public override string Id => throw new NotImplementedException(); -#pragma warning restore CA1822 + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; /// public override bool HasCompleted => _operation.HasCompleted; diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/LongRunningOperation/TrustedSigningArmOperationOfT.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/LongRunningOperation/TrustedSigningArmOperationOfT.cs index 2f18e89f229da..6a68d6be6c16e 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/LongRunningOperation/TrustedSigningArmOperationOfT.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/LongRunningOperation/TrustedSigningArmOperationOfT.cs @@ -6,6 +6,8 @@ #nullable disable using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -18,28 +20,52 @@ internal class TrustedSigningArmOperation : ArmOperation #pragma warning restore SA1649 // File name should match first type name { private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; /// Initializes a new instance of TrustedSigningArmOperation for mocking. protected TrustedSigningArmOperation() { } - internal TrustedSigningArmOperation(Response response) + internal TrustedSigningArmOperation(Response response, RehydrationToken? rehydrationToken = null) { _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); } internal TrustedSigningArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { - var nextLinkOperation = NextLinkOperationImplementation.Create(source, pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "TrustedSigningArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "TrustedSigningArmOperation", fallbackStrategy: new SequentialDelayStrategy()); } + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + /// -#pragma warning disable CA1822 - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public override string Id => throw new NotImplementedException(); -#pragma warning restore CA1822 + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; /// public override T Value => _operation.Value; diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/CertificateProfileListResult.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/CertificateProfileListResult.Serialization.cs index ac98a583e3b12..2d1ba460bfdfd 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/CertificateProfileListResult.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/CertificateProfileListResult.Serialization.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.TrustedSigning.Models { internal partial class CertificateProfileListResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -70,7 +70,7 @@ CertificateProfileListResult IJsonModel.Create(ref internal static CertificateProfileListResult DeserializeCertificateProfileListResult(JsonElement element, ModelReaderWriterOptions options = null) { - options ??= new ModelReaderWriterOptions("W"); + options ??= ModelSerializationExtensions.WireOptions; if (element.ValueKind == JsonValueKind.Null) { diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/CodeSigningAccountListResult.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/CodeSigningAccountListResult.Serialization.cs index 819bd65c7fc1d..8d2fc483cbe78 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/CodeSigningAccountListResult.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/CodeSigningAccountListResult.Serialization.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.TrustedSigning.Models { internal partial class CodeSigningAccountListResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -70,7 +70,7 @@ CodeSigningAccountListResult IJsonModel.Create(ref internal static CodeSigningAccountListResult DeserializeCodeSigningAccountListResult(JsonElement element, ModelReaderWriterOptions options = null) { - options ??= new ModelReaderWriterOptions("W"); + options ??= ModelSerializationExtensions.WireOptions; if (element.ValueKind == JsonValueKind.Null) { diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/RevokeCertificateContent.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/RevokeCertificateContent.Serialization.cs index c7ba972615c43..1d7125da552b8 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/RevokeCertificateContent.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/RevokeCertificateContent.Serialization.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.TrustedSigning.Models { public partial class RevokeCertificateContent : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -71,7 +71,7 @@ RevokeCertificateContent IJsonModel.Create(ref Utf8Jso internal static RevokeCertificateContent DeserializeRevokeCertificateContent(JsonElement element, ModelReaderWriterOptions options = null) { - options ??= new ModelReaderWriterOptions("W"); + options ??= ModelSerializationExtensions.WireOptions; if (element.ValueKind == JsonValueKind.Null) { diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountNameAvailabilityContent.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountNameAvailabilityContent.Serialization.cs index b0d509303132d..36548b1eb3575 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountNameAvailabilityContent.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountNameAvailabilityContent.Serialization.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.TrustedSigning.Models { public partial class TrustedSigningAccountNameAvailabilityContent : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -62,7 +62,7 @@ TrustedSigningAccountNameAvailabilityContent IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -73,7 +73,7 @@ TrustedSigningAccountNameAvailabilityResult IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -77,7 +77,7 @@ TrustedSigningAccountPatch IJsonModel.Create(ref Utf internal static TrustedSigningAccountPatch DeserializeTrustedSigningAccountPatch(JsonElement element, ModelReaderWriterOptions options = null) { - options ??= new ModelReaderWriterOptions("W"); + options ??= ModelSerializationExtensions.WireOptions; if (element.ValueKind == JsonValueKind.Null) { diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountSku.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountSku.Serialization.cs index f266f134d60c7..57b8872338cea 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountSku.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountSku.Serialization.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.TrustedSigning.Models { internal partial class TrustedSigningAccountSku : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -60,7 +60,7 @@ TrustedSigningAccountSku IJsonModel.Create(ref Utf8Jso internal static TrustedSigningAccountSku DeserializeTrustedSigningAccountSku(JsonElement element, ModelReaderWriterOptions options = null) { - options ??= new ModelReaderWriterOptions("W"); + options ??= ModelSerializationExtensions.WireOptions; if (element.ValueKind == JsonValueKind.Null) { diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningCertificate.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningCertificate.Serialization.cs index 84c56f6b5c091..9b2ce76f9d3ff 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningCertificate.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningCertificate.Serialization.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.TrustedSigning.Models { public partial class TrustedSigningCertificate : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -121,7 +121,7 @@ TrustedSigningCertificate IJsonModel.Create(ref Utf8J internal static TrustedSigningCertificate DeserializeTrustedSigningCertificate(JsonElement element, ModelReaderWriterOptions options = null) { - options ??= new ModelReaderWriterOptions("W"); + options ??= ModelSerializationExtensions.WireOptions; if (element.ValueKind == JsonValueKind.Null) { diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/RestOperations/CertificateProfilesRestOperations.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/RestOperations/CertificateProfilesRestOperations.cs index 5707061c940bc..f96718e0b9492 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/RestOperations/CertificateProfilesRestOperations.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/RestOperations/CertificateProfilesRestOperations.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.ClientModel.Primitives; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -37,6 +36,21 @@ public CertificateProfilesRestOperations(HttpPipeline pipeline, string applicati _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateListByCodeSigningAccountRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/certificateProfiles", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateListByCodeSigningAccountRequest(string subscriptionId, string resourceGroupName, string accountName) { var message = _pipeline.CreateMessage(); @@ -116,6 +130,22 @@ public Response ListByCodeSigningAccount(string su } } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string profileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/certificateProfiles/", false); + uri.AppendPath(profileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string profileName) { var message = _pipeline.CreateMessage(); @@ -204,6 +234,22 @@ public Response Get(string subscriptionId, } } + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string profileName, TrustedSigningCertificateProfileData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/certificateProfiles/", false); + uri.AppendPath(profileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string accountName, string profileName, TrustedSigningCertificateProfileData data) { var message = _pipeline.CreateMessage(); @@ -224,7 +270,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, new ModelReaderWriterOptions("W")); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -288,6 +334,22 @@ public Response Create(string subscriptionId, string resourceGroupName, string a } } + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string profileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/certificateProfiles/", false); + uri.AppendPath(profileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string profileName) { var message = _pipeline.CreateMessage(); @@ -364,6 +426,23 @@ public Response Delete(string subscriptionId, string resourceGroupName, string a } } + internal RequestUriBuilder CreateRevokeCertificateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string profileName, RevokeCertificateContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/certificateProfiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/revokeCertificate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateRevokeCertificateRequest(string subscriptionId, string resourceGroupName, string accountName, string profileName, RevokeCertificateContent content) { var message = _pipeline.CreateMessage(); @@ -385,7 +464,7 @@ internal HttpMessage CreateRevokeCertificateRequest(string subscriptionId, strin request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, new ModelReaderWriterOptions("W")); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); request.Content = content0; _userAgent.Apply(message); return message; @@ -447,6 +526,14 @@ public Response RevokeCertificate(string subscriptionId, string resourceGroupNam } } + internal RequestUriBuilder CreateListByCodeSigningAccountNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + internal HttpMessage CreateListByCodeSigningAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/RestOperations/CodeSigningAccountsRestOperations.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/RestOperations/CodeSigningAccountsRestOperations.cs index 893f7f4417705..35d161e96b90b 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/RestOperations/CodeSigningAccountsRestOperations.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/RestOperations/CodeSigningAccountsRestOperations.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.ClientModel.Primitives; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -37,6 +36,17 @@ public CodeSigningAccountsRestOperations(HttpPipeline pipeline, string applicati _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateCheckNameAvailabilityRequestUri(string subscriptionId, TrustedSigningAccountNameAvailabilityContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, TrustedSigningAccountNameAvailabilityContent content) { var message = _pipeline.CreateMessage(); @@ -52,7 +62,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, T request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, new ModelReaderWriterOptions("W")); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); request.Content = content0; _userAgent.Apply(message); return message; @@ -112,6 +122,17 @@ public Response CheckNameAvailabili } } + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) { var message = _pipeline.CreateMessage(); @@ -179,6 +200,19 @@ public Response ListBySubscription(string subscrip } } + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); @@ -252,6 +286,20 @@ public Response ListByResourceGroup(string subscri } } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName) { var message = _pipeline.CreateMessage(); @@ -334,6 +382,20 @@ public Response Get(string subscriptionId, string res } } + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string accountName, TrustedSigningAccountData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string accountName, TrustedSigningAccountData data) { var message = _pipeline.CreateMessage(); @@ -352,7 +414,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, new ModelReaderWriterOptions("W")); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -412,6 +474,20 @@ public Response Create(string subscriptionId, string resourceGroupName, string a } } + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, TrustedSigningAccountPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, TrustedSigningAccountPatch patch) { var message = _pipeline.CreateMessage(); @@ -430,7 +506,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, new ModelReaderWriterOptions("W")); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -490,6 +566,20 @@ public Response Update(string subscriptionId, string resourceGroupName, string a } } + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.CodeSigning/codeSigningAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName) { var message = _pipeline.CreateMessage(); @@ -560,6 +650,14 @@ public Response Delete(string subscriptionId, string resourceGroupName, string a } } + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) { var message = _pipeline.CreateMessage(); @@ -628,6 +726,14 @@ public Response ListBySubscriptionNextPage(string } } + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountData.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountData.Serialization.cs index d6d440aacc923..7a4e0d0e21ddf 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountData.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountData.Serialization.cs @@ -17,7 +17,7 @@ namespace Azure.ResourceManager.TrustedSigning { public partial class TrustedSigningAccountData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -111,7 +111,7 @@ TrustedSigningAccountData IJsonModel.Create(ref Utf8J internal static TrustedSigningAccountData DeserializeTrustedSigningAccountData(JsonElement element, ModelReaderWriterOptions options = null) { - options ??= new ModelReaderWriterOptions("W"); + options ??= ModelSerializationExtensions.WireOptions; if (element.ValueKind == JsonValueKind.Null) { diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.Serialization.cs new file mode 100644 index 0000000000000..48fbaf609ac04 --- /dev/null +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.TrustedSigning +{ + public partial class TrustedSigningAccountResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + TrustedSigningAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + TrustedSigningAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileData.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileData.Serialization.cs index 5e29221a45e0c..54fdc65fea0aa 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileData.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileData.Serialization.cs @@ -17,7 +17,7 @@ namespace Azure.ResourceManager.TrustedSigning { public partial class TrustedSigningCertificateProfileData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -183,7 +183,7 @@ TrustedSigningCertificateProfileData IJsonModel + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.TrustedSigning +{ + public partial class TrustedSigningCertificateProfileResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + TrustedSigningCertificateProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + TrustedSigningCertificateProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +}